/* ============================================
   LoveXBook Frontend — Premium Boutique Theme
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,600;1,600&display=swap');

:root {
    --bg-base: #FCFBF9; /* Warm off-white */
    --bg-surface: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.7);
    
    --rose-100: #FCE7F3;
    --rose-500: #EC4899;
    --rose-700: #BE185D;
    
    --accent: #EC4899;
    --accent-dark: #BE185D;
    --accent-light: #FBCFE8;
    
    --text-main: #1C1917; /* Stone 900 */
    --text-muted: #78716C; /* Stone 500 */
    --text-light: #A8A29E; /* Stone 400 */
    
    --border-light: rgba(0, 0, 0, 0.05);
    
    --gradient-primary: linear-gradient(135deg, var(--rose-500), var(--rose-700));
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4));
    
    --shadow-soft: 0 10px 40px -10px rgba(190, 24, 93, 0.08);
    --shadow-hover: 0 20px 40px -10px rgba(190, 24, 93, 0.15);
    --shadow-float: 0 8px 30px rgba(0,0,0,0.06);
    
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-pill: 9999px;
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Inter', sans-serif;
    background-color: #FAF9F6;
    background-image: 
        radial-gradient(at 0% 0%, rgba(252, 231, 243, 0.4) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(243, 232, 255, 0.4) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand { font-family: 'Outfit', sans-serif; }
a { color: inherit; text-decoration: none; }

/* ── Container ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 5%; }

/* ── Floating Navbar ── */
.navbar-wrapper {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 20px 5%; pointer-events: none; /* Let clicks pass through padding */
}
.navbar {
    pointer-events: auto; /* Re-enable clicks on navbar itself */
    background: var(--bg-glass);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--radius-pill);
    padding: 10px 20px 10px 24px; height: 72px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: var(--shadow-float);
    max-width: 1280px; margin: 0 auto;
}
.brand {
    display: flex; align-items: center; gap: 12px;
    font-size: 22px; font-weight: 800; letter-spacing: -0.5px;
}
.brand-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--gradient-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.navbar-center { display: flex; align-items: center; gap: 32px; }
.navbar-links { display: flex; gap: 24px; }
.navbar-links a {
    font-size: 15px; font-weight: 600; color: var(--text-muted);
    transition: color 0.3s; position: relative;
}
.navbar-links a:hover, .navbar-links a.active { color: var(--text-main); }
.navbar-links a.active::after {
    content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 3px; border-radius: 2px; background: var(--rose-500);
}

.navbar-search {
    background: rgba(0,0,0,0.03); border-radius: var(--radius-pill);
    padding: 10px 20px; display: flex; align-items: center; gap: 10px;
    width: 260px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}
.navbar-search:focus-within {
    background: #fff; border-color: var(--rose-100);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1); width: 320px;
}
.navbar-search input {
    background: none; border: none; font-size: 14px; width: 100%; outline: none;
    font-family: 'Inter', sans-serif; color: var(--text-main);
}
.navbar-search i { color: var(--text-muted); }

.navbar-right { display: flex; align-items: center; gap: 16px; }
.user-menu { display: flex; align-items: center; gap: 12px; }
.wallet-badge {
    background: var(--rose-100); color: var(--rose-700);
    padding: 8px 16px; border-radius: var(--radius-pill);
    font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px;
}
.avatar-btn {
    width: 44px; height: 44px; border-radius: 50%; border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); object-fit: cover; cursor: pointer;
    transition: transform 0.3s;
}
.avatar-btn:hover { transform: scale(1.05); }
.btn-login {
    font-weight: 600; color: var(--text-main); padding: 10px 16px;
}
.btn-register {
    background: var(--text-main); color: #fff; padding: 12px 24px;
    border-radius: var(--radius-pill); font-weight: 600; font-size: 14px;
    transition: all 0.3s; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.btn-register:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }

/* ── Hero ── */
.hero {
    padding: 160px 0 80px; text-align: center;
}
.hero-badge {
    display: inline-block; padding: 8px 20px; border-radius: var(--radius-pill);
    background: #fff; border: 1px solid var(--border-light);
    font-size: 13px; font-weight: 600; color: var(--rose-700);
    margin-bottom: 24px; box-shadow: var(--shadow-float);
    animation: fadeInDown 0.8s ease-out;
}
.hero h1 {
    font-size: clamp(40px, 6vw, 72px); font-weight: 900; letter-spacing: -1.5px;
    line-height: 1.1; margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}
.hero h1 span {
    font-family: 'Playfair Display', serif; font-style: italic; font-weight: 600;
    color: var(--rose-700);
}
.hero p {
    font-size: clamp(16px, 2vw, 20px); color: var(--text-muted);
    max-width: 640px; margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* ── Filters ── */
.filter-wrapper { margin-bottom: 40px; }
.filter-tabs {
    display: flex; gap: 12px; overflow-x: auto; padding: 4px;
    scrollbar-width: none; -ms-overflow-style: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
    white-space: nowrap; padding: 12px 24px; border-radius: var(--radius-pill);
    font-size: 15px; font-weight: 600; color: var(--text-muted);
    background: transparent; border: 1px solid transparent;
    cursor: pointer; transition: all 0.3s;
}
.filter-tab:hover { background: rgba(0,0,0,0.03); color: var(--text-main); }
.filter-tab.active {
    background: #fff; color: var(--text-main);
    box-shadow: var(--shadow-float); border: 1px solid var(--border-light);
}

/* ── Ebook Grid ── */
.ebook-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px; padding-bottom: 80px;
}
.ebook-card {
    background: transparent; group; cursor: pointer;
    display: flex; flex-direction: column;
}
.ebook-card .cover-wrapper {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    aspect-ratio: 3/4.2; background: #F5F5F4; margin-bottom: 16px;
    box-shadow: var(--shadow-soft); transition: all 0.4s ease;
}
.ebook-card:hover .cover-wrapper {
    transform: translateY(-8px); box-shadow: var(--shadow-hover);
}
.ebook-card img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s ease;
}
.ebook-card:hover img { transform: scale(1.05); }

.type-badge {
    position: absolute; top: 16px; left: 16px; z-index: 2;
    background: var(--bg-glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    color: var(--text-main); padding: 6px 14px; border-radius: var(--radius-pill);
    font-size: 12px; font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.ebook-card .info { padding: 0 4px; }
.ebook-card .title {
    font-size: 18px; font-weight: 700; color: var(--text-main);
    line-height: 1.3; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ebook-card .author { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.ebook-card .meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto; padding-top: 8px;
}
.ebook-card .price { font-size: 18px; font-weight: 800; color: var(--rose-700); }
.ebook-card .views { font-size: 13px; color: var(--text-light); display: flex; align-items: center; gap: 4px; }

/* ── Mobile Overrides ── */
.mobile-nav-toggle { display: none; font-size: 24px; color: var(--text-main); background: none; border: none; }

@media (max-width: 1024px) {
    .navbar-search { width: 200px; }
    .navbar-search:focus-within { width: 240px; }
}

@media (max-width: 768px) {
    .navbar-wrapper { padding: 12px; }
    .navbar { padding: 10px 16px; height: 64px; }
    .navbar-center { display: none; } /* Hide links and search */
    .mobile-nav-toggle { display: block; }
    .btn-register { display: none; }
    .wallet-badge span { display: none; } /* Hide text, keep icon */
    .wallet-badge { padding: 8px 12px; }
    
    .hero { padding: 120px 0 60px; }
    .hero h1 { font-size: 48px; }
    .ebook-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .ebook-card .title { font-size: 15px; }
    .ebook-card .price { font-size: 16px; }
    
    .filter-tabs { padding: 4px 16px; margin: 0 -16px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 36px; }
    .ebook-grid { gap: 16px; }
    .ebook-card .cover-wrapper { border-radius: 12px; }
    .type-badge { top: 8px; left: 8px; padding: 4px 10px; font-size: 10px; }
    .info .title { font-size: 14px; }
}

/* ── Mobile Menu Overlay ── */
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
    z-index: 2000; opacity: 0; pointer-events: none; transition: all 0.3s;
}
.mobile-menu-overlay.active { opacity: 1; pointer-events: auto; }

.mobile-menu-content {
    position: absolute; right: 0; top: 0; height: 100%; width: 300px;
    background: #fff; padding: 40px 30px; transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu-overlay.active .mobile-menu-content { transform: translateX(0); }

.mobile-menu-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.mobile-menu-links { display: flex; flex-direction: column; gap: 24px; }
.mobile-menu-links a { font-size: 18px; font-weight: 700; color: var(--text-main); }

/* ── Content Protection ── */
.no-capture {
    -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
    -webkit-user-drag: none;
}
@media print {
    body * { display: none !important; }
    body::after { content: "การพิมพ์ถูกจำกัดเพื่อความปลอดภัยของข้อมูล (Printing Restricted)"; display: block !important; text-align: center; padding: 50px; font-size: 24px; color: #000; }
}

/* ── Ebook Detail Page ── */
.ebook-detail { padding: 140px 0 80px; }
.detail-grid { display: grid; grid-template-columns: 320px 1fr; gap: 60px; align-items: start; }

.detail-sidebar { position: sticky; top: 120px; }
.detail-cover-card {
    background: #fff; padding: 12px; border-radius: var(--radius-xl);
    box-shadow: var(--shadow-hover); border: 1px solid var(--border-light);
}
.detail-cover-card img { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 3/4.2; object-fit: cover; display: block; }

.detail-main-content h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 900; line-height: 1.2; margin-bottom: 16px; }
.detail-author { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 16px; font-weight: 600; margin-bottom: 24px; }
.detail-author i { color: var(--rose-500); }

.detail-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.detail-badge {
    padding: 8px 20px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 700;
    display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-float); background: #fff; border: 1px solid var(--border-light);
}
.detail-badge.type-read { color: var(--rose-500); }
.detail-badge.type-audio { color: #8B5CF6; }
.detail-badge.cat { color: var(--text-muted); }
.detail-badge.price { background: var(--gradient-primary); color: #fff; border: none; }

.detail-actions { margin-bottom: 48px; display: flex; flex-direction: column; gap: 16px; }
.owned-msg {
    background: #ECFDF5; color: #059669; padding: 16px 24px; border-radius: var(--radius-md);
    font-weight: 700; display: flex; align-items: center; gap: 12px;
}

.btn-buy {
    background: var(--gradient-primary); color: #fff; padding: 20px 48px; border-radius: var(--radius-lg);
    font-size: 20px; font-weight: 800; border: none; cursor: pointer; transition: all 0.3s;
    box-shadow: 0 15px 35px -10px rgba(236, 72, 153, 0.4); text-align: center; width: 100%;
}
.btn-buy:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -10px rgba(236, 72, 153, 0.5); }

.detail-desc-box { margin-bottom: 60px; }
.detail-desc-box h2 { font-size: 20px; font-weight: 800; margin-bottom: 16px; position: relative; padding-left: 16px; }
.detail-desc-box h2::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; background: var(--rose-500); border-radius: 2px; }
.detail-desc-text { color: var(--text-muted); line-height: 1.8; font-size: 16px; }

.chapter-section { background: #fff; border-radius: var(--radius-xl); padding: 40px; border: 1px solid var(--border-light); box-shadow: var(--shadow-soft); }
.chapter-section h2 { font-size: 24px; font-weight: 800; margin-bottom: 32px; display: flex; align-items: center; gap: 12px; }
.chapter-list { display: flex; flex-direction: column; gap: 16px; }

.chapter-item {
    background: var(--bg-base); border: 1px solid transparent; border-radius: var(--radius-lg); padding: 20px 24px;
    display: flex; align-items: center; gap: 20px; transition: all 0.3s; cursor: pointer; color: inherit;
}
.chapter-item:hover { background: #fff; border-color: var(--rose-100); box-shadow: var(--shadow-float); transform: translateX(8px); }
.chapter-num {
    width: 44px; height: 44px; border-radius: 14px; background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 800; color: var(--rose-500); box-shadow: var(--shadow-soft);
}
.chapter-info { flex: 1; }
.chapter-info h3 { font-size: 16px; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.chapter-info p { font-size: 13px; color: var(--text-light); }
.chapter-action { font-size: 20px; color: var(--text-light); transition: color 0.3s; }
.chapter-item:hover .chapter-action { color: var(--rose-500); }

.lock-state {
    text-align: center; padding: 60px 40px; background: #FFF5F7; border-radius: var(--radius-xl);
    border: 2px dashed var(--rose-100);
}
.lock-state i { font-size: 48px; color: var(--rose-500); margin-bottom: 24px; }
.lock-state h3 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.lock-state p { color: var(--text-muted); font-size: 14px; }

/* ── Mobile Optimization for Ebook Detail ── */
@media (max-width: 992px) {
    .detail-grid { grid-template-columns: 1fr; gap: 40px; }
    .detail-sidebar { position: static; max-width: 400px; margin: 0 auto; width: 100%; }
}

@media (max-width: 768px) {
    .ebook-detail { padding-top: 100px; }
    .chapter-section { padding: 24px; }
    .chapter-item { padding: 16px; gap: 12px; }
    .chapter-num { width: 36px; height: 36px; font-size: 14px; }
    .chapter-info h3 { font-size: 15px; }
    .btn-buy { padding: 16px 32px; font-size: 18px; }
}

/* ── Global Protection Overlay ── */
.watermark-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999; pointer-events: none; opacity: 0.05;
    display: flex; flex-wrap: wrap; gap: 40px; padding: 40px;
    overflow: hidden;
}
.watermark-item {
    font-size: 14px; font-weight: 700; color: #000;
    transform: rotate(-30deg); white-space: nowrap;
}

/* ── Locked Content & Badges ── */
.lock-state {
    text-align: center; padding: 60px 40px; background: #fff;
    border: 2px dashed var(--rose-100); border-radius: var(--radius-xl);
    margin: 20px 0;
}
.lock-state i { font-size: 50px; color: var(--rose-500); margin-bottom: 20px; }
.lock-state h3 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.lock-state p { color: var(--text-muted); margin-bottom: 30px; }

.price-badge-overlap {
    position: absolute; top: 15px; right: 15px;
    background: var(--rose-500); color: #fff;
    padding: 6px 14px; border-radius: var(--radius-pill);
    font-weight: 800; font-size: 14px; box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
    z-index: 10;
}
.price-badge-overlap.free { background: #10B981; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4); }

.btn-buy {
    background: var(--gradient-primary); color: #fff;
    padding: 16px 32px; border-radius: var(--radius-pill);
    font-size: 16px; font-weight: 700; border: none; cursor: pointer;
    transition: all 0.3s; display: inline-flex; align-items: center; gap: 10px;
}
.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(236, 72, 153, 0.4); }

/* ── Audio Player Page ── */
.player-page { padding: 120px 0 80px; min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; }
.player-container { max-width: 900px; width: 100%; padding: 0 20px; }

.player-card {
    background: #fff; border-radius: var(--radius-xl); padding: 50px;
    border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 40px 100px -20px rgba(0,0,0,0.1);
    display: grid; grid-template-columns: 320px 1fr; gap: 60px; align-items: center;
}

.player-art-wrap { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 30px 60px -15px rgba(236, 72, 153, 0.3); }
.player-art-wrap img { width: 100%; height: 100%; object-fit: cover; }
.player-art-placeholder { width: 100%; height: 100%; background: var(--bg-base); display: flex; align-items: center; justify-content: center; color: var(--rose-500); font-size: 64px; }

.player-now-playing { margin-bottom: 30px; }
.player-now-playing .meta { font-size: 14px; font-weight: 700; color: var(--rose-500); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; display: block; }
.player-now-playing h1 { font-size: 28px; font-weight: 900; color: var(--text-main); line-height: 1.3; }
.player-now-playing p { color: var(--text-muted); font-size: 16px; margin-top: 4px; }

.audio-timeline { margin-bottom: 30px; }
.audio-timeline input[type="range"] {
    width: 100%; height: 6px; border-radius: 3px; background: #eee; outline: none; -webkit-appearance: none; cursor: pointer;
}
.audio-timeline input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--rose-500);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.4); border: 3px solid #fff;
}

.timeline-info { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--text-light); font-variant-numeric: tabular-nums; }

.player-controls { display: flex; align-items: center; justify-content: center; gap: 32px; margin-bottom: 40px; }
.player-controls button {
    background: none; border: none; color: var(--text-main); font-size: 20px; cursor: pointer; transition: all 0.2s;
}
.player-controls button:hover { color: var(--rose-500); transform: scale(1.1); }
.player-controls .play-toggle {
    width: 72px; height: 72px; border-radius: 50%; background: var(--gradient-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 10px 30px -5px rgba(236, 72, 153, 0.4);
}
.player-controls .play-toggle:hover { transform: scale(1.05); box-shadow: 0 15px 35px -5px rgba(236, 72, 153, 0.5); }

.player-footer-actions { display: flex; align-items: center; justify-content: space-between; padding-top: 30px; border-top: 1px solid var(--border-light); }
.volume-control { display: flex; align-items: center; gap: 12px; }
.volume-control i { color: var(--text-light); font-size: 14px; }
.volume-control input { width: 80px; }

.speed-control { display: flex; gap: 4px; background: var(--bg-base); padding: 4px; border-radius: 10px; }
.speed-btn {
    padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 800; border: none; background: none; color: var(--text-muted); cursor: pointer;
}
.speed-btn.active { background: #fff; color: var(--rose-500); box-shadow: var(--shadow-soft); }

.player-side-list { margin-top: 40px; background: #fff; border-radius: var(--radius-xl); padding: 40px; border: 1px solid var(--border-light); box-shadow: var(--shadow-soft); }
.player-side-list h3 { font-size: 20px; font-weight: 800; margin-bottom: 24px; display: flex; align-items: center; gap: 12px; }

@media (max-width: 992px) {
    .player-card { grid-template-columns: 1fr; padding: 40px 30px; gap: 40px; text-align: center; }
    .player-art-wrap { max-width: 280px; margin: 0 auto; }
    .player-controls { gap: 24px; }
    .player-footer-actions { flex-direction: column; gap: 24px; }
    .player-controls .play-toggle { width: 64px; height: 64px; font-size: 24px; }
}

/* ── Reader Page ── */
.reader-page { padding: 120px 0 60px; min-height: 100vh; }
.reader-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-glass); backdrop-filter: blur(20px);
    padding: 12px 24px; border-radius: var(--radius-pill);
    box-shadow: var(--shadow-float); border: 1px solid rgba(255,255,255,0.6);
    margin-bottom: 30px; position: sticky; top: 110px; z-index: 800;
}
.toolbar-group { display: flex; align-items: center; gap: 8px; }
.toolbar-btn {
    height: 44px; padding: 0 16px; border-radius: var(--radius-pill); border: none; background: #fff;
    color: var(--text-main); cursor: pointer; display: flex; align-items: center; gap: 8px;
    transition: all 0.2s; font-size: 14px; font-weight: 700;
}
.toolbar-btn i { font-size: 16px; }
.toolbar-btn:hover { background: var(--rose-500); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 15px rgba(236, 72, 153, 0.2); }
.toolbar-btn.square { width: 44px; padding: 0; justify-content: center; }

.page-indicator { font-size: 14px; font-weight: 800; color: var(--text-muted); padding: 0 15px; font-variant-numeric: tabular-nums; }

.pdf-viewport {
    background: #333; padding: 60px 20px; border-radius: var(--radius-xl);
    box-shadow: inset 0 0 100px rgba(0,0,0,0.4); display: flex; flex-direction: column; align-items: center; gap: 40px;
    min-height: 80vh; overflow-x: auto;
}
.pdf-canvas-item { box-shadow: 0 30px 60px -15px rgba(0,0,0,0.5); background: #fff; max-width: 100%; border-radius: 4px; }

.track-selector {
    display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.track-pill {
    padding: 8px 18px; border-radius: var(--radius-pill); background: #fff; border: 1px solid var(--border-light);
    font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.track-pill.active { background: var(--rose-500); color: #fff; border-color: var(--rose-500); }

@media (max-width: 768px) {
    .reader-toolbar { flex-direction: column; border-radius: var(--radius-lg); gap: 12px; padding: 15px; top: 90px; }
    .toolbar-group { width: 100%; justify-content: center; }
    .pdf-viewport { padding: 30px 10px; }
}




