﻿/* Sound & Light School - Styles */

:root {
    /* Colors */
    --bg-primary: #0f1115;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;

    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;

    --accent-primary: #00f3ff;
    --accent-secondary: #bc13fe;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));

    --border-color: #30363d;

    /* Spacing */
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 64px;

    /* Animation */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

h1 {
    font-size: 3rem;
    line-height: 1.1;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    margin: 10px auto;
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-secondary);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

.section {
    padding: var(--spacing-xl) 0;
}

.bg-secondary {
    background-color: var(--bg-secondary);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

/* Header */
.main-header {
    background: rgba(15, 17, 21, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    border-radius: 4px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-lg);
}

nav a {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:hover {
    color: var(--text-primary);
}

/* Hero */
.hero {
    padding: 120px 0;
    text-align: center;
    background: radial-gradient(circle at center, rgba(0, 243, 255, 0.1) 0%, transparent 70%);
}

.hero h1 .accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Components */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 243, 255, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 100%;
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.card,
.course-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--spacing-lg);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.badge {
    background: rgba(0, 243, 255, 0.1);
    color: var(--accent-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    align-self: flex-start;
    margin-bottom: var(--spacing-md);
}

.badge-blue {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.badge-purple {
    color: var(--accent-secondary);
    background: rgba(188, 19, 254, 0.1);
}

.check-list {
    list-style: none;
    margin: var(--spacing-md) 0 var(--spacing-lg);
    flex-grow: 1;
}

.check-list li {
    margin-bottom: 8px;
    padding-left: 24px;
    position: relative;
    color: var(--text-secondary);
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

/* Accordion */
.accordion-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
}

.accordion-header:hover {
    background: var(--bg-secondary);
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.accordion-header .icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform var(--transition);
}

.accordion-item.active .accordion-header .icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: var(--bg-secondary);
}

.accordion-item.active .accordion-content {
    max-height: 2000px;
    /* Groß genug */
    border-top: 1px solid var(--border-color);
}

.content-block {
    padding: 30px;
}

.content-block h4 {
    color: var(--accent-primary);
    margin-top: 20px;
}

.content-block h5 {
    color: var(--text-primary);
    margin-top: 15px;
    margin-bottom: 5px;
}

.content-block ul,
.content-block ol {
    margin-left: 20px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.content-block p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-xl);
}

.footer-content {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    display: flex;
    gap: 20px;
}

/* Mobile */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Ad Container */
.ad-footer {
    background: #000;
    padding: 10px 0;
    min-height: 100px;
}

/* --- Learning Mode Styles --- */

.learning-mode {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    /* Scrollen nur im Content */
    display: flex;
    flex-direction: column;
}

.learn-container {
    display: flex;
    flex-grow: 1;
    min-height: 0;
    width: 100%;
}

/* Sidebar */
.learn-sidebar {
    width: 300px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-height: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.back-link {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 10px;
}

.sidebar-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.progress-container {
    background: var(--bg-primary);
    border-radius: 4px;
    height: 6px;
    margin-bottom: 5px;
    overflow: hidden;
    width: 100%;
    position: relative;
}

.progress-bar {
    background: var(--accent-gradient);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

#progressText {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.module-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
}

.module-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
    margin-bottom: 4px;
}

.module-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.module-item.active {
    background: rgba(0, 243, 255, 0.1);
    color: var(--accent-primary);
    font-weight: 600;
}

.module-item.completed .module-number {
    background: var(--accent-secondary);
    color: #fff;
    border-color: var(--accent-secondary);
}

.module-number {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    margin-right: 10px;
    flex-shrink: 0;
}

.module-item.active .module-number {
    border-color: var(--accent-primary);
}

.check {
    margin-left: auto;
    color: var(--accent-primary);
}


/* Main Content */
.learn-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* CRITICAL: Allows scrolling in contentArea */
    position: relative;
    background: var(--bg-primary);
}

#contentArea {
    flex-grow: 1;
    padding: 40px 60px;
    overflow-y: auto;
    min-height: 0;
    transition: opacity 0.2s ease-in-out;
}

#contentArea h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.lesson-content {
    max-width: 800px;
    line-height: 1.8;
    color: #d1d5db;
    font-size: 1.1rem;
}

.lesson-content h3 {
    color: var(--accent-primary);
    margin-top: 30px;
}

.lesson-content h4 {
    color: #fff;
    margin-top: 25px;
}

.lesson-content p {
    margin-bottom: 1.5rem;
}

.lesson-content ul,
.lesson-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.lesson-content li {
    margin-bottom: 10px;
}

.term-list dt {
    font-weight: bold;
    color: var(--accent-primary);
    margin-top: 15px;
}

.term-list dd {
    margin-left: 0;
    margin-bottom: 15px;
    border-left: 2px solid var(--border-color);
    padding-left: 15px;
}

.tip-box {
    background: rgba(0, 243, 255, 0.05);
    border-left: 4px solid var(--accent-primary);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

/* --- Learning Content Components --- */

.task-box {
    background: rgba(188, 19, 254, 0.1);
    border: 1px solid var(--accent-secondary);
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.task-box h4 {
    color: var(--accent-secondary);
    margin-top: 0;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.learning-list li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 25px;
}

.learning-list li::before {
    content: '•';
    color: var(--accent-primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.process-steps {
    counter-reset: step;
    list-style: none;
    margin: 0;
    padding: 0;
}

.process-steps li {
    position: relative;
    padding-left: 50px;
    margin-bottom: 20px;
}

.process-steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: -2px;
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* --- Banner & Footer Layout --- */

.learn-footer {
    padding: 10px 40px;
    /* Kompakter */
    height: 140px;
    /* Platz fxr Banner */
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    /* Links Banner Rechts */
    gap: 20px;
    align-items: center;
}

.footer-nav-left {
    justify-self: start;
}

.footer-nav-right {
    justify-self: end;
}

/* Ad Placeholder Styles in Player */
.player-ad-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

/* Mobile Adjustments */
@media (max-width: 900px) {
    .learn-footer {
        height: auto;
        display: flex;
        flex-direction: column-reverse;
        /* Banner oben oder unten */
        gap: 15px;
        padding: 20px;
    }

    .player-ad-container {
        height: 60px;
        /* Kleinerer Banner mobil */
        width: 100%;
    }

    .footer-nav-left,
    .footer-nav-right {
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}

/* --- Solutions Toggle --- */

.solution-container {
    margin-top: 15px;
    border-top: 1px dashed var(--border-color);
    padding-top: 15px;
}

.solution-content {
    display: none;
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid #2ecc71;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
    color: #f0f6fc;
}

.solution-content.visible {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

.btn-solution {
    background: transparent;
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-solution:hover {
    background: rgba(188, 19, 254, 0.1);
}

.btn-solution::before {
    content: '💡';
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}