/* Ambient Music Course Styles */

/* Course Hero */
.ambient-course .course-hero {
    position: relative;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.05) 0%, transparent 50%);
    border-bottom: 1px solid var(--dark-border);
}

/* Course Navigation */
.course-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--dark-border);
}

.course-nav-inner {
    display: flex;
    gap: 0.25rem;
    padding: 0.75rem 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.course-nav-inner::-webkit-scrollbar {
    display: none;
}

.course-nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.course-nav-link:hover {
    color: var(--light);
    background: rgba(255, 255, 255, 0.05);
}

.course-nav-link.active {
    color: var(--accent);
    background: rgba(167, 139, 250, 0.1);
}

/* Course Content */
.course-content {
    background: var(--dark-bg);
}

/* Course Section */
.course-section {
    padding-bottom: 4rem;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--dark-border);
}

.course-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-header {
    margin-bottom: 2rem;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.section-number {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--light);
}

/* Prose Styling */
.prose {
    color: var(--muted);
    line-height: 1.8;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose strong {
    color: var(--light);
    font-weight: 600;
}

.prose em {
    font-style: italic;
}

.prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    color: var(--light);
}

.prose h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--light);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose ul, .prose ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose .highlight-text {
    color: var(--light);
    font-size: 1.125rem;
    font-weight: 500;
}

/* Requirements Box */
.requirements-box {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.requirements-box h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 1rem;
}

.requirements-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirements-box li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--muted);
}

.requirements-box li svg {
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 0.125rem;
}

.requirements-box li a {
    color: var(--accent);
}

.requirements-box li a:hover {
    text-decoration: underline;
}

/* Step Box */
.step-box {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.step-number {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.step-box p {
    color: var(--light);
    margin: 0;
    line-height: 1.6;
}

/* Settings List */
.settings-list {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    list-style: none;
    margin: 1rem 0;
}

.settings-list li {
    padding: 0.25rem 0;
    color: var(--muted);
}

.settings-list li strong {
    color: var(--light);
}

/* Audio Comparison */
.audio-comparison {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.audio-comparison-header {
    margin-bottom: 1rem;
}

.audio-comparison-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ab-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ab-buttons.three-way {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .ab-buttons.three-way {
        grid-template-columns: 1fr;
    }
}

.ab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 0.5rem;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 150px;
}

.ab-btn:hover {
    background: rgba(167, 139, 250, 0.2);
    border-color: var(--accent);
}

.ab-btn.playing {
    background: var(--accent);
    color: var(--dark-bg);
    border-color: var(--accent);
}

.ab-btn svg {
    transition: transform 0.2s ease;
}

.ab-btn.playing svg {
    transform: scale(1.1);
}

.audio-comparison-note {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--muted);
    text-align: center;
}

/* Achievement Box */
.achievement-box {
    display: flex;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

.achievement-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border-radius: 50%;
    color: var(--dark-bg);
}

.achievement-content {
    flex: 1;
}

.achievement-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.achievement-content p {
    color: var(--light);
    margin: 0;
    line-height: 1.6;
}

.achievement-box.final {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.05) 100%);
    border-color: rgba(34, 197, 94, 0.3);
}

.achievement-box.final .achievement-icon {
    background: #22c55e;
    width: 3rem;
    height: 3rem;
}

.achievement-box.final .achievement-label {
    color: #22c55e;
    font-size: 0.875rem;
}

/* Interactive Tools */
.interactive-tool {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 0.75rem;
    overflow: hidden;
    margin: 2rem 0;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(167, 139, 250, 0.05);
    border-bottom: 1px solid var(--dark-border);
}

.tool-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem;
    background: rgba(167, 139, 250, 0.2);
    border-radius: 0.25rem;
}

.tool-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--light);
}

/* LFO Rate Demo */
.lfo-rate-container {
    padding: 1.5rem;
}

.lfo-rate-visual {
    height: 80px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.lfo-wave {
    width: 100%;
    height: 100%;
    color: var(--accent);
}

.lfo-path {
    stroke-linecap: round;
}

.lfo-dot {
    filter: drop-shadow(0 0 4px var(--accent));
}

.lfo-rate-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.lfo-rate-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--dark-border);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lfo-rate-btn:hover {
    color: var(--light);
    border-color: var(--muted);
}

.lfo-rate-btn.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(167, 139, 250, 0.1);
}

.lfo-rate-description {
    font-size: 0.8125rem;
    color: var(--muted);
    text-align: center;
}

/* Keyboard */
.keyboard-container {
    padding: 1.5rem;
}

.keyboard {
    display: flex;
    height: 120px;
    position: relative;
    margin-bottom: 1rem;
}

.key {
    position: relative;
    cursor: pointer;
    transition: all 0.1s ease;
}

.key.white {
    flex: 1;
    background: linear-gradient(180deg, #f0f0f0 0%, #d4d4d4 100%);
    border: 1px solid #999;
    border-radius: 0 0 4px 4px;
    z-index: 1;
}

.key.white:hover {
    background: linear-gradient(180deg, #fff 0%, #e8e8e8 100%);
}

.key.white.active {
    background: linear-gradient(180deg, var(--accent) 0%, #8b5cf6 100%);
    border-color: var(--accent);
}

.key.white span {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.625rem;
    color: #666;
}

.key.black {
    position: absolute;
    width: 7%;
    height: 60%;
    background: linear-gradient(180deg, #333 0%, #111 100%);
    border-radius: 0 0 3px 3px;
    z-index: 2;
}

.key.black:hover {
    background: linear-gradient(180deg, #444 0%, #222 100%);
}

.key.black.active {
    background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%);
}

/* Position black keys */
.key.black[data-note="C#3"] { left: calc(4.166% * 1 - 3.5%); }
.key.black[data-note="D#3"] { left: calc(4.166% * 2 - 3.5%); }
.key.black[data-note="F#3"] { left: calc(4.166% * 4 - 3.5%); }
.key.black[data-note="G#3"] { left: calc(4.166% * 5 - 3.5%); }
.key.black[data-note="A#3"] { left: calc(4.166% * 6 - 3.5%); }
.key.black[data-note="C#4"] { left: calc(4.166% * 8 - 3.5%); }
.key.black[data-note="D#4"] { left: calc(4.166% * 9 - 3.5%); }
.key.black[data-note="F#4"] { left: calc(4.166% * 11 - 3.5%); }
.key.black[data-note="G#4"] { left: calc(4.166% * 12 - 3.5%); }
.key.black[data-note="A#4"] { left: calc(4.166% * 13 - 3.5%); }

.keyboard-hint {
    font-size: 0.8125rem;
    color: var(--muted);
    text-align: center;
}

/* Arrangement Timeline */
.timeline-container {
    padding: 1.5rem;
}

.timeline-track {
    display: flex;
    align-items: center;
    height: 2.5rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.timeline-label {
    width: 60px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    flex-shrink: 0;
}

.timeline-track::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--dark-border);
}

.timeline-bar {
    position: absolute;
    left: 60px;
    height: 1.5rem;
    border-radius: 0.25rem;
    opacity: 0.8;
}

.timeline-bar.pad-bar {
    background: linear-gradient(90deg, rgba(167, 139, 250, 0.3) 0%, rgba(167, 139, 250, 0.6) 10%, rgba(167, 139, 250, 0.6) 80%, rgba(167, 139, 250, 0.2) 100%);
    border: 1px solid rgba(167, 139, 250, 0.5);
}

.timeline-bar.drone-bar {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0.6) 10%, rgba(59, 130, 246, 0.6) 90%, rgba(59, 130, 246, 0.2) 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.timeline-bar.melody-bar {
    background: rgba(34, 197, 94, 0.6);
    border: 1px solid rgba(34, 197, 94, 0.7);
}

.timeline-bar.melody-dot {
    border-radius: 50%;
    width: 12px !important;
    height: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.timeline-markers {
    display: flex;
    justify-content: space-between;
    padding-left: 60px;
    margin-top: 0.5rem;
    position: relative;
}

.timeline-marker {
    font-size: 0.625rem;
    color: var(--muted);
    position: absolute;
    transform: translateX(-50%);
}

.timeline-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--dark-border);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 0.25rem;
}

.legend-dot.pad-dot {
    background: rgba(167, 139, 250, 0.6);
    border: 1px solid rgba(167, 139, 250, 0.8);
}

.legend-dot.drone-dot {
    background: rgba(59, 130, 246, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.8);
}

.legend-dot.melody-dot-legend {
    background: rgba(34, 197, 94, 0.6);
    border: 1px solid rgba(34, 197, 94, 0.8);
    border-radius: 50%;
}

/* Next Steps Grid */
.next-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.next-step-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.next-step-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.next-step-icon {
    color: var(--accent);
    margin-bottom: 1rem;
}

.next-step-card h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 0.5rem;
}

.next-step-card p {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.5;
}

/* Preset Download Box */
.preset-download-box {
    display: flex;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 0.75rem;
    padding: 2rem;
}

@media (max-width: 640px) {
    .preset-download-box {
        flex-direction: column;
        text-align: center;
    }
}

.preset-icon {
    flex-shrink: 0;
    color: var(--accent);
}

.preset-content h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 0.75rem;
}

.preset-content > p {
    color: var(--muted);
    margin-bottom: 1rem;
}

.preset-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.preset-content li {
    padding: 0.375rem 0;
    color: var(--muted);
    font-size: 0.875rem;
}

.preset-content li strong {
    color: var(--light);
}

.preset-download-btn {
    display: inline-flex;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }

    .course-section {
        padding-bottom: 3rem;
        margin-bottom: 3rem;
    }

    .achievement-box {
        flex-direction: column;
        text-align: center;
    }

    .step-box {
        padding: 1rem;
    }
}
