/* Previous styles retained, now adding Learn and FAQ page styles */

/* Learn Page & FAQ Page Headers */
.learn-header,
.faq-header {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, rgba(100, 108, 255, 0.1), rgba(123, 47, 247, 0.1));
    border-radius: 20px;
    border: 1px solid var(--border);
}

.learn-header h1,
.faq-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent), #7b2ff7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.learn-subtitle,
.faq-subtitle {
    font-size: 1.2rem;
    color: var(--text-dim);
}

/* Content Windows - Elegant glassmorphism cards */
.content-window {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 32px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.light .content-window {
    background: rgba(255, 255, 255, 0.8);
}

.content-window:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px var(--shadow);
}

.window-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.window-title::before {
    content: '';
    width: 4px;
    height: 30px;
    background: linear-gradient(180deg, var(--accent), #7b2ff7);
    border-radius: 2px;
}

/* Level Cards */
.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.level-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.level-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #7b2ff7);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.level-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(100, 108, 255, 0.3);
}

.level-card:hover::before {
    transform: scaleX(1);
}

.level-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.level-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.level-card p {
    color: var(--text-dim);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.level-stats {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 600;
}

/* Keyboard Guide */
.keyboard-guide {
    padding: 2rem 0;
}

.guide-visual {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.hand-guide {
    display: flex;
    gap: 4rem;
    justify-content: center;
    align-items: center;
}

.hand {
    display: flex;
    gap: 1rem;
}

.finger-label {
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    text-align: center;
    min-width: 60px;
}

.home-row-emphasis {
    text-align: center;
    padding: 2rem;
    background: rgba(100, 108, 255, 0.05);
    border-radius: 16px;
    border: 2px dashed var(--accent);
    width: 100%;
}

.home-row-emphasis h3 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.home-keys {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.key-highlight {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    padding: 1rem 2rem;
    background: var(--accent);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(100, 108, 255, 0.4);
}

.guide-note {
    color: var(--text-dim);
    font-style: italic;
}

/* Lessons Grid */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.lesson-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.lesson-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(100, 108, 255, 0.2);
}

.lesson-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent), #7b2ff7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(100, 108, 255, 0.4);
}

.lesson-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.lesson-card ul {
    list-style: none;
    padding: 0;
}

.lesson-card li {
    padding: 0.75rem 0;
    color: var(--text-dim);
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.lesson-card li::before {
    content: '✓';
    color: var(--correct);
    font-weight: 700;
    flex-shrink: 0;
}

/* Mistakes List */
.mistakes-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mistake-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mistake-item:hover {
    border-color: var(--error);
    transform: translateX(5px);
}

.mistake-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.mistake-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.mistake-content p {
    color: var(--text-dim);
    line-height: 1.6;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(100, 108, 255, 0.3);
}

.tip-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.tip-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.tip-card p {
    color: var(--text-dim);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* FAQ Items - Elegant Accordion */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--accent);
}

.faq-item.active {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(100, 108, 255, 0.2);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: var(--surface-hover);
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.faq-toggle {
    font-size: 2rem;
    color: var(--accent);
    font-weight: 300;
    transition: transform 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-dim);
    line-height: 1.8;
}

.faq-answer strong {
    color: var(--accent);
}

/* CTA Window */
.cta-window {
    text-align: center;
    background: linear-gradient(135deg, rgba(100, 108, 255, 0.1), rgba(123, 47, 247, 0.1));
    border: 2px solid var(--accent);
}

.cta-window h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.cta-window p {
    color: var(--text-dim);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn-primary,
.cta-buttons .btn-secondary {
    width: auto;
    padding: 1rem 2rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.content-window {
    animation: fadeInUp 0.6s ease;
}

.level-card {
    animation: slideInRight 0.5s ease;
}

.tip-icon {
    animation: float 3s ease-in-out infinite;
}

/* Responsive Adjustments for Learn & FAQ */
@media (max-width: 768px) {
    .learn-header h1,
    .faq-header h1 {
        font-size: 2rem;
    }

    .content-window {
        padding: 1.5rem;
    }

    .level-grid,
    .lessons-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }

    .hand-guide {
        flex-direction: column;
        gap: 1rem;
    }

    .home-keys {
        flex-direction: column;
        gap: 1rem;
    }

    .key-highlight {
        font-size: 1.5rem;
        letter-spacing: 0.3rem;
        padding: 0.75rem 1.5rem;
    }

    .window-title {
        font-size: 1.4rem;
    }

    .mistake-item {
        flex-direction: column;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary {
        width: 100%;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent), #7b2ff7);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Print Styles */
@media print {
    #bg-canvas,
    .nav,
    .config-bar,
    .restart-btn,
    .btn-primary,
    .btn-secondary {
        display: none;
    }

    .content-window {
        break-inside: avoid;
    }
}
