/* ═══════════════════════════════════════════════════════════════════════════
   O'Reilly Media Center (v3 Pro) — Design System & Stylesheet
   Dark Void Aesthetic with Glassmorphism, Neon Accents, and Smooth Micro-Animations
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --bg-void:       #090a0f;
    --bg-surface:    #12141c;
    --bg-card:       rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border:        rgba(255, 255, 255, 0.08);
    --border-bright: rgba(255, 255, 255, 0.18);
    
    --accent:        #7c5af0;
    --accent-glow:   rgba(124, 90, 240, 0.35);
    --accent-hover:  #9b7dff;
    --green:         #1db954;
    --green-glow:    rgba(29, 185, 84, 0.3);
    --red:           #f85149;
    --yellow:        #e3b341;
    
    --text-main:     #ffffff;
    --text-muted:    #8b949e;
    --text-sub:      #6e7681;
    
    --radius-sm:     8px;
    --radius-md:     14px;
    --radius-lg:     20px;
    --radius-full:   9999px;
    
    --transition:    all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-void);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── App Layout ──────────────────────────────────────────────────────────── */
.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 2rem;
    background: rgba(18, 20, 28, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.brand-logo {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 8px var(--accent));
}

.brand-tag {
    font-size: 0.7rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    margin-left: 4px;
}

/* Nav Pills & Header Tabs */
.header-nav-tabs, .nav-pills {
    display: flex;
    align-items: center;
    list-style: none;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.25rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-bright);
    gap: 0.3rem;
}

.nav-tab-btn, .nav-pills li {
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    outline: none;
}

.nav-tab-btn:hover, .nav-pills li:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-tab-btn.active, .nav-pills li.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent-hover);
    box-shadow: 0 4px 14px var(--accent-glow);
}

/* Header Actions & Settings Icon Button */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icon-btn, #header-settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-bright);
    color: var(--text-main);
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    box-shadow: none;
}

.icon-btn:hover, #header-settings-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(124, 90, 240, 0.3);
}

/* User Profile Pill */
.user-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.user-pill:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

/* ── Main Body & Views ───────────────────────────────────────────────────── */
.main-body {
    flex: 1;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Full page expansion for Board Studio and Immersive Player */
.main-body:has(#view-boards.active),
.main-body:has(#view-player.active) {
    padding: 0;
    max-width: 100vw;
    margin: 0;
}

.view {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.view.active {
    display: block;
}

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

/* ── Library Controls Bar ────────────────────────────────────────────────── */
.library-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
}

.filter-pill {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-pill:hover {
    color: #fff;
    border-color: var(--border-bright);
}

.filter-pill.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.local-search {
    position: relative;
    width: 320px;
}

.local-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.local-search input {
    width: 100%;
    padding: 0.55rem 1rem 0.55rem 2.2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}

.local-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Shelf Sections ──────────────────────────────────────────────────────── */
.shelf-section {
    margin-bottom: 2.5rem;
}

.shelf-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Media Card Grids & Carousels ────────────────────────────────────────── */
.media-grid, .shelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.horizontal-scroll, #related-carousel {
    display: flex !important;
    gap: 1.2rem;
    overflow-x: auto;
    padding: 0.5rem 0.2rem 1.2rem 0.2rem;
    scroll-behavior: smooth;
}

.horizontal-scroll .card, #related-carousel .card {
    min-width: 220px;
    max-width: 240px;
    flex-shrink: 0;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 0 1rem 0;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 340px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
}

.card-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.card-type-badge.course { background: rgba(124, 90, 240, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.card-type-badge.audiobook { background: rgba(29, 185, 84, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }
.card-type-badge.book { background: rgba(210, 153, 34, 0.85); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }

.card-cover-art {
    height: 220px;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 0.8rem;
    overflow: hidden;
    position: relative;
}

.card-cover-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-cover-art img {
    transform: scale(1.06);
}

.card-cover-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin-bottom: 0.8rem;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    margin: 0 1rem 0.4rem 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Card Progress Bar */
.card-progress-bar-bg {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    margin-top: 1rem;
    overflow: hidden;
}

.card-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--green));
    border-radius: var(--radius-full);
}

/* Card Play Hover Overlay */
.card-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 10, 15, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.card:hover .card-play-overlay {
    opacity: 1;
}

/* ── Loading Skeletons ───────────────────────────────────────────────────── */
.skeleton-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 0 1rem 0;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.skeleton-img {
    height: 220px;
    width: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
}

.skeleton-text {
    height: 14px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    margin: 1rem 1rem 0.4rem 1rem;
    border-radius: 4px;
}
.skeleton-text.short { width: 60%; }
.skeleton-btn { 
    height: 32px; 
    margin: 0.8rem 1rem 0 1rem; 
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Empty States ────────────────────────────────────────────────────────── */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-bright);
    border-radius: var(--radius-md);
    text-align: center;
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(124, 90, 240, 0.3));
}

.empty-state-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-state-desc {
    color: var(--text-muted);
    max-width: 400px;
    font-size: 0.95rem;
}

.play-circle-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--accent-glow);
    transition: var(--transition);
}

.play-circle-btn:hover {
    transform: scale(1.1);
}

/* ── Discover View ───────────────────────────────────────────────────────── */
.discover-hero {
    background: linear-gradient(135deg, rgba(124, 90, 240, 0.15), rgba(18, 20, 28, 0.9));
    border: 1px solid var(--border-bright);
    padding: 3rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2.5rem;
    text-align: center;
}

.discover-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.discover-hero p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.discover-search-box {
    display: flex;
    max-width: 650px;
    margin: 0 auto;
    gap: 0.6rem;
}

.discover-search-box input {
    flex: 1;
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-bright);
    background: var(--bg-surface);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: #fff;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-bright);
}

.btn.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn.primary:hover {
    background: var(--accent-hover);
}

.btn.warning { background: var(--yellow); color: #000; border-color: var(--yellow); }
.btn.danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn.icon-btn { padding: 0.5rem 0.8rem; }

/* ── Unified Player Layout ───────────────────────────────────────────────── */
.player-header-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.player-heading {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.player-badge {
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
    background: var(--accent-glow);
    color: var(--accent-hover);
    border: 1px solid var(--accent);
}

.media-layout {
    display: flex;
    gap: 1.2rem;
    min-height: 380px;
    margin-bottom: 1.5rem;
}

#audio-container {
    min-height: 280px;
}

.flex-grow { flex: 1; }

/* Sidebar Module / Track Panel */
.sidebar-panel {
    width: 320px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.episode-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.episode-section-heading {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: var(--text-sub);
    margin: 1rem 0 0.5rem 0.5rem;
    letter-spacing: 0.5px;
}

.episode-item {
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
    margin-bottom: 4px;
}

.episode-item:hover {
    background: var(--bg-card-hover);
    color: #fff;
}

.episode-item.active {
    background: var(--accent-glow);
    color: var(--accent-hover);
    font-weight: 700;
    border: 1px solid rgba(124, 90, 240, 0.4);
}

.episode-item.completed::after {
    content: "✓";
    margin-left: auto;
    color: var(--green);
    font-weight: bold;
}

.episode-item.unavailable {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Custom Video Player ─────────────────────────────────────────────────── */
.video-wrapper {
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.note-stage-hoverable {
    cursor: cell;
}

.note-stage-hoverable video {
    cursor: cell;
}

/* Ensure controls, buttons, scrubbers and selects retain standard cursor */
.note-stage-hoverable .custom-controls,
.note-stage-hoverable .custom-controls *,
.note-stage-hoverable .audio-controls-box,
.note-stage-hoverable .audio-controls-box * {
    cursor: default;
}

.note-stage-hoverable button,
.note-stage-hoverable input,
.note-stage-hoverable select,
.note-stage-hoverable .ctrl-btn,
.note-stage-hoverable .scrubber {
    cursor: pointer !important;
}

.media-hover-note-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(124, 90, 240, 0.92);
    backdrop-filter: blur(10px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-6px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 30;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.video-wrapper:hover .media-hover-note-btn,
.audiobook-player-card:hover .media-hover-note-btn {
    opacity: 1;
    transform: translateY(0);
}

.media-hover-note-btn:hover {
    background: var(--accent);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px var(--accent-glow);
}

/* ── 📝 Floating Popup Modal CSS ─────────────────────────────────────────── */
.note-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.note-modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-lg);
    width: 560px;
    max-width: 92vw;
    padding: 1.6rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.note-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.8rem;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: #fff;
}

.video-wrapper video {
    width: 100%;
    height: 360px;
    max-height: 420px;
    display: block;
}

.custom-controls {
    padding: 1rem;
    background: rgba(18, 20, 28, 0.95);
    border-top: 1px solid var(--border);
}

.controls-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.ctrl-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.ctrl-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-bright);
}

.ctrl-btn.play-pause-btn {
    background: var(--accent);
    border-color: var(--accent);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctrl-btn.play-pause-btn.large {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
}

.time-display {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
    min-width: 95px;
}

.scrubber {
    flex: 1;
    accent-color: var(--accent);
    cursor: pointer;
    height: 6px;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.speed-control select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    outline: none;
}

/* ── Audiobook Player Showcase ───────────────────────────────────────────── */
#audio-container {
    min-height: 160px;
    height: 160px;
    margin-bottom: 1.2rem;
}

#audio-container .sidebar-panel {
    height: 160px;
}

.audiobook-player-card {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.4rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.audiobook-art-stage {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0;
    min-width: 230px;
    max-width: 280px;
}

.audiobook-cover-wrapper {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(124, 90, 240, 0.2), rgba(29, 185, 84, 0.2));
    border: 1px solid var(--border-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 0;
}

.equalizer-visualizer {
    position: absolute;
    bottom: 4px;
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 12px;
}

.equalizer-visualizer .bar {
    width: 2px;
    height: 4px;
    background: var(--green);
    border-radius: 1px;
    transition: height 0.2s ease;
}

.equalizer-visualizer.playing .bar:nth-child(1) { animation: bounce 0.6s infinite alternate; }
.equalizer-visualizer.playing .bar:nth-child(2) { animation: bounce 0.8s infinite alternate 0.2s; }
.equalizer-visualizer.playing .bar:nth-child(3) { animation: bounce 0.5s infinite alternate 0.1s; }
.equalizer-visualizer.playing .bar:nth-child(4) { animation: bounce 0.7s infinite alternate 0.3s; }
.equalizer-visualizer.playing .bar:nth-child(5) { animation: bounce 0.9s infinite alternate 0.15s; }

@keyframes bounce {
    from { height: 3px; }
    to   { height: 11px; }
}

.now-playing-title {
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 0.1rem;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.now-playing-chapter {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: left;
}

.audio-controls-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: none;
}

.audio-scrubber-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0;
}

.audio-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
}

/* ── EPUB Reader Container ───────────────────────────────────────────────── */
.reader-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.reader-theme-picker {
    display: flex;
    gap: 0.3rem;
}

.theme-btn {
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    cursor: pointer;
}

.theme-btn.dark { background: #12141c; color: #fff; }
.theme-btn.sepia { background: #f4ecd8; color: #5b4636; }
.theme-btn.light { background: #ffffff; color: #000; }

.epub-viewer-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    height: 600px;
    padding: 1.5rem;
}

#viewer {
    width: 100%;
    height: 100%;
}

/* ── Downloads Terminal ──────────────────────────────────────────────────── */
.downloads-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.download-input-row {
    display: flex;
    gap: 0.8rem;
    margin: 1.5rem 0 2rem 0;
}

.download-input-row input {
    flex: 1;
    padding: 0.85rem 1.2rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 0.95rem;
    outline: none;
}

.terminal-card {
    background: #050608;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.04);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: monospace;
    margin-left: 10px;
}

.log-viewer {
    padding: 1.2rem;
    font-family: "Cascadia Code", "Fira Code", Monaco, monospace;
    font-size: 0.85rem;
    color: #3fb950;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.5;
}

/* ── Modal Overlay ───────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

.input-group {
    margin-bottom: 1.2rem;
}

.input-group label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 0.9rem;
    outline: none;
}

.form-error {
    color: var(--red);
    font-size: 0.82rem;
    margin-bottom: 1rem;
}

.full-width { width: 100%; }

/* Scrollbar Customization */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

/* ── 📝 Active Learner Notebook & Voice Studio ───────────────────────────── */
.notebook-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.4rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.notebook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.notebook-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.notebook-title h2 {
    font-size: 1.1rem;
    font-weight: 800;
}

.notebook-lang-toggle {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 4px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.notebook-input-card {
    background: rgba(18, 20, 28, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
    margin-bottom: 1rem;
}

.input-top-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.active-ts-pill {
    background: rgba(124, 90, 240, 0.2);
    color: var(--accent-hover);
    border: 1px solid rgba(124, 90, 240, 0.4);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    font-family: monospace;
}

.mic-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    color: #fff;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.mic-btn:hover {
    background: var(--bg-card-hover);
}

.mic-btn.recording {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: #ef4444;
    animation: micPulse 1.2s infinite alternate;
}

@keyframes micPulse {
    from { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    to   { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

#note-text-input {
    width: 100%;
    height: 90px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 0.8rem;
    font-size: 0.92rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: var(--transition);
}

#note-text-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.notebook-export-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.export-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.export-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.empty-notes-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

.note-item-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    transition: var(--transition);
}

.note-item-card:hover {
    border-color: var(--border-bright);
    background: rgba(255, 255, 255, 0.04);
}

.note-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.note-ts-badge {
    background: rgba(124, 90, 240, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(124, 90, 240, 0.5);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: monospace;
    cursor: pointer;
    transition: var(--transition);
}

.note-ts-badge:hover {
    background: var(--accent);
    color: #fff;
}

.note-item-actions {
    display: flex;
    gap: 0.5rem;
}

.note-content-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e2e8f0;
    white-space: pre-wrap;
}

/* 🔴 Red Flagged Low-Confidence / Modified Word Badges */
.word-flagged {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
    border-bottom: 2px dashed #ef4444;
    border-radius: 4px;
    padding: 1px 5px;
    font-weight: 600;
    display: inline-block;
    margin: 0 1px;
}

/* ── Toast Notifications & Live Download Widget ─────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    background: var(--bg-surface);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.4rem;
    color: #fff;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 400px;
}

.toast.success { border-color: var(--green); background: rgba(18, 20, 28, 0.95); }
.toast.warning { border-color: var(--yellow); background: rgba(18, 20, 28, 0.95); }
.toast.error { border-color: var(--red); background: rgba(18, 20, 28, 0.95); }

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.floating-dl-status {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 1500;
}

/* ⚡ FLOATING LIVE DOWNLOAD PROGRESS WIDGET */
.floating-dl-widget {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 380px;
    background: rgba(18, 20, 28, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--neon-accent);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(29, 185, 84, 0.15);
    z-index: 2000;
    animation: widgetSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #fff;
}

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

.dl-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.dl-widget-title-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    overflow: hidden;
}

.dl-widget-spinner {
    font-size: 1.1rem;
    animation: spinPulse 1.5s infinite linear;
}

@keyframes spinPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.dl-widget-title {
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dl-widget-actions {
    display: flex;
    gap: 0.4rem;
}

.dl-widget-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dl-widget-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.dl-widget-btn.danger:hover {
    background: var(--red);
    border-color: var(--red);
}

.dl-widget-log-status {
    font-size: 0.78rem;
    font-family: monospace;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.7rem;
}

.dl-widget-progress-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.dl-widget-progress-bar {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, #1db954, #3fb950);
    border-radius: 3px;
    transition: width 0.3s ease;
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* ── Discover Filter Chips ────────────────────────────────────────────────── */
.discover-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.discover-filter-chip:hover {
    border-color: var(--accent);
    color: #fff;
    background: rgba(124, 90, 240, 0.1);
}

.discover-filter-chip:has(input:checked) {
    background: rgba(124, 90, 240, 0.18);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 8px rgba(124, 90, 240, 0.3);
}

.discover-filter-chip input[type="checkbox"] {
    display: none;
}

.card-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--yellow);
    font-weight: 600;
}

.card-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ── Unified Search Bar & Dropdown ───────────────────────────────────────── */
.unified-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 520px;
    margin: 0 1.5rem;
    display: flex;
    align-items: center;
}

.unified-search-wrapper .search-icon {
    position: absolute;
    left: 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    pointer-events: none;
}

#unified-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 0.55rem 2.4rem 0.55rem 2.6rem;
    font-size: 0.88rem;
    color: #fff;
    outline: none;
    transition: var(--transition);
}

#unified-search-input:focus {
    background: rgba(18, 20, 28, 0.95);
    border-color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
}

.search-clear-btn {
    position: absolute;
    right: 0.9rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
}
.search-clear-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

.search-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0;
    right: 0;
    background: rgba(18, 20, 28, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 20px var(--accent-glow);
    max-height: 480px;
    overflow-y: auto;
    z-index: 200;
    display: flex;
    flex-direction: column;
}

.search-dropdown-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-hover);
    padding: 0.7rem 1rem 0.3rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: var(--transition);
}

.search-dropdown-item:hover {
    background: rgba(124, 90, 240, 0.12);
}

.search-dropdown-item .item-cover {
    width: 36px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.search-dropdown-item .item-info {
    flex: 1;
    overflow: hidden;
}

.search-dropdown-item .item-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown-item .item-sub {
    font-size: 0.76rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Header Actions & Auth Pill ─────────────────────────────────────────── */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.auth-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.auth-status-pill .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.auth-status-pill.connected {
    border-color: rgba(29, 185, 84, 0.4);
    background: rgba(29, 185, 84, 0.08);
    color: #1db954;
}

.auth-status-pill.connected .status-dot {
    background: #1db954;
    box-shadow: 0 0 8px #1db954;
}

.auth-status-pill.disconnected {
    border-color: rgba(248, 81, 73, 0.4);
    background: rgba(248, 81, 73, 0.08);
    color: #f85149;
}

.auth-status-pill.disconnected .status-dot {
    background: #f85149;
    box-shadow: 0 0 8px #f85149;
}

.auth-status-pill:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}

/* ── Player Sidebar Sub-Tabs ────────────────────────────────────────────── */
.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.sidebar-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-tab.active {
    color: var(--accent-hover);
    border-bottom-color: var(--accent);
    background: rgba(124, 90, 240, 0.08);
}

.sidebar-tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* ── Note Count Badge on Media Cards ─────────────────────────────────────── */
.card-note-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(124, 90, 240, 0.85);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 4;
}

/* ── 🎨 BOARDS & INFINITE CANVAS STUDIO ────────────────────────────────── */
#view-boards {
    display: none;
    flex-direction: column;
    height: calc(100vh - 65px);
    padding: 0.8rem 1.2rem 1.2rem 1.2rem;
    box-sizing: border-box;
}

#view-boards.active {
    display: flex;
}

#board-canvas-container {
    position: relative;
    flex: 1;
    width: 100%;
    background-color: #0d0f17;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    user-select: none;
}

/* Dynamic Cursor States */
#board-canvas-container.pan-mode {
    cursor: grab;
}

#board-canvas-container.pan-mode:active {
    cursor: grabbing;
}

#board-canvas-container.pen-mode {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%237c5af0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M12 19l7-7 3 3-7 7-3-3z'></path><path d='M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z'></path><path d='M2 2l7.586 7.586'></path><circle cx='11' cy='11' r='2'></circle></svg>") 0 24, crosshair !important;
}

#board-canvas-container.arrow-mode {
    cursor: cell;
}

#board-drawing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#board-canvas-container.pen-mode #board-drawing-canvas {
    pointer-events: auto;
}

#board-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

#board-cards-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

/* Draggable Board Card */
.board-card {
    position: absolute;
    width: 260px;
    min-height: 140px;
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    padding: 1rem;
    cursor: move;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.board-card:hover {
    border-color: var(--accent-hover);
    box-shadow: 0 15px 40px rgba(124, 90, 240, 0.25);
}

.board-card.selected {
    border: 2px solid var(--accent);
    box-shadow: 0 0 20px rgba(124, 90, 240, 0.5);
}

.board-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.board-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    outline: none;
    width: 80%;
}

.board-card-content {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    outline: none;
    min-height: 60px;
    white-space: pre-wrap;
}

.canvas-tools-bar .tool-btn {
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.canvas-tools-bar .tool-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.canvas-tools-bar .tool-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent-hover);
}

/* ── Universal Perfectly-Centered Modals ─────────────────────────────────── */
.modal, .note-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.78) !important;
    backdrop-filter: blur(12px) !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000 !important;
}

.modal.active, .note-modal-overlay.active {
    display: flex !important;
}

.modal-content, .note-modal-card {
    margin: auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 35px var(--accent-glow) !important;
}

/* ── 🚀 FLOATING OVERLAY DOCK & ENDLESS CANVAS TOOLS ────────────────────── */
#board-top-controls {
    position: absolute;
    top: 1.2rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    z-index: 100;
    pointer-events: none;
}

#board-top-controls > * {
    pointer-events: auto;
}

.floating-board-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(18, 20, 28, 0.9);
    backdrop-filter: blur(20px);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.board-select-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-bright);
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-full);
}

.board-select-pill select {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    max-width: 160px;
}

.floating-canvas-dock {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(18, 20, 28, 0.9);
    backdrop-filter: blur(20px);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(124, 90, 240, 0.15);
    transition: all 0.3s ease-in-out;
}

.floating-canvas-dock.collapsed {
    opacity: 0.25;
    transform: translateY(-20px);
    pointer-events: none;
}

.dock-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 0.2rem;
}

.dock-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-full);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.dock-btn:hover, .icon-expand-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-1px);
}

.dock-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.dock-btn.primary-dock {
    background: linear-gradient(135deg, var(--accent), #9b51e0);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.icon-expand-btn .btn-label {
    max-width: 120px;
    opacity: 1;
    transition: all 0.25s ease;
}

.floating-pen-palette {
    position: absolute;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(18, 20, 28, 0.95);
    backdrop-filter: blur(16px);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--accent);
    box-shadow: 0 8px 30px rgba(0,0,0,0.7);
    z-index: 101;
}

.pen-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.pen-color-dot:hover, .pen-color-dot.active {
    transform: scale(1.25);
    border-color: #fff;
}

.pen-size-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    cursor: pointer;
}

.pen-size-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Card Text Selection Guard */
.board-card {
    user-select: none;
}

.board-card-title[contenteditable="true"], .board-card-content[contenteditable="true"] {
    user-select: text;
}

/* 📖 EPUB Reader Styling */
#epub-container {
    width: 100%;
    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: 1rem;
}

.reader-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.8rem;
}

.epub-viewer-wrapper {
    flex: 1;
    width: 100%;
    height: 720px;
    min-height: 620px;
    position: relative;
    background: #12141c;
    overflow: hidden;
}

#viewer {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

#viewer iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

/* ── 🌙 Premium Dark Select & Option Controls ────────────────────────── */
select, .speed-select, #vid-speed-select, #aud-speed-select, #yt-speed-select, #discover-sort-select {
    background: #181b26 !important;
    color: #ffffff !important;
    border: 1px solid var(--border-bright) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    outline: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.2s ease !important;
}

select:hover, select:focus,
.speed-select:hover, .speed-select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 12px rgba(124, 90, 240, 0.35) !important;
}

select option,
.speed-select option {
    background-color: #12141c !important;
    color: #ffffff !important;
    padding: 0.6rem 0.8rem !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
}

select option:hover,
select option:focus,
select option:checked {
    background-color: var(--accent) !important;
    color: #ffffff !important;
}

/* 🔔 TOAST NOTIFICATIONS DESIGN SYSTEM */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-notification {
    pointer-events: auto;
    background: rgba(18, 20, 28, 0.94);
    backdrop-filter: blur(16px);
    border: 1px solid var(--accent);
    border-radius: var(--radius-full);
    padding: 0.7rem 1.3rem;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(124, 90, 240, 0.3);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.active {
    transform: translateY(0);
    opacity: 1;
}

/* 💬 CUSTOM INPUT MODAL DESIGN SYSTEM */
#custom-input-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-input-card {
    max-width: 440px;
    width: 90%;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: #12141c;
    border: 1px solid var(--border-bright);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    text-align: center;
}

#youtube-stage { min-height: 500px; }

/* 🎨 VISUAL BOARDS & CANVAS SYSTEM */
#view-boards {
    width: 100%;
    height: calc(100vh - 70px);
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(30, 35, 55, 0.4) 0%, rgba(11, 13, 20, 0.95) 100%),
                radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 100% 100%, 24px 24px;
    user-select: none;
}

#board-canvas-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#board-canvas-container.pan-mode {
    cursor: grab;
}
#board-canvas-container.pan-mode:active {
    cursor: grabbing;
}

#board-drawing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
#board-canvas-container.pen-mode #board-drawing-canvas {
    pointer-events: auto;
    cursor: crosshair;
}

#board-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

#board-cards-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}
#board-cards-layer > .board-card {
    pointer-events: auto;
    position: absolute;
    width: 250px;
    background: rgba(30, 32, 38, 0.5);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}
.board-card:hover, .board-card.clickable:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    z-index: 5;
}
.board-card.clickable { cursor: pointer; }
.board-card-cover { width: 100%; height: 120px; object-fit: cover; border-radius: 12px; margin-bottom: 0.8rem; border: 1px solid rgba(255,255,255,0.05); }
.board-card-cover.placeholder { background: linear-gradient(135deg, rgba(124,90,240,0.3), rgba(18,20,28,0.6)); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.board-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }
.board-card-title { font-weight: 600; font-size: 0.95rem; line-height: 1.3; color: #f5f5f7; letter-spacing: -0.01em; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif; max-height: 2.6em; overflow: hidden; }
.board-card .del-card-btn { opacity: 0; transition: opacity 0.2s; background: rgba(255,255,255,0.1); border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; padding: 0; }
.board-card:hover .del-card-btn { opacity: 1; }
.board-card .card-type-badge { position: static; font-size: 0.65rem; padding: 0.2rem 0.6rem; border-radius: 20px; background: rgba(255,255,255,0.05); backdrop-filter: blur(10px); }

/* Floating Controls & Dock */
#board-top-controls {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    pointer-events: none;
}
#board-top-controls > * {
    pointer-events: auto;
}

.floating-board-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(18, 22, 34, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-full);
    padding: 0.4rem 0.8rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.board-select-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    padding: 0.2rem 0.6rem;
}
.board-select-pill select {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
}

.floating-canvas-dock {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(18, 22, 34, 0.9);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-full);
    padding: 0.4rem 0.8rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.dock-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}
.dock-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.dock-btn.active {
    background: var(--neon-accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(124, 90, 240, 0.4);
}
.dock-divider {
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 0.2rem;
}

.floating-pen-palette {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(18, 22, 34, 0.9);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-full);
    padding: 0.5rem 1.2rem;
    z-index: 25;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.pen-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.pen-color-dot.active {
    border-color: #fff;
    transform: scale(1.25);
}
.pen-size-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}
.pen-size-btn.active {
    background: var(--neon-accent);
    color: #fff;
    border-color: var(--neon-accent);
}

/* Notion-Style Visual Cards */
.board-card-type-badge {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: #fff;
}
.board-card-type-badge.youtube { background: linear-gradient(135deg, #ef4444, #9333ea); }
.board-card-type-badge.course { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.board-card-type-badge.audiobook { background: linear-gradient(135deg, #f59e0b, #d97706); }
.board-card-type-badge.book { background: linear-gradient(135deg, #10b981, #059669); }
.board-card-type-badge.note { background: linear-gradient(135deg, #7c5af0, #4c1d95); }

.board-card-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.board-card-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background 0.15s ease;
}
.board-card-action-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.board-card-action-btn.delete-btn:hover {
    color: #ef4444;
}

.board-card-body {
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.board-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
}
.board-card-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    outline: none;
    white-space: pre-wrap;
    word-break: break-word;
}
.board-card-text[contenteditable="true"] {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
}
.board-card-thumb {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.board-card-launch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.55rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--neon-accent), #4f46e5);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.board-card-launch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 90, 240, 0.5);
}

# y o u t u b e - s t a g e   {   m i n - h e i g h t :   5 0 0 p x ;   }  
 
/* 🎧 Audiobook Player Premium Styling */
.audiobook-player-card {
    background: linear-gradient(180deg, rgba(20, 22, 30, 0.9) 0%, rgba(12, 14, 20, 1) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 100px rgba(124, 90, 240, 0.05);
}

.audiobook-art-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.audiobook-cover-wrapper {
    width: 220px;
    height: 220px;
    background: linear-gradient(135deg, rgba(124,90,240,0.2), rgba(18,20,28,0.9));
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 2rem;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.audiobook-cover-wrapper:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(124,90,240,0.3);
}

.audiobook-placeholder-art {
    font-size: 5rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
    z-index: 2;
}

.equalizer-visualizer {
    position: absolute;
    bottom: -10px;
    display: flex;
    gap: 4px;
    height: 40px;
    align-items: flex-end;
    opacity: 0.6;
    z-index: 1;
}

.equalizer-visualizer .bar {
    width: 6px;
    background: var(--accent);
    border-radius: 3px;
    animation: eq-bounce 1.2s ease-in-out infinite alternate;
}

.equalizer-visualizer .bar:nth-child(1) { height: 30%; animation-delay: 0.1s; }
.equalizer-visualizer .bar:nth-child(2) { height: 80%; animation-delay: 0.4s; }
.equalizer-visualizer .bar:nth-child(3) { height: 50%; animation-delay: 0.2s; }
.equalizer-visualizer .bar:nth-child(4) { height: 100%; animation-delay: 0.6s; }
.equalizer-visualizer .bar:nth-child(5) { height: 40%; animation-delay: 0.3s; }

@keyframes eq-bounce {
    0% { height: 20%; opacity: 0.4; }
    100% { height: 100%; opacity: 1; }
}

.now-playing-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    margin-bottom: 0.5rem;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.now-playing-chapter {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.audio-controls-box {
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.audio-scrubber-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.audio-scrubber-row .time-label {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-weight: 500;
    min-width: 45px;
}

.audio-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    position: relative;
}

.ctrl-btn.large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(124, 90, 240, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ctrl-btn.large:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 28px rgba(124, 90, 240, 0.6);
}

.ctrl-btn.large:active {
    transform: scale(0.95);
}
