/* assets/css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bs-body-font-family: 'Outfit', sans-serif;
    --bs-body-bg: #f4f5fa;
    --primary-color: #9055fd;
    --primary-light: #f2ebff;
    --success-pastel: #56ca00;
    --success-light: #e6f9d4;
    --warning-pastel: #ffb400;
    --warning-light: #fff5d6;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    --hover-shadow: 0 8px 30px rgba(144, 85, 253, 0.08);
}

body {
    background-color: var(--bs-body-bg);
    color: #3a3b4f;
    font-family: var(--bs-body-font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f4f5fa;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   PREMIUM MODERN DASHBOARD LAYOUT
   ========================================================================== */


/* Card Styling */
.card {
    border: none !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.01) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(13, 110, 253, 0.04), 0 1px 3px rgba(0, 0, 0, 0.01) !important;
}

/* Navigation & Sidebar Layout */
.sidebar-wrapper {
    width: 270px;
    min-width: 270px;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 1px 0 10px rgba(0, 0, 0, 0.01);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

/* Custom scrollbar for sidebar */
.sidebar-wrapper::-webkit-scrollbar {
    width: 4px;
}
.sidebar-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-wrapper::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}
.sidebar-wrapper::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

.main-content-wrapper {
    min-width: 0;
    overflow-x: hidden;
}

.sidebar-brand {
    height: 64px;
    flex-shrink: 0; /* Prevents height collapse */
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
    background: linear-gradient(-45deg, #f8fafc, #eff6ff, #f8fafc, #f1f5f9);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.sidebar-logo-container {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.sidebar-logo-glow {
    position: absolute;
    width: 38px;
    height: 38px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.45) 0%, rgba(37, 99, 235, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    animation: logoGlowPulse 2s infinite ease-in-out alternate;
    pointer-events: none;
}

@keyframes logoGlowPulse {
    0% {
        transform: scale(0.85);
        opacity: 0.4;
        filter: blur(2px);
    }
    100% {
        transform: scale(1.25);
        opacity: 0.85;
        filter: blur(4px);
    }
}

.sidebar-brand-text {
    display: inline-block; /* Establishes proper bounds for text background clip */
    font-size: 0.95rem;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.2px;
    line-height: 1.25;
    position: relative;
    z-index: 2;
    animation: textFloat 3s ease-in-out infinite alternate;
}

@keyframes textFloat {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-1.5px);
    }
}

.sidebar-wrapper .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.55rem 0.95rem;
    color: #6a6c7a;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 100px;
    transition: all 0.25s ease;
    margin: 0 0.35rem;
}

.sidebar-wrapper .nav-link i {
    color: #a3a4b5;
    transition: color 0.25s ease;
}

.sidebar-wrapper .nav-link:hover {
    background-color: rgba(144, 85, 253, 0.08);
    color: #9055fd !important;
}

.sidebar-wrapper .nav-link:hover i {
    color: #9055fd !important;
}

.sidebar-wrapper .nav-link.active {
    background: linear-gradient(98deg, #c39eff 0%, #9055fd 100%);
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(144, 85, 253, 0.25);
}

.sidebar-wrapper .nav-link.active i {
    color: #ffffff !important;
}

.sidebar-profile-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.45rem 0.75rem !important;
    transition: all 0.2s ease;
}

.sidebar-profile-box:hover {
    background-color: #f1f5f9;
    transform: translateY(-1px);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.3);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    display: block;
}

/* Mobile responsive sidebar */
@media (max-width: 991.98px) {
    .sidebar-wrapper {
        margin-left: -270px;
        position: fixed;
        left: 0;
        bottom: 0;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    }
    .sidebar-wrapper.toggled {
        margin-left: 0;
    }
}

@media print {
    .sidebar-wrapper, .topbar-wrapper, .sidebar-overlay {
        display: none !important;
    }
    .main-content-wrapper {
        width: 100% !important;
    }
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) ;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 1.5px solid #9055fd;
    color: #9055fd;
}

.btn-outline-primary:hover {
    background-color: #9055fd;
    border-color: #9055fd;
    color: #ffffff;
}

/* Alert styling overrides */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
}

/* Dashboard Stat Boxes */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card-peserta {
    border-left: 4.5px solid #2563eb !important;
}

.stat-card-nilai {
    border-left: 4.5px solid #8b5cf6 !important;
}

.stat-card-lulus {
    border-left: 4.5px solid #10b981 !important;
}

.stat-card-belum {
    border-left: 4.5px solid #ef4444 !important;
}

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.stat-icon-primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.02) 100%);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.stat-icon-purple {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.02) 100%);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.stat-icon-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.02) 100%);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.stat-icon-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.02) 100%);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.stat-box-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
    flex-shrink: 0;
}

.stat-box-purple {
    background: linear-gradient(135deg, #b886fc 0%, #9055fd 100%);
    box-shadow: 0 4px 10px rgba(144, 85, 253, 0.25);
}

.stat-box-green {
    background: linear-gradient(135deg, #7cf218 0%, #56ca00 100%);
    box-shadow: 0 4px 10px rgba(86, 202, 0, 0.25);
}

.stat-box-warning {
    background: linear-gradient(135deg, #ffcf54 0%, #ffb400 100%);
    box-shadow: 0 4px 10px rgba(255, 180, 0, 0.25);
}

.stat-box-info {
    background: linear-gradient(135deg, #5fcbff 0%, #16b1ff 100%);
    box-shadow: 0 4px 10px rgba(22, 177, 255, 0.25);
}

/* Tables */
.table-responsive {
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01);
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    background-color: #f8fafc;
    border-bottom: 2px solid #f1f5f9;
    padding: 1.1rem 1.25rem;
    color: #64748b;
}

.table td {
    padding: 1.1rem 1.25rem;
    vertical-align: middle;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    padding: 0.55em 0.85em;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.75rem;
}

.bg-light-primary {
    background-color: rgba(37, 99, 235, 0.08) !important;
    color: #2563eb !important;
    --bs-badge-color: #2563eb !important;
}

.bg-light-success {
    background-color: rgba(16, 185, 129, 0.08) !important;
    color: #10b981 !important;
    --bs-badge-color: #10b981 !important;
}

.bg-light-danger {
    background-color: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    --bs-badge-color: #ef4444 !important;
}

.bg-light-warning {
    background-color: rgba(245, 158, 11, 0.08) !important;
    color: #d97706 !important;
    --bs-badge-color: #d97706 !important;
}


/* ==========================================================================
   MODERN SPLIT-SCREEN LOGIN PAGE LAYOUT
   ========================================================================== */

/* Page body styling override for split screen */
body.login-page-body {
    background-color: #eef2f6 !important;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (max-width: 767.98px) {
    body.login-page-body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }
}

/* Left column banner */
.login-banner-column {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 50%, #1e3a8a 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* Floating blur decorative background circles for left pane */
.login-banner-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
}

.login-banner-content {
    position: relative;
    z-index: 5;
    animation: slideInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-banner-img {
    max-height: 75vh;
    max-width: 90%;
    object-fit: contain;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.5s ease;
}

.login-banner-img:hover {
    transform: translateY(-5px) scale(1.01);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Right column container */
.login-form-wrapper {
    animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Logo Neon Container and Animations */
.logo-neon-container {
    position: relative;
    width: 110px;
    height: 110px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Pulsing neon spread behind logo */
.logo-neon-glow {
    position: absolute;
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.4) 0%, rgba(13, 110, 253, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    animation: neonPulse 2.5s infinite ease-in-out alternate;
    pointer-events: none;
}

@keyframes neonPulse {
    0% {
        transform: scale(0.9);
        opacity: 0.5;
        filter: blur(8px);
    }
    100% {
        transform: scale(1.3);
        opacity: 0.9;
        filter: blur(14px);
    }
}


.login-logo {
    width: 100px !important;
    height: 100px !important;
    object-fit: contain;
    z-index: 3;
    position: relative;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-logo:hover {
    transform: scale(1.08);
}

/* Card Styling with Neon Glow */
.login-card {
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid rgba(13, 110, 253, 0.12) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03), 
                0 0 25px rgba(13, 110, 253, 0.08), 
                0 0 50px rgba(13, 110, 253, 0.03) !important;
    transition: all 0.3s ease-in-out !important;
}

.login-card:hover {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.04), 
                0 0 35px rgba(13, 110, 253, 0.15), 
                0 0 70px rgba(13, 110, 253, 0.06) !important;
}

/* Input Fields styling */
.login-label {
    color: #475569 !important;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 0.5rem;
}

.login-input-group {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}

.login-input-group:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.login-input-icon {
    background: transparent !important;
    border: none !important;
    color: #3b82f6 !important;
    font-size: 1.05rem;
    padding-left: 1rem;
}

.login-input {
    background: transparent !important;
    border: none !important;
    color: #0f172a !important;
    font-size: 0.95rem;
    padding: 0.75rem 1rem !important;
}

.login-input::placeholder {
    color: #94a3b8 !important;
}

.login-input:focus {
    box-shadow: none !important;
    background: transparent !important;
    color: #0f172a !important;
}

/* Eye Toggle button */
.login-toggle-btn {
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    padding-right: 1rem;
    transition: color 0.2s ease;
}

.login-toggle-btn:hover {
    color: #3b82f6 !important;
}

/* Submit Button */
.btn-login-submit {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 0.975rem;
    font-weight: 600;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}

.btn-login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
}

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




/* Barcode styling */
.barcode-box {
    background: #ffffff;
    border: 1px dashed #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

/* Hover effects */
.hover-scale {
    transition: transform 0.2s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Table report styling for compact, single-page presentation */
.table-report th, 
.table-report td {
    padding: 0.75rem 0.6rem !important;
    font-size: 0.825rem;
}
.table-report th {
    font-size: 0.7rem;
    font-weight: 700;
    vertical-align: middle;
}
.table-report td .badge {
    padding: 0.45em 0.6em !important;
    font-size: 0.7rem !important;
}
.table-report td .btn {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.725rem !important;
    border-radius: 6px !important;
}
.table-report td .small {
    font-size: 0.7rem !important;
}

/* ========================================
   MATERIALS MODULE
   ======================================== */

/* Material Card (Participant View) */
.material-card {
    border-radius: 12px !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.material-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

/* Material Icon Box */
.material-icon-box {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    flex-shrink: 0;
}
.material-icon-box-lg {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    flex-shrink: 0;
}

/* ========================================
   FLIPBOOK VIEWER
   ======================================== */

/* Modal Background */
.flipbook-modal-content {
    background: linear-gradient(135deg, #0c1222 0%, #1a1f3a 50%, #0f172a 100%) !important;
}

/* Header Bar */
.flipbook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.25rem;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.flipbook-header-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
}

/* Body */
.flipbook-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

/* Loading Animation */
.flipbook-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.flipbook-loading-book {
    position: relative;
    width: 60px;
    height: 50px;
    perspective: 200px;
}
.flipbook-loading-page {
    position: absolute;
    width: 30px;
    height: 45px;
    background: white;
    border-radius: 0 3px 3px 0;
    right: 0;
    transform-origin: left center;
    animation: flipPage 1.5s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.flipbook-loading-page:nth-child(1) { animation-delay: 0s; }
.flipbook-loading-page:nth-child(2) { animation-delay: 0.15s; }
.flipbook-loading-page:nth-child(3) { animation-delay: 0.3s; }

@keyframes flipPage {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(-160deg); }
}

/* Book Wrapper */
.flipbook-book-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    animation: bookAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes bookAppear {
    0% { opacity: 0; transform: scale(0.9) rotateY(-5deg); }
    100% { opacity: 1; transform: scale(1) rotateY(0deg); }
}

/* Book Shadow */
.flipbook-book-shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 900px;
    height: 40px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.4) 0%, transparent 70%);
    filter: blur(8px);
    pointer-events: none;
}

/* Book Frame */
.flipbook-book {
    width: 100%;
    max-width: 1000px;
    height: calc(100vh - 130px);
    background: linear-gradient(135deg, #fefefe, #f8f9fa);
    border-radius: 4px 16px 16px 4px;
    box-shadow:
        /* Page edges */
        -3px 0 0 #e8e8e8,
        -6px 0 0 #ddd,
        -9px 0 0 #d0d0d0,
        /* Book shadow */
        0 15px 50px rgba(0,0,0,0.4),
        0 5px 20px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

/* Spine decoration */
.flipbook-book::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg,
        rgba(0,0,0,0.12) 0%,
        rgba(0,0,0,0.04) 40%,
        rgba(255,255,255,0.1) 60%,
        transparent 100%
    );
    z-index: 5;
    pointer-events: none;
}

/* Page Content */
.flipbook-page-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Iframe for PDF / Google Viewer */
.flipbook-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 14px 14px 0;
}

/* Image in flipbook */
.flipbook-image-page {
    padding: 2rem;
    background: #fafafa;
}
.flipbook-image {
    max-width: 100%;
    max-height: calc(100vh - 170px);
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Info Page (for archive/unknown formats) */
.flipbook-info-page {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 0 14px 14px 0;
}
.flipbook-info-card {
    text-align: center;
    padding: 3rem;
    max-width: 400px;
}

/* Offline Notice */
.flipbook-offline-notice {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: rgba(255,255,255,0.8);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.72rem;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    z-index: 10;
    animation: fadeInUp 0.5s 2s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .flipbook-book {
        max-width: 100%;
        height: calc(100vh - 120px);
        border-radius: 2px 8px 8px 2px;
    }
    .flipbook-body {
        padding: 0.5rem;
    }
    .flipbook-image-page {
        padding: 0.5rem;
    }
}
