/**
 * AdvanceQuiz Settings CSS
 */

.settings-main {
    min-height: calc(100vh - var(--app-bar-height));
    padding: 16px;
    padding-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-page-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 4px 4px;
}

.settings-page-hero h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--md-sys-color-on-surface);
}

.settings-page-hero p {
    margin-top: 2px;
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
}

/* Section Card */
.settings-section {
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 16px;
    overflow: hidden;
}

.settings-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
}

.settings-section-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-section-icon svg {
    width: 22px;
    height: 22px;
}

.language-icon {
    background: #EDE9FE;
}
.language-icon svg {
    color: #7C3AED;
}

.theme-icon {
    background: #FEF3C7;
}
.theme-icon svg {
    color: #D97706;
}

.faq-icon {
    background: #DBEAFE;
}
.faq-icon svg {
    color: #2563EB;
}

.settings-section-text {
    flex: 1;
}

.settings-section-text h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
}

.settings-section-text p {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 2px;
}

/* Language Grid */
.settings-section .language-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 16px 16px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--md-sys-color-surface-variant);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.language-option:hover {
    background: var(--md-sys-color-surface-container-high);
}

.language-option.active {
    background: var(--md-sys-color-primary-container);
    border-color: var(--md-sys-color-primary);
}

.language-option-script {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--md-sys-color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
}

.language-option.active .language-option-script {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.language-option-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

/* Theme Options */
.theme-options {
    display: flex;
    gap: 10px;
    padding: 0 16px 16px;
}

.theme-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    background: var(--md-sys-color-surface-variant);
    border: 2px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-family: inherit;
}

.theme-option:hover {
    background: var(--md-sys-color-surface-container-high);
}

.theme-option.active {
    background: var(--md-sys-color-primary-container);
    border-color: var(--md-sys-color-primary);
}

.theme-option-preview {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.theme-option-preview svg {
    width: 24px;
    height: 24px;
}

.system-preview {
    display: flex;
    border: 2px solid var(--md-sys-color-outline-variant);
}

.preview-light-half {
    width: 24px;
    height: 48px;
    background: #FFFFFF;
}

.preview-dark-half {
    width: 24px;
    height: 48px;
    background: #1C1B1F;
}

.light-preview {
    background: #FFFFFF;
    border: 2px solid var(--md-sys-color-outline-variant);
}

.light-preview svg {
    color: #F59E0B;
}

.dark-preview {
    background: #1C1B1F;
    border: 2px solid var(--md-sys-color-outline-variant);
}

.dark-preview svg {
    color: #A78BFA;
}

.theme-option-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.theme-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 11px;
    background: var(--md-sys-color-primary);
    display: none;
    align-items: center;
    justify-content: center;
}

.theme-check svg {
    width: 14px;
    height: 14px;
    color: var(--md-sys-color-on-primary);
}

.theme-option.active .theme-check {
    display: flex;
}

/* Navigation Tile */
.settings-nav-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

.settings-nav-tile:hover {
    background: var(--md-sys-color-surface-variant);
}

.settings-meta {
    font-size: 12px;
    font-weight: 700;
    color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
    border-radius: 999px;
    padding: 6px 10px;
    white-space: nowrap;
}

.nav-chevron {
    width: 24px;
    height: 24px;
    color: var(--md-sys-color-on-surface-variant);
    flex-shrink: 0;
}

/* About Section */
.settings-about {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    gap: 6px;
}

.about-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    margin-bottom: 4px;
}

.about-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
}

.about-tagline {
    font-size: 13px;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
}

/* Responsive */
@media (max-width: 380px) {
    .settings-section .language-grid {
        grid-template-columns: 1fr;
    }
    
    .theme-options {
        flex-direction: column;
    }
    
    .theme-option {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .theme-option-preview {
        width: 40px;
        height: 40px;
    }
}
