/* ============================================
   English Buddy - Settings Page Styles
   ============================================ */

/* Header Row */
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5em;
}

.header-row h1 {
    flex: 1;
    text-align: center;
}

/* Settings Container */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin: 0 auto;
    flex: 1;
    overflow-y: auto;
}

/* Setting Card */
.setting-card {
    background: var(--card-bg);
    border-radius: 1.2em;
    padding: 1.2em 1.5em;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 1em;
    animation: pop-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) backwards;
}

.setting-card:nth-child(1) { animation-delay: 0.1s; }
.setting-card:nth-child(2) { animation-delay: 0.2s; }
.setting-card:nth-child(3) { animation-delay: 0.3s; }
.setting-card:nth-child(4) { animation-delay: 0.4s; }

.setting-header {
    display: flex;
    align-items: flex-start;
    gap: 1em;
}

.setting-icon {
    font-size: 1.8em;
    flex-shrink: 0;
}

.setting-info {
    flex: 1;
}

.setting-title {
    font-family: 'Fredoka One', 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive;
    font-size: 1.2em;
    color: var(--text);
    margin-bottom: 0.2em;
}

.setting-description {
    font-size: 0.85em;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Toggle Group (for theme, language) */
.toggle-group {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.6em 1em;
    border: 2px solid var(--border);
    border-radius: 2em;
    background: var(--bg-light);
    color: var(--text-muted);
    font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-btn:hover {
    border-color: var(--primary);
    color: var(--text);
}

.toggle-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: white;
    box-shadow: 0 0.3em 0.8em var(--shadow-color);
}

.toggle-icon {
    font-size: 1.1em;
}

.toggle-label {
    white-space: nowrap;
}

/* Switch Button (for sound) */
.switch-btn {
    display: flex;
    align-items: center;
    gap: 0.8em;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3em;
    font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.switch-track {
    width: 3em;
    height: 1.6em;
    background: var(--border);
    border-radius: 1em;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-btn.active .switch-track {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
}

.switch-thumb {
    position: absolute;
    top: 0.15em;
    left: 0.15em;
    width: 1.3em;
    height: 1.3em;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0.1em 0.3em rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-btn.active .switch-thumb {
    left: calc(100% - 1.45em);
}

.switch-label {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95em;
    min-width: 2em;
}

/* Info Card */
.info-card {
    background: linear-gradient(135deg, var(--bg-light), var(--card-bg));
}

.app-info {
    padding-top: 0.5em;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85em;
}

.app-info p {
    margin-bottom: 0.3em;
}

/* Footer */
footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
    padding: 1em 0;
    flex-shrink: 0;
}

/* ============================================
   Portrait Mode Adjustments
   ============================================ */
@media (orientation: portrait) {
    .settings-container {
        max-width: 100%;
    }

    .setting-card {
        padding: 1em;
    }

    .toggle-group {
        width: 100%;
    }

    .toggle-btn {
        flex: 1;
        justify-content: center;
        padding: 0.5em 0.8em;
        font-size: 0.85em;
    }

    .toggle-icon {
        font-size: 1em;
    }
}
