/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* コピーボタンスタイル */
.field-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    min-width: 30px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.copy-btn.copied {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ヘッダー */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 2rem;
    font-weight: 300;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.user-info button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.login-button button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-button button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 認証セクション */
.auth-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

/* 認証ヘッダー */
.auth-header {
    margin-bottom: 20px;
    text-align: left;
}

.back-to-search-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.back-to-search-btn:hover {
    background: #5a6268;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    padding: 5px 5px 0 5px;
}

.tab-button {
    background: #e9ecef;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    border-radius: 8px 8px 0 0;
    margin-right: 5px;
    transition: all 0.3s;
}

.tab-button:hover {
    background: #dee2e6;
    color: #495057;
}

.tab-button.active {
    background: white;
    color: #667eea;
    border-bottom: 2px solid #667eea;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* メインコンテンツ */
.main-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.nav-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.nav-button {
    background: #e9ecef;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.3s;
    border-radius: 8px 8px 0 0;
    margin: 5px 5px 0 5px;
}

.nav-button:hover {
    background: #dee2e6;
    color: #495057;
}

.nav-button.active {
    background: white;
    color: #667eea;
    border-bottom: 2px solid #667eea;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.main-tab-content {
    display: none;
    padding: 30px;
}

.main-tab-content.active {
    display: block;
}

/* フォーム */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 現在地と未登録のみチェックボックス用の2列レイアウト */
.form-row.location-row {
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

/* チェックボックス用のラベルはmargin-bottomを適用しない */
.form-group .checkbox-label {
    margin-bottom: 0;
}

/* チェックボックス用のform-groupの調整 */
.form-group.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group select {
    flex: 2;
    min-width: 200px;
}

.input-group input {
    flex: 1;
    min-width: 150px;
}

/* ボタン */
button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button:hover {
    background: #5a6fd8;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.edit-btn {
    background: #28a745;
    padding: 6px 12px;
    font-size: 0.9rem;
}

.edit-btn:hover {
    background: #218838;
}

.delete-btn {
    background: #dc3545;
    padding: 6px 12px;
    font-size: 0.9rem;
}

.delete-btn:hover {
    background: #c82333;
}

.json-btn {
    background: #6f42c1;
    padding: 6px 12px;
    font-size: 0.9rem;
}

.json-btn:hover {
    background: #5a2d91;
}

/* 検索セクション */
.search-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

/* 現在地と未登録のみチェックボックス用の2列レイアウト */
.search-row.location-row {
    grid-template-columns: 2fr 1fr;
}

.search-row:first-child {
    grid-template-columns: 1fr;
}

.search-row:first-child .form-group:first-child {
    max-width: none;
}

/* 結果セクション */
.results-section {
    margin-top: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-header h2 {
    color: #333;
    font-weight: 300;
}

.results-count {
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* キャラクターカード */
.character-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.character-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.character-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.character-basic {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.character-no {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.character-no.unregistered {
    background: #8e44ad;
}

.character-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.character-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.toggle-icon {
    font-size: 1.2rem;
    color: #666;
    transition: transform 0.3s;
    cursor: pointer;
}

.toggle-icon:hover {
    transform: scale(1.1);
}

.toggle-icon.disabled {
    color: #ccc !important;
    cursor: not-allowed !important;
}

.toggle-icon.disabled:hover {
    transform: none !important;
}

.character-details {
    padding: 20px;
    background: white;
}

.detail-row {
    display: flex;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.field-label {
    font-weight: 500;
    color: #666;
    min-width: 120px;
    margin-right: 15px;
}

.field-value {
    color: #333;
    flex: 1;
}

/* メッセージ */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.message-success {
    background: #28a745;
}

.message-error {
    background: #dc3545;
}

.message-info {
    background: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* モーダル */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* ローディング */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 12px;
    }
    
    /* 現在地と未登録のみチェックボックスのモバイル対応 */
    .search-row.location-row {
        grid-template-columns: 1fr;
    }
    
    /* 詳細検索グループのモバイル対応 */
    .detailed-search-group {
        margin-top: 12px;
        padding: 12px;
    }
    
    .detailed-search-group h3 {
        margin: 0 0 10px 0;
        font-size: 1rem;
    }
    
    /* 誕生日入力のモバイル対応 */
    .birthday-inputs {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .birthday-inputs input[type="number"] {
        width: 50px;
    }
    
    .today-button {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    /* 入力グループのモバイル対応 */
    .input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .input-group select,
    .input-group input {
        width: 100%;
    }
    
    .character-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .character-actions {
        align-self: flex-end;
    }
    
    /* 検索結果のモバイル対応 */
    .character-card {
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .character-basic {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .character-location {
        align-self: flex-start;
        margin-left: 0 !important;
    }
    
    .character-details {
        margin-top: 12px;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 8px;
    }
    
    .field-label {
        font-size: 0.9rem;
        font-weight: 500;
    }
    
    .field-value {
        font-size: 0.9rem;
        word-break: break-word;
    }
    
    /* 結果セクションヘッダーのモバイル対応 */
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .results-count {
        font-size: 0.9rem;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .nav-button {
        flex: 1;
        min-width: 120px;
        text-align: center;
        padding: 10px 8px;
        font-size: 0.9rem;
    }
    
    .auth-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .tab-button {
        flex: 1;
        min-width: 100px;
        text-align: center;
        padding: 8px 6px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    /* フォーム要素のモバイル対応 */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 16px; /* iOSのズーム防止 */
    }
    
    /* チェックボックスグループのモバイル対応 */
    .form-group.checkbox-group {
        justify-content: flex-start;
    }
}

/* タブレット用（769px - 1024px） */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .search-row {
        gap: 18px;
        margin-bottom: 18px;
    }
    
    .detailed-search-group {
        margin-top: 18px;
        padding: 18px;
    }
    
    .form-row {
        gap: 18px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
}

/* スマートフォン用（480px以下） */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .search-section {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .search-row {
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .detailed-search-group {
        margin-top: 10px;
        padding: 10px;
    }
    
    .detailed-search-group h3 {
        font-size: 0.9rem;
        margin: 0 0 8px 0;
    }
    
    .birthday-inputs {
        gap: 4px;
    }
    
    .birthday-inputs input[type="number"] {
        width: 45px;
        padding: 6px;
    }
    
    .today-button {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px;
        font-size: 16px;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .checkbox-text {
        font-size: 0.9rem;
    }
    
    /* ボタンのモバイル対応 */
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .btn-small {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* ナビゲーションタブのモバイル対応 */
    .nav-tabs {
        gap: 6px;
    }
    
    .nav-button {
        flex: 1;
        min-width: 100px;
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    .auth-tabs {
        gap: 6px;
    }
    
    .tab-button {
        flex: 1;
        min-width: 80px;
        padding: 6px 4px;
        font-size: 0.8rem;
    }
    
    /* 認証ヘッダーのモバイル対応 */
    .auth-header {
        margin-bottom: 15px;
    }
    
    .back-to-search-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        width: 100%;
    }
    
    /* 新規登録・編集フォームのモバイル対応 */
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        margin-bottom: 4px;
    }
    
    /* パスワード入力グループのモバイル対応 */
    .password-input-group {
        position: relative;
    }
    
    .password-toggle {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        padding: 4px;
    }
    
    /* バリデーションヒントのモバイル対応 */
    .validation-hint {
        font-size: 0.7rem;
        margin-top: 2px;
    }
    
    /* 検索結果のスマートフォン対応 */
    .character-card {
        margin-bottom: 12px;
        padding: 12px;
    }
    
    .character-basic {
        gap: 6px;
    }
    
    .character-details {
        margin-top: 10px;
    }
    
    .detail-row {
        gap: 3px;
        margin-bottom: 6px;
    }
    
    .field-label {
        font-size: 0.8rem;
    }
    
    .field-value {
        font-size: 0.8rem;
    }
    
    .results-header {
        gap: 8px;
    }
    
    .results-count {
        font-size: 0.8rem;
    }
    
    /* キャラクター詳細表示のモバイル対応 */
    .character-detail-container {
        padding: 10px;
    }
    
    .character-detail-card {
        padding: 12px;
    }
    
    .character-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .back-button,
    .copy-link-btn {
        width: 100%;
        justify-content: center;
    }
    
    .character-detail-name {
        font-size: 1.2rem;
    }
    
    .character-detail-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .detail-section {
        padding: 10px;
    }
    
    .detail-item {
        margin-bottom: 8px;
    }
    
    .detail-label {
        font-size: 0.8rem;
    }
    
    .detail-value {
        font-size: 0.8rem;
    }
    
    /* エラーメッセージのモバイル対応 */
    .error-message {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .error-message h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .error-message p {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
}

/* バリデーションヒント */
.validation-hint {
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-top: 4px;
    line-height: 1.3;
}

.help-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 4px;
    cursor: help;
}

.help-icon:hover {
    background-color: #0056b3;
}

/* エラーメッセージ */
.error-message {
    color: #dc3545;
    font-size: 0.8em;
    margin-top: 4px;
}

/* 成功メッセージ */
.success-message {
    color: #28a745;
    font-size: 0.8em;
    margin-top: 4px;
}

/* チェックボックス */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-text {
    color: #555;
    font-size: 1rem;
}

/* 編集不可フィールド */
.form-group input[readonly],
.form-group select[readonly],
.form-group textarea[readonly] {
    background-color: #f5f5f5;
    color: #666;
    cursor: not-allowed;
    border-color: #ddd;
}

.form-group input[readonly]:focus,
.form-group select[readonly]:focus,
.form-group textarea[readonly]:focus {
    border-color: #ddd;
    box-shadow: none;
}

/* パスワード表示切り替え */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group input {
    padding-right: 45px;
    flex: 1;
}

.password-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: #333;
}

.password-toggle:focus {
    outline: none;
    color: #667eea;
}

/* セクションヘッダーと再読み込みボタン */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.reload-button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.2s;
}

.reload-button:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.reload-button:active {
    transform: scale(0.95);
}

/* キャラクター個別表示用スタイル */
.character-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
    min-height: 100vh;
}

.character-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.character-detail-header h1 {
    margin: 0;
    color: #333;
    font-size: 2rem;
}

.back-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.back-button:hover {
    background: #5a6268;
}

.character-detail-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.character-detail-card {
    padding: 30px;
}

.character-detail-header-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.character-detail-name {
    margin: 0;
    color: #333;
    font-size: 2.5rem;
    font-weight: bold;
}

.character-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.detail-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.detail-section.full-width {
    grid-column: 1 / -1;
}

.detail-section h3 {
    margin: 0 0 15px 0;
    color: #007bff;
    font-size: 1.3rem;
    font-weight: bold;
}

.detail-item {
    display: flex;
    margin-bottom: 10px;
    align-items: flex-start;
}

.detail-label {
    font-weight: bold;
    color: #495057;
    min-width: 100px;
    margin-right: 10px;
}

.detail-value {
    color: #333;
    flex: 1;
    word-break: break-word;
}

.detail-text {
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #dc3545;
}

.error-message h2 {
    margin-bottom: 20px;
    color: #dc3545;
}

.error-message p {
    margin-bottom: 30px;
    color: #6c757d;
}

/* リンクボタンのスタイル */
.link-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.link-btn:hover {
    background: #218838;
}

/* パーマネントリンクコピーボタン */
.copy-link-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-link-btn:hover {
    background: #218838;
}

/* キャラクター詳細ヘッダー */
.character-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.back-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.back-button:hover {
    background: #5a6268;
}

/* エラーメッセージ */
.error-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin: 20px 0;
}

.error-message h2 {
    color: #dc3545;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.error-message p {
    color: #6c757d;
    margin-bottom: 10px;
    line-height: 1.6;
}

.error-message .back-button {
    margin-top: 20px;
}

/* 詳細検索グループ */
.detailed-search-group {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.detailed-search-group h3 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: bold;
}

.birthday-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.birthday-inputs input[type="number"] {
    width: 60px;
    text-align: center;
}

.birthday-inputs span {
    color: #6c757d;
    font-size: 0.9rem;
}

.today-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.today-button:hover {
    background: #5a6268;
}

/* 検索中オーバーレイ */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.search-loading {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-loading p {
    margin: 15px 0 0 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

/* スピナー */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
