/* Spotify-Inspired Course Viewer */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


:root {
    /* Spotify Color Palette */
    --spotify-black: #000000;
    --spotify-dark: #121212;
    --spotify-elevated: #181818;
    --spotify-base: #282828;
    --spotify-subdued: #3E3E3E;
    --spotify-green: #1DB954;
    --spotify-green-hover: #1ed760;
    --spotify-white: #FFFFFF;
    --spotify-gray: #B3B3B3;
    --spotify-gray-light: #D9D9D9;

    --sidebar-width: 320px;
    --header-height: 72px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--spotify-black);
    color: var(--spotify-white);
    line-height: 1.6;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 1024px) {
    body {
        overflow: auto;
        overflow-x: hidden;
    }
}

/* Scrollbar Styling - Hide scrollbars but keep functionality */
::-webkit-scrollbar {
    width: 0px;
    height: 0px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: transparent;
}

/* For Firefox */
* {
    scrollbar-width: none;
}

/* For IE and Edge */
* {
    -ms-overflow-style: none;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Header */
.header {
    background: var(--spotify-black);
    min-height: var(--header-height);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2.5rem;
    min-height: var(--header-height);
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    flex: 1;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--spotify-white);
    transition: color 0.2s ease;
    letter-spacing: -0.5px;
    margin: 0;
}

.logo-container:hover .logo {
    color: var(--spotify-green);
}

/* Mobile Menu Button - Hidden by default, shown only on mobile when course is loaded */
.mobile-menu-btn {
    background: transparent;
    border: none;
    color: var(--spotify-white);
    cursor: pointer;
    padding: 0.5rem;
    display: none !important; /* Hidden by default on all devices */
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.mobile-menu-btn:hover {
    color: var(--spotify-green);
}

.btn-text-mobile {
    display: none;
}

/* Buttons */
.btn-primary {
    background: var(--spotify-green);
    color: var(--spotify-black);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 500px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: var(--spotify-green-hover);
    transform: scale(1.04);
}

.btn-primary:active {
    transform: scale(1);
}

.btn-large {
    background: var(--spotify-green);
    color: var(--spotify-black);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 500px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-large:hover {
    background: var(--spotify-green-hover);
    transform: scale(1.04);
}

.btn-complete {
    background: transparent;
    color: var(--spotify-white);
    border: 1px solid var(--spotify-subdued);
    padding: 0.65rem 1.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-complete:hover {
    border-color: var(--spotify-white);
    background: rgba(255, 255, 255, 0.1);
}

.btn-complete.completed {
    background: var(--spotify-green);
    color: var(--spotify-black);
    border-color: var(--spotify-green);
}

.btn-nav {
    background: var(--spotify-elevated);
    color: var(--spotify-white);
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-nav:hover:not(:disabled) {
    background: var(--spotify-base);
}

.btn-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-delete {
    background: #E22134;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-delete:hover {
    background: #C91B2C;
    transform: scale(1.04);
}

/* Main Content */
.main-content {
    display: flex;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
    background: var(--spotify-black);
    width: 100%;
}

@media (max-width: 1024px) {
    .main-content {
        overflow-y: visible;
        height: auto;
        min-height: calc(100vh - var(--header-height));
        background: var(--spotify-dark);
    }
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 98;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--spotify-dark);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: none;
    min-width: var(--sidebar-width);
    max-width: 600px;
}

.sidebar.hidden {
    display: none;
}

/* Resizer */
.resizer {
    width: 8px;
    background: transparent;
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    display: none;
}

.resizer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 40px;
    background: var(--spotify-subdued);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.resizer:hover::before {
    opacity: 1;
}

.resizer.resizing::before {
    opacity: 1;
    background: var(--spotify-green);
}

/* Show resizer only on desktop when sidebar is visible */
@media (min-width: 1025px) {
    .resizer {
        display: block;
    }

    .sidebar.hidden + .resizer {
        display: none;
    }
}

.course-info {
    padding: 1.5rem;
    background: var(--spotify-elevated);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#courseTitle {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--spotify-white);
    line-height: 1.3;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--spotify-subdued);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--spotify-green);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--spotify-gray);
}

/* Course Navigation */
.course-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

/* Show scrollbar only in desktop sidebar */
.course-nav::-webkit-scrollbar {
    width: 8px;
}

.course-nav::-webkit-scrollbar-track {
    background: var(--spotify-dark);
}

.course-nav::-webkit-scrollbar-thumb {
    background: var(--spotify-subdued);
    border-radius: 4px;
}

.course-nav::-webkit-scrollbar-thumb:hover {
    background: #535353;
}

.course-nav {
    scrollbar-width: thin;
    scrollbar-color: var(--spotify-subdued) var(--spotify-dark);
}

/* Mobile-only elements - hidden on desktop */
.mobile-course-nav,
.mobile-video-section,
.mobile-lesson-title,
.mobile-video-controls {
    display: none;
}

.section {
    margin-bottom: 0.25rem;
}

.non-video-indicator {
    padding: 0.75rem 1rem;
    margin: 0.5rem 1rem;
    background: rgba(29, 185, 84, 0.1);
    border-left: 3px solid var(--spotify-green);
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.8rem;
    line-height: 1.4;
}

.non-video-indicator .indicator-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.non-video-indicator .indicator-text {
    color: var(--spotify-gray);
    flex: 1;
}

.section-header {
    padding: 0.75rem 1rem;
    background: transparent;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--spotify-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.section-header:hover {
    color: var(--spotify-white);
}

.section-title-group {
    display: flex;
    align-items: center;
    gap: 0;
}

.section-duration {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--spotify-gray);
    text-transform: none;
    margin-left: 0.5rem;
}

.section-toggle {
    transition: transform 0.2s ease;
    opacity: 0.6;
    margin-left: auto;
}

.section.collapsed .section-toggle {
    transform: rotate(-90deg);
}

.section-lessons {
    display: block;
}

.section.collapsed .section-lessons {
    display: none;
}

.lesson-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--spotify-gray);
    transition: all 0.2s ease;
    position: relative;
}

.lesson-item:hover {
    background: var(--spotify-elevated);
    color: var(--spotify-white);
}

.lesson-item.active {
    background: var(--spotify-base);
    color: var(--spotify-white);
    font-weight: 600;
}

.lesson-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--spotify-subdued);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.lesson-checkbox:hover {
    border-color: var(--spotify-white);
    transform: scale(1.1);
}

.lesson-item.completed .lesson-checkbox {
    background: var(--spotify-green);
    border-color: var(--spotify-green);
}

.lesson-item.completed .lesson-checkbox::after {
    content: '✓';
    color: var(--spotify-black);
    font-size: 0.7rem;
    font-weight: 900;
}

.lesson-icon {
    font-size: 1.1rem;
    opacity: 0.7;
}

.lesson-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lesson-duration {
    font-size: 0.75rem;
    color: var(--spotify-gray);
    flex-shrink: 0;
}

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: var(--spotify-dark);
    width: 100%;
    max-width: 100%;
    min-width: 400px;
    box-sizing: border-box;
}

/* Allow scrolling on mobile and tablets */
@media (max-width: 1024px) {
    .content-area {
        overflow-y: visible;
        overflow-x: hidden;
        height: auto;
        min-height: 100%;
        background: var(--spotify-dark);
        min-width: 0;
    }
}

/* Welcome Screen */
.welcome-screen {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4rem 3rem 3rem 3rem;
    overflow-y: auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 1024px) {
    .welcome-screen {
        overflow-y: visible;
        min-height: 100%;
        background: var(--spotify-dark);
    }
}

.welcome-content {
    max-width: 900px;
    text-align: center;
    padding-bottom: 3rem;
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.welcome-content h1 {
    font-size: 5rem;
    font-weight: 900;
    color: var(--spotify-white);
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    line-height: 1;
    letter-spacing: -2px;
}

.welcome-content > p {
    font-size: 1.5rem;
    color: var(--spotify-gray);
    margin-bottom: 3rem;
    font-weight: 400;
}

/* Empty Library Message */
.empty-library-message {
    background: var(--spotify-elevated);
    border-radius: 12px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.empty-message-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.empty-library-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--spotify-white);
}

.empty-library-message p {
    font-size: 1rem;
    color: var(--spotify-gray);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.empty-library-message .privacy-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--spotify-green);
    margin-top: 1.5rem;
    font-weight: 500;
}

.empty-library-message .tagline {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--spotify-white);
    margin-top: 1rem;
    font-style: italic;
}

/* Features and Use Cases Sections */
.features-detailed,
.use-cases {
    margin: 3rem auto;
    max-width: 900px;
    text-align: left;
}

.features-detailed h2,
.use-cases h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--spotify-white);
    text-align: center;
    letter-spacing: -0.5px;
}

.feature-block {
    background: var(--spotify-elevated);
    border-radius: 8px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
}

.feature-block:hover {
    background: var(--spotify-base);
    transform: translateY(-2px);
}

.feature-block h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--spotify-white);
    line-height: 1.3;
}

.feature-block p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--spotify-gray);
    margin: 0;
}

.use-cases-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.use-cases-list li {
    background: var(--spotify-elevated);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--spotify-gray);
    transition: all 0.2s ease;
}

.use-cases-list li:hover {
    background: var(--spotify-base);
    transform: translateX(4px);
}

.use-cases-list li strong {
    color: var(--spotify-white);
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

/* FAQ Section */
.faq-section {
    margin: 3rem auto 3rem auto;
    max-width: 800px;
    text-align: left;
}

.faq-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--spotify-white);
    text-align: center;
    letter-spacing: -0.5px;
}

.faq-item {
    background: var(--spotify-elevated);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    background: var(--spotify-base);
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.25rem 1.5rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: var(--spotify-white);
    transition: all 0.2s ease;
}

.faq-question h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--spotify-green);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-question[aria-expanded="true"] .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-question[aria-expanded="true"] + .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem 1.5rem;
}

.faq-answer p {
    margin: 0 0 0.75rem 0;
    color: var(--spotify-gray);
    line-height: 1.6;
}

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

.faq-answer ul {
    margin: 0.75rem 0 0 0;
    padding-left: 0;
    list-style: none;
    color: var(--spotify-gray);
}

.faq-answer li {
    padding: 0.375rem 0;
    line-height: 1.5;
}

.faq-answer strong {
    color: var(--spotify-white);
    font-weight: 600;
}

/* Support Section */
.support-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    margin-bottom: 2rem;
}

.support-text {
    font-size: 0.95rem;
    color: var(--spotify-gray);
    margin-bottom: 1rem;
    font-weight: 500;
}

.coffee-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #FFDD00;
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 221, 0, 0.3);
}

.coffee-btn:hover {
    background: #FFE74C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 221, 0, 0.4);
}

.coffee-btn:active {
    transform: translateY(0);
}

.coffee-btn svg {
    width: 20px;
    height: 20px;
}

/* Footer Credit */
.footer-credit {
    text-align: center;
    padding: 1rem 0;
    font-size: 0.875rem;
    color: var(--spotify-gray);
}

.footer-credit a {
    color: var(--spotify-white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-credit a:hover {
    color: var(--spotify-green);
}

/* Course Library */
.course-library {
    margin-bottom: 3rem;
    text-align: left;
    width: 100%;
    max-width: 100%;
}

.course-library h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--spotify-white);
    letter-spacing: -0.5px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.course-card {
    background: var(--spotify-elevated);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.course-card:hover {
    background: var(--spotify-base);
}

.course-card.active {
    background: var(--spotify-base);
    outline: 2px solid var(--spotify-green);
}

.course-card-header {
    margin-bottom: 1rem;
}

.course-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    color: var(--spotify-white);
}

.course-duration {
    font-size: 0.8rem;
    color: var(--spotify-gray);
    font-weight: 500;
    margin: 0;
}

.course-card-progress {
    margin-bottom: 1rem;
}

.course-card .progress-bar {
    height: 4px;
    margin-bottom: 0.5rem;
}

.course-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.course-last-watched {
    font-size: 0.75rem;
    color: var(--spotify-gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Lesson Content */
.lesson-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lesson-header {
    padding: 1.5rem 2rem;
    background: var(--spotify-elevated);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

#lessonTitle {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.lesson-body {
    flex: 1;
    /* padding: 2rem; */
    overflow-y: auto;
}

/* Video Player - Shared for both desktop and mobile */
.video-wrapper-shared {
    height: auto;
    margin: 0 auto;
    display: block;
    padding: 1rem;
}

.video-container {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

/* Keyboard Shortcut Overlays */
#seekOverlay,
#volumeOverlay {
    transition: opacity 0.2s ease;
}

/* Video End Overlay */
.video-end-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: fadeIn 0.3s ease;
}

.video-end-content {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
}

.video-end-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--spotify-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--spotify-black);
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.video-end-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--spotify-white);
}

.video-end-actions .btn-primary {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* PDF Viewer */
.pdf-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.pdf-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--spotify-elevated);
    border-radius: 8px;
}

.pdf-controls button {
    background: var(--spotify-base);
    color: var(--spotify-white);
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pdf-controls button:hover:not(:disabled) {
    background: var(--spotify-subdued);
}

.pdf-controls button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pdf-controls span {
    font-weight: 600;
    color: var(--spotify-gray);
}

.pdf-canvas {
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

/* HTML Content */
.html-content {
    max-width: 900px;
    margin: 0 auto;
    background: var(--spotify-elevated);
    padding: 2rem;
    border-radius: 8px;
}

.html-content iframe {
    width: 100%;
    min-height: 600px;
    border: none;
    border-radius: 4px;
}

/* Download Section */
.download-section {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--spotify-elevated);
    border-radius: 8px;
}

.download-section svg {
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.download-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.download-section p {
    color: var(--spotify-gray);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Lesson Navigation */
.lesson-navigation {
    padding: 1.5rem 2rem;
    background: var(--spotify-elevated);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--spotify-gray);
}

.empty-state svg {
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1rem;
    font-weight: 500;
}

/* Custom Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--spotify-elevated);
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre-line;
    color: var(--spotify-gray);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--spotify-gray);
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--spotify-subdued);
    border-top-color: var(--spotify-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hide elements */
#selectFolderBtn.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 280px;
    }

    .welcome-screen {
        padding: 1rem;
        overflow-y: visible;
    }

    .welcome-content h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    /* Header adjustments */
    .header-content {
        padding: 0 1rem;
        gap: 0.75rem;
    }

    .logo-container {
        flex: 1;
        min-width: 0;
        gap: 0.5rem;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
    }

    .logo {
        font-size: 1.05rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Hide full button text, show short text */
    .btn-text {
        display: none;
    }

    .btn-text-mobile {
        display: inline;
    }

    .btn-primary {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    .btn-primary svg {
        width: 15px;
        height: 15px;
    }

    /* Hide sidebar on mobile, show below video instead */
    .sidebar {
        display: none !important;
    }

    /* Hide overlay on mobile */
    .sidebar-overlay {
        display: none !important;
    }

    /* Mobile layout: scrollable page with video section */
    .lesson-content {
        display: flex;
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .lesson-header {
        display: none; /* Hide desktop header on mobile */
    }

    .lesson-body {
        display: flex;
        flex-direction: column;
        height: auto;
        overflow-y: visible;
        padding: 0;
        min-height: 0;
    }

    /* Adjust video wrapper for mobile */
    .video-wrapper-shared {
        margin: 0;
        background: var(--spotify-elevated);
    }

    /* Show mobile lesson title and controls */
    .mobile-lesson-title {
        display: block !important;
    }

    .mobile-video-controls {
        display: flex !important;
    }

    /* Scrollable course navigation */
    .mobile-course-nav {
        display: block !important;
        flex: none;
        overflow-y: visible;
        background: var(--spotify-dark);
        padding: 1rem;
    }

    /* Hide desktop lesson navigation on mobile */
    .lesson-navigation {
        display: none !important;
    }

    /* Welcome screen adjustments */
    .welcome-screen {
        padding: 2rem 1.25rem 2rem 1.25rem;
        align-items: flex-start;
        min-height: 100%;
    }

    .welcome-content {
        margin-top: 0;
        margin-bottom: 0;
        padding-bottom: 2rem;
        width: 100%;
    }

    .welcome-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1.25rem;
    }

    .welcome-content > p {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }

    .empty-library-message {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }

    .empty-library-message h3 {
        font-size: 1.25rem;
    }

    .empty-message-icon {
        font-size: 3rem;
    }

    .course-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
    }

    .course-library {
        padding: 0;
        margin-left: 0;
        margin-right: 0;
    }

    /* Mobile video title and buttons */
    .mobile-lesson-title {
        font-size: 0.95rem;
        font-weight: 600;
        padding: 1rem 1rem;
        color: var(--spotify-white);
        background: var(--spotify-elevated);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        line-height: 1.4;
    }

    .mobile-video-controls {
        padding: 1rem;
        background: var(--spotify-elevated);
        display: flex;
        flex-direction: column;
        gap: 0.875rem;
    }

    .mobile-video-controls .btn-complete {
        width: 100%;
        justify-content: center;
    }

    .mobile-nav-buttons {
        display: flex;
        gap: 0.75rem;
    }

    .mobile-nav-buttons .btn-nav {
        flex: 1;
        justify-content: center;
    }

    .video-end-content {
        padding: 1.5rem;
    }

    .video-end-content h3 {
        font-size: 1.5rem;
    }

    .video-end-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    /* Course cards */
    .course-card {
        padding: 1.25rem;
    }

    .course-card h3 {
        font-size: 1rem;
    }

    /* Features and Use Cases mobile styles */
    .features-detailed,
    .use-cases {
        margin: 2rem auto;
    }

    .features-detailed h2,
    .use-cases h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .feature-block {
        padding: 1.25rem;
    }

    .feature-block h3 {
        font-size: 1.1rem;
    }

    .use-cases-list li {
        padding: 1.25rem;
    }

    /* FAQ Section mobile styles */
    .faq-section {
        margin: 2rem auto;
    }

    .faq-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .faq-question {
        padding: 1rem 1.25rem;
    }

    .faq-question h3 {
        font-size: 0.95rem;
    }

    .faq-toggle {
        font-size: 1.25rem;
    }

    .faq-answer {
        padding: 0 1.25rem;
    }

    .faq-question[aria-expanded="true"] + .faq-answer {
        padding: 0 1.25rem 1rem 1.25rem;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 52px;
    }

    .header-content {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }

    .logo-container {
        gap: 0.375rem;
    }

    .logo-icon {
        width: 24px;
        height: 24px;
    }

    .logo {
        font-size: 0.95rem;
    }

    .btn-primary {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }

    .btn-primary svg {
        width: 14px;
        height: 14px;
    }

    .welcome-screen {
        padding: 1.5rem 0.75rem 2rem 0.75rem;
        min-height: 100%;
    }

    .welcome-content {
        padding-bottom: 2rem;
        width: 100%;
    }

    .welcome-content h1 {
        font-size: 2rem;
    }

    .welcome-content > p {
        font-size: 1rem;
    }

    .btn-large {
        padding: 0.875rem 2rem;
        font-size: 0.9rem;
    }

    .empty-library-message {
        padding: 1.5rem 1rem;
    }

    .lesson-header {
        padding: 0.75rem;
    }

    /* .lesson-body {
        padding: 0.75rem;
    } */

    .video-end-content {
        padding: 1rem;
    }

    .video-end-actions .btn-primary {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}
