/* 主題樣式文件 - 包含多種不同設計風格 */

/* 全站品牌：夜晚約會（深紫午夜藍 + 暖玫瑰金） */
.modern-theme {
    --primary-color: #E8B4D4;
    --secondary-color: #B794F6;
    --accent-color: #F5D0A6;
    --light-color: #3A2A4A;
    --dark-color: #F6F0EA;
    --background-color: #0E0B14;
    --card-bg: #1A1524;
    --header-gradient: linear-gradient(135deg, #2A1B3D 0%, #16101F 100%);
    --btn-primary-gradient: linear-gradient(135deg, #C084FC 0%, #E879A9 100%);
    --btn-secondary-gradient: linear-gradient(135deg, #7C3AED 0%, #DB2777 100%);
    --brand-rose: #E879A9;
    --brand-violet: #A78BFA;
    --brand-gold: #F5D0A6;
    --brand-ink: #0E0B14;
}

/* ===== 主題1: 粉色漸變（與品牌同一色系） ===== */
.theme-pink {
    --primary-color: #E8B4D4;
    --secondary-color: #C084FC;
    --accent-color: #F5D0A6;
    --light-color: #3A2A4A;
    --dark-color: #F6F0EA;
    --background-color: #0E0B14;
    --card-bg: #1A1524;
    --header-gradient: linear-gradient(135deg, #2A1B3D, #16101F);
    --btn-primary-gradient: linear-gradient(135deg, #C084FC, #E879A9);
    --btn-secondary-gradient: linear-gradient(135deg, #7C3AED, #DB2777);
}

/* ===== 主題2: 靛藍海洋 ===== */
.theme-ocean {
    --primary-color: #1A5F7A;
    --secondary-color: #159895;
    --accent-color: #57C5B6;
    --light-color: #DFF6FF;
    --dark-color: #222831;
    --background-color: #F5F5F5;
    --card-bg: #ffffff;
    --header-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --btn-primary-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --btn-secondary-gradient: linear-gradient(135deg, #57C5B6, #002B5B);
}

/* ===== 主題3: 森林綠 ===== */
.theme-forest {
    --primary-color: #4E944F;
    --secondary-color: #83BD75;
    --accent-color: #B4E197;
    --light-color: #E9F5DB;
    --dark-color: #333;
    --background-color: #F9FFF5;
    --card-bg: #ffffff;
    --header-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --btn-primary-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --btn-secondary-gradient: linear-gradient(135deg, #B4E197, #4E944F);
}

/* ===== 主題4: 暗夜模式 ===== */
.theme-dark {
    --primary-color: #E8B4D4;
    --secondary-color: #B794F6;
    --accent-color: #F5D0A6;
    --light-color: #3A2A4A;
    --dark-color: #F6F0EA;
    --background-color: #0E0B14;
    --card-bg: #1A1524;
    --header-gradient: linear-gradient(135deg, #2A1B3D, #16101F);
    --btn-primary-gradient: linear-gradient(135deg, #C084FC, #E879A9);
    --btn-secondary-gradient: linear-gradient(135deg, #7C3AED, #DB2777);
}

/* ===== 主題5: 橙色活力 ===== */
.theme-orange {
    --primary-color: #FF8B13;
    --secondary-color: #FF9A4B;
    --accent-color: #FAD6A5;
    --light-color: #FFF8EA;
    --dark-color: #333;
    --background-color: #FFFBF5;
    --card-bg: #ffffff;
    --header-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --btn-primary-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --btn-secondary-gradient: linear-gradient(135deg, #FF8B13, #E97777);
}

/* ===== 主題6: 浪漫紫 ===== */
.theme-purple {
    --primary-color: #E8B4D4;
    --secondary-color: #B794F6;
    --accent-color: #F5D0A6;
    --light-color: #3A2A4A;
    --dark-color: #F6F0EA;
    --background-color: #0E0B14;
    --card-bg: #1A1524;
    --header-gradient: linear-gradient(135deg, #2A1B3D, #16101F);
    --btn-primary-gradient: linear-gradient(135deg, #C084FC, #E879A9);
    --btn-secondary-gradient: linear-gradient(135deg, #7C3AED, #DB2777);
}

/* 基本樣式 - 適用於所有現代主題 */
.modern-theme {
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--dark-color);
    background-color: var(--background-color);
    padding-bottom: 40px;
}

@media (max-width: 991.98px) {
    .modern-theme.has-mobile-nav,
    .modern-theme:has(.mobile-bottom-nav),
    .modern-theme.page-swipe {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .modern-theme.page-match,
    body[data-g8-active-page="match"].modern-theme,
    body:has(#g8-page-root[data-page="match"]).modern-theme {
        padding-bottom: 0 !important;
    }

    .modern-theme.page-settings,
    body[data-g8-active-page="settings"].modern-theme,
    body:has(#g8-page-root[data-page="settings"]).modern-theme {
        padding-bottom: 0 !important;
    }

    .modern-theme.page-voice-match,
    .modern-theme.page-video-match,
    .modern-theme.page-text-match {
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

.theme-selector {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-selector:hover {
    transform: scale(1.05);
    background-color: rgba(0, 0, 0, 0.8);
}

.theme-menu {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background-color: var(--card-bg, #1A1524);
    color: var(--dark-color, #F6F0EA);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    display: none;
    width: 250px;
}

.theme-option {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--dark-color, #F6F0EA);
}

.theme-option:hover {
    background-color: rgba(192, 132, 252, 0.16);
}

.theme-color {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    margin-right: 15px;
}

.theme-pink-color {
    background: linear-gradient(135deg, #FF4B91, #FF6AC2);
}

.theme-ocean-color {
    background: linear-gradient(135deg, #1A5F7A, #159895);
}

.theme-forest-color {
    background: linear-gradient(135deg, #4E944F, #83BD75);
}

.theme-dark-color {
    background: linear-gradient(135deg, #C084FC, #E879A9);
}

.theme-orange-color {
    background: linear-gradient(135deg, #FF8B13, #FF9A4B);
}

.theme-purple-color {
    background: linear-gradient(135deg, #8A2BE2, #A35CFF);
}

.theme-option.active {
    background-color: #f0f0f0;
    font-weight: bold;
}

.theme-close {
    text-align: center;
    padding: 8px;
    margin-top: 10px;
    border-radius: 5px;
    background-color: #f5f5f5;
    cursor: pointer;
}

.theme-name {
    flex-grow: 1;
}

/* 現代主題共享元素樣式 */
.modern-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
}

.modern-header {
    background: var(--header-gradient);
    border-radius: 20px;
    color: white;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.modern-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 60%);
    z-index: 0;
}

.header-content {
    position: relative;
    z-index: 1;
}

.user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    margin-right: 25px;
}

.user-name {
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.section-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--btn-primary-gradient);
    border-radius: 2px;
}

.matching-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
    padding: 40px 30px;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.matching-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--btn-primary-gradient);
}

.matching-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    padding: 20px;
    display: inline-block;
    background: var(--btn-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.voice-icon {
    background: var(--btn-secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-title {
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.feature-list {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 30px;
}

.feature-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
}

.feature-list li::before {
    content: '✓';
    margin-right: 10px;
    color: var(--accent-color);
    font-weight: bold;
}

.btn-voice {
    background: var(--btn-secondary-gradient);
    border: none;
    border-radius: 30px;
    padding: 12px 28px;
    font-weight: 600;
    color: white;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-voice:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    color: white;
}

.btn-text {
    background: var(--btn-primary-gradient);
    border: none;
    border-radius: 30px;
    padding: 12px 28px;
    font-weight: 600;
    color: white;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-text:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    color: white;
}

.card-footer-text {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #888;
}

.footer-note {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.heart-icon {
    color: var(--primary-color);
    animation: heartbeat 1.5s infinite ease-in-out;
    display: inline-block;
    margin: 0 5px;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

.profile-btn {
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 0.9rem;
    margin-left: 10px;
    transition: all 0.3s;
}

.profile-btn-outline {
    border: 2px solid white;
    background: transparent;
    color: white;
}

.profile-btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.logout-btn {
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: white;
}

.logout-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    color: white;
}

/* 暗色主題特殊調整 */
.theme-dark .matching-card {
    background: var(--card-bg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.theme-dark .footer-note {
    background: var(--card-bg);
}

.theme-dark .card-footer-text {
    color: #aaa;
}

/* 品牌鎖定：所有現代主題統一夜晚約會色系 */
.modern-theme {
    --primary-color: #E8B4D4;
    --secondary-color: #B794F6;
    --accent-color: #F5D0A6;
    --light-color: #3A2A4A;
    --dark-color: #F6F0EA;
    --background-color: #0E0B14;
    --bg-color: #0E0B14;
    --card-bg: #1A1524;
    --header-gradient: linear-gradient(135deg, #2A1B3D, #16101F);
    --btn-primary-gradient: linear-gradient(135deg, #C084FC, #E879A9);
    --btn-secondary-gradient: linear-gradient(135deg, #7C3AED, #DB2777);
    --muted-color: rgba(246, 240, 234, 0.62);
    --surface-border: rgba(255, 255, 255, 0.08);
    --surface-fill: rgba(255, 255, 255, 0.05);
}

.modern-theme.display-light {
    --primary-color: #C0266B;
    --secondary-color: #7C3AED;
    --accent-color: #B45309;
    --light-color: #FDF2F8;
    --dark-color: #2A1B3D;
    --background-color: #F6F0F4;
    --bg-color: #F6F0F4;
    --card-bg: #ffffff;
    --header-gradient: linear-gradient(135deg, #FDF2F8 0%, #F3E8FF 100%);
    --btn-primary-gradient: linear-gradient(135deg, #C084FC 0%, #E879A9 100%);
    --btn-secondary-gradient: linear-gradient(135deg, #7C3AED 0%, #DB2777 100%);
    --brand-ink: #2A1B3D;
    --muted-color: rgba(42, 27, 61, 0.58);
    --surface-border: rgba(42, 27, 61, 0.12);
    --surface-fill: rgba(42, 27, 61, 0.04);
    color: var(--dark-color);
    background-color: var(--background-color);
}

.modern-theme.display-light .form-text,
.modern-theme.display-light .text-muted {
    color: var(--muted-color) !important;
}

.modern-theme.display-light .modal-content,
.modern-theme.display-light .offcanvas,
.modern-theme.display-light .dropdown-menu,
.modern-theme.display-light .popover,
.modern-theme.display-light .toast {
    border-color: var(--surface-border) !important;
}

.modern-theme.display-light .modal-header,
.modern-theme.display-light .modal-footer,
.modern-theme.display-light .offcanvas-header {
    border-color: var(--surface-border) !important;
}

.modern-theme.display-light .btn-close {
    filter: none;
}

.modern-theme.display-light .match-card,
.modern-theme.display-light .voice-chat-container.match-card,
.modern-theme.display-light .chat-container.match-card {
    color: var(--dark-color);
}

.modern-theme.display-light .match-settings-hero .match-settings-title,
.modern-theme.display-light .match-settings-hero .match-settings-sub,
.modern-theme.display-light .match-card .match-settings-title,
.modern-theme.display-light .match-card .match-settings-sub,
.modern-theme.display-light .match-card .match-panel .pref-section-title,
.modern-theme.display-light .match-card .match-panel .age-range-display,
.modern-theme.display-light .match-card .match-panel strong,
.modern-theme.display-light .match-card label.pref-chip,
.modern-theme.display-light .match-card .pref-chip,
.modern-theme.display-light .match-card .age-preset-btn:not(.active),
.modern-theme.display-light .match-card .location-hint,
.modern-theme.display-light .match-card #location-status,
.modern-theme.display-light .match-card .age-marker,
.modern-theme.display-light .match-card .age-separator,
.modern-theme.display-light .match-card .age-input {
    color: var(--dark-color) !important;
    -webkit-text-fill-color: var(--dark-color);
}

.modern-theme.display-light .match-card .age-input {
    background-color: rgba(42, 27, 61, 0.06) !important;
    border-color: var(--surface-border) !important;
}

/* 彈窗／表單／卡片：避免白底淺字 */
.modern-theme .modal-content,
.modern-theme .offcanvas,
.modern-theme .dropdown-menu,
.modern-theme .popover,
.modern-theme .toast {
    background-color: var(--card-bg, #1A1524) !important;
    color: var(--dark-color, #F6F0EA) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.modern-theme .modal-header,
.modern-theme .modal-footer,
.modern-theme .offcanvas-header {
    background: transparent;
    color: var(--dark-color, #F6F0EA);
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.modern-theme .modal-title,
.modern-theme .modal-body,
.modern-theme .modal-body p,
.modern-theme .form-label,
.modern-theme .form-check-label,
.modern-theme .col-form-label,
.modern-theme .match-preview-skip {
    color: var(--dark-color, #F6F0EA) !important;
}

.modern-theme .form-text,
.modern-theme .text-muted {
    color: rgba(246, 240, 234, 0.55) !important;
}

/* 淺色區塊（音量面板等）：深色字 */
.modern-theme .call-audio-panel,
.modern-theme .surface-light {
    color: #334155;
}

/* 配對設定卡片（深色底）：淺色字，避免 dark-on-dark */
.modern-theme .voice-chat-container.match-card,
.modern-theme .chat-container.match-card {
    color: rgba(246, 240, 234, 0.94);
}

.modern-theme .match-settings-hero .match-settings-title {
    color: #F6F0EA !important;
    -webkit-text-fill-color: #F6F0EA;
}

.modern-theme .match-settings-hero .match-settings-kicker {
    color: #f9a8d4 !important;
    -webkit-text-fill-color: #f9a8d4;
}

.modern-theme .match-settings-hero--video .match-settings-kicker {
    color: #c4b5fd !important;
    -webkit-text-fill-color: #c4b5fd;
}

.modern-theme .match-settings-hero--text .match-settings-kicker {
    color: #cbd5e1 !important;
    -webkit-text-fill-color: #cbd5e1;
}

.modern-theme .match-settings-hero .match-settings-sub {
    color: rgba(246, 240, 234, 0.82) !important;
    -webkit-text-fill-color: rgba(246, 240, 234, 0.82);
}

.modern-theme .match-card .match-settings-title {
    color: #F6F0EA !important;
    -webkit-text-fill-color: #F6F0EA;
}

.modern-theme .match-card .match-settings-kicker {
    color: #f9a8d4 !important;
    -webkit-text-fill-color: #f9a8d4;
}

.modern-theme .match-card .match-settings-sub {
    color: rgba(246, 240, 234, 0.78) !important;
    -webkit-text-fill-color: rgba(246, 240, 234, 0.78);
}

.modern-theme .match-card .match-panel .pref-section-title,
.modern-theme .match-card .match-panel .age-range-display,
.modern-theme .match-card .match-panel strong {
    color: #F6F0EA !important;
    -webkit-text-fill-color: #F6F0EA;
}

.modern-theme .match-card label.pref-chip,
.modern-theme .match-card .pref-chip {
    color: rgba(246, 240, 234, 0.88) !important;
    -webkit-text-fill-color: rgba(246, 240, 234, 0.88);
    font-weight: 600;
}

.modern-theme .match-card .pref-chip:hover {
    color: #fff !important;
    -webkit-text-fill-color: #fff;
}

.modern-theme .match-card .pref-chip:has(input:checked),
.modern-theme .match-card .pref-chip.active {
    color: #fff !important;
    -webkit-text-fill-color: #fff;
}

.modern-theme .match-card .age-preset-btn:not(.active) {
    color: rgba(246, 240, 234, 0.88) !important;
    -webkit-text-fill-color: rgba(246, 240, 234, 0.88);
    font-weight: 600;
}

.modern-theme .match-card .age-preset-btn.active {
    color: #fff !important;
    -webkit-text-fill-color: #fff;
}

.modern-theme .match-card .location-hint,
.modern-theme .match-card #location-status,
.modern-theme .match-card .age-marker,
.modern-theme .match-card .age-separator {
    color: rgba(246, 240, 234, 0.72) !important;
    -webkit-text-fill-color: rgba(246, 240, 234, 0.72);
}

.modern-theme .match-card .age-input {
    color: #F6F0EA !important;
    -webkit-text-fill-color: #F6F0EA;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

.modern-theme .match-card .age-input::placeholder {
    color: rgba(246, 240, 234, 0.45) !important;
}

.modern-theme .beauty-preset-btn:not(.active) {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b;
}

.modern-theme .age-preset-btn.active,
.modern-theme .beauty-preset-btn.active {
    color: #fff !important;
    -webkit-text-fill-color: #fff;
}

.modern-theme .beauty-preview-hint,
.modern-theme .call-volume-row,
.modern-theme .call-volume-row label,
.modern-theme .call-volume-row span {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b;
}

.modern-theme .call-volume-row label {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a;
}

.modern-theme .surface-light .text-muted {
    color: #64748b !important;
}

.modern-theme .surface-light .form-control {
    color: #334155 !important;
    background-color: #fff !important;
    border-color: #cbd5e1 !important;
}

/* 配對彈窗（白底）：深色字 */
.modern-theme .match-modal-card,
.modern-theme .match-modal-card .match-modal-body {
    color: #334155 !important;
}

.modern-theme .match-modal-header,
.modern-theme .match-modal-header h5 {
    color: #0f172a !important;
}

.modern-theme .match-modal-card .match-modal-muted,
.modern-theme .match-modal-card .text-muted,
.modern-theme .match-modal-card .match-queue-hint {
    color: #64748b !important;
}

.modern-theme .match-modal-card .match-queue-eta,
.modern-theme .match-modal-card .fw-semibold,
.modern-theme .match-modal-card p {
    color: #1e293b !important;
}

.modern-theme .match-modal-card .match-queue-eta {
    color: #475569 !important;
}

.modern-theme .match-modal-card .alert-info {
    background: #eff6ff !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
}

.modern-theme .match-modal-card .alert-info p,
.modern-theme .match-modal-card .alert-info small {
    color: #1e40af !important;
}

/* 配對彈窗為白底：outline 按鈕需深色字，不可沿用全站深色主題的淺色 outline */
.modern-theme .match-modal-card .btn-outline-secondary {
    color: #475569 !important;
    border-color: #cbd5e1 !important;
    background-color: #fff !important;
}

.modern-theme .match-modal-card .btn-outline-secondary:hover:not(:disabled) {
    color: #1e293b !important;
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

.modern-theme .match-modal-card .btn-outline-secondary:disabled {
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    opacity: 0.7;
}

.modern-theme .match-modal-card .btn-outline-danger {
    color: #dc2626 !important;
    border-color: #fca5a5 !important;
    background-color: #fff !important;
}

.modern-theme .match-modal-card .btn-outline-danger:hover:not(:disabled) {
    color: #fff !important;
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
}

.modern-theme .match-modal-card .match-consent-actions {
    gap: 12px;
}

.modern-theme .match-modal-card .match-consent-actions .btn {
    min-width: 120px;
}

/* 舉報彈窗為白底：覆蓋深色主題的表單與文字色 */
.modern-theme .g8-report-card,
.modern-theme .g8-report-card .g8-report-body {
    color: #334155 !important;
}

.modern-theme .g8-report-header,
.modern-theme .g8-report-header h5 {
    color: #0f172a !important;
}

.modern-theme .g8-report-card .g8-report-target,
.modern-theme .g8-report-card .text-muted {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b;
}

.modern-theme .g8-report-card .g8-report-preset {
    color: #475569 !important;
    border-color: #cbd5e1 !important;
    background: #fff !important;
    -webkit-text-fill-color: #475569;
}

.modern-theme .g8-report-card .g8-report-preset.is-active {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
    -webkit-text-fill-color: #b91c1c;
}

.modern-theme .g8-report-card textarea.g8-report-text,
.modern-theme .g8-report-card .g8-report-text {
    background: #fff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b;
}

.modern-theme .g8-report-card textarea.g8-report-text::placeholder,
.modern-theme .g8-report-card .g8-report-text::placeholder {
    color: #94a3b8 !important;
}

.modern-theme .g8-report-card textarea.g8-report-text:focus,
.modern-theme .g8-report-card .g8-report-text:focus {
    background: #fff !important;
    color: #1e293b !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.modern-theme .g8-report-footer .btn-outline-secondary {
    color: #475569 !important;
    border-color: #cbd5e1 !important;
    background: #fff !important;
}

.modern-theme .g8-report-footer .btn-danger {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}

.modern-theme .close {
    color: var(--dark-color, #F6F0EA) !important;
    text-shadow: none;
    opacity: 0.85;
}

.modern-theme .btn-close {
    filter: invert(1) grayscale(1) brightness(1.8);
    opacity: 0.85;
}

.modern-theme .form-control,
.modern-theme .form-select,
.modern-theme .custom-select,
.modern-theme textarea.form-control,
.modern-theme input.form-control {
    background-color: #241C30 !important;
    border-color: rgba(245, 208, 166, 0.22) !important;
    color: var(--dark-color, #F6F0EA) !important;
}

.modern-theme .form-control::placeholder,
.modern-theme textarea::placeholder {
    color: rgba(246, 240, 234, 0.42) !important;
}

.modern-theme .form-control:focus,
.modern-theme .form-select:focus {
    background-color: #2A2238 !important;
    color: var(--dark-color, #F6F0EA) !important;
    border-color: #C084FC !important;
    box-shadow: 0 0 0 0.2rem rgba(192, 132, 252, 0.28);
}

.modern-theme .form-control:disabled,
.modern-theme .form-control[readonly] {
    background-color: #1A1524 !important;
    color: rgba(246, 240, 234, 0.55) !important;
}

.modern-theme .input-group-text {
    background-color: #241C30;
    border-color: rgba(245, 208, 166, 0.22);
    color: var(--dark-color, #F6F0EA);
}

.modern-theme .card-header {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--dark-color, #F6F0EA) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.modern-theme .card-header.bg-primary,
.modern-theme .navbar.bg-primary,
.modern-theme .navbar-dark.bg-primary {
    background: var(--header-gradient) !important;
    color: #fff !important;
}

.modern-theme .card-header.bg-warning {
    background: linear-gradient(135deg, #7C3AED, #DB2777) !important;
    color: #fff !important;
    border: 0;
}

.modern-theme .list-group-item {
    background-color: var(--card-bg, #1A1524);
    color: var(--dark-color, #F6F0EA);
    border-color: rgba(255, 255, 255, 0.06);
}

.modern-theme .dropdown-item {
    color: var(--dark-color, #F6F0EA);
}

.modern-theme .dropdown-item:hover,
.modern-theme .dropdown-item:focus {
    background: rgba(192, 132, 252, 0.18);
    color: #fff;
}

.modern-theme .btn-secondary {
    background: #3A2A4A;
    border-color: #3A2A4A;
    color: #fff;
}

.modern-theme .btn-secondary:hover {
    background: #4A3A5C;
    border-color: #4A3A5C;
    color: #fff;
}

.modern-theme .btn-outline-secondary {
    color: var(--dark-color, #F6F0EA);
    border-color: rgba(255, 255, 255, 0.28);
}

.modern-theme .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.modern-theme .btn-outline-primary {
    color: var(--primary-color, #E8B4D4);
    border-color: var(--primary-color, #E8B4D4);
}

.modern-theme .btn-link {
    color: var(--primary-color, #E8B4D4);
}

.modern-theme .alert {
    border: 0;
}

.modern-theme .alert-danger {
    background: rgba(219, 39, 119, 0.18);
    color: #F9A8D4;
}

.modern-theme .alert-success {
    background: rgba(34, 197, 94, 0.16);
    color: #86EFAC;
}

.modern-theme .alert-info,
.modern-theme .alert-primary {
    background: rgba(167, 139, 250, 0.16);
    color: #DDD6FE;
}

.modern-theme .alert-warning {
    background: rgba(245, 208, 166, 0.16);
    color: #F5D0A6;
}

.modern-theme .table {
    color: var(--dark-color, #F6F0EA);
}

.modern-theme .table td,
.modern-theme .table th {
    border-color: rgba(255, 255, 255, 0.08);
}

.modern-theme hr {
    border-color: rgba(255, 255, 255, 0.08);
}

.modern-theme .modal-backdrop {
    background-color: #0E0B14;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .modern-header {
        padding: 20px;
        text-align: center;
    }
    
    .user-avatar {
        margin: 0 auto 15px;
        display: block;
    }
    
    .header-flex {
        flex-direction: column;
    }
    
    .profile-actions {
        margin-top: 15px;
    }
}

html.display-light {
    color-scheme: light;
    --primary-color: #C0266B !important;
    --secondary-color: #7C3AED !important;
    --accent-color: #B45309 !important;
    --light-color: #FDF2F8 !important;
    --dark-color: #2A1B3D !important;
    --background-color: #F4EEE8 !important;
    --bg-color: #F4EEE8 !important;
    --card-bg: #ffffff !important;
    --muted-color: rgba(42, 27, 61, 0.58) !important;
    --surface-border: rgba(42, 27, 61, 0.12) !important;
    --surface-fill: rgba(42, 27, 61, 0.05) !important;
}

html.display-light,
html.display-light body {
    background: #F4EEE8 !important;
    color: #2A1B3D !important;
}

html.display-dark {
    color-scheme: dark;
} 