:root {
    --bg-color: #000000;
    --text-primary: #FFFFFF;
    --text-secondary: #AAAAAA;
    --accent-color: #D4AF37; /* Zam Zam Gold */
    --accent-red: #DC2626; /* Reference site used red for close button */
    
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow: hidden; /* Prevent full body scroll, handle per-view */
    position: fixed;
    width: 100%;
    height: 100%;
}

/* --- Loader --- */
.loader-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* --- Header --- */
.menu-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none; /* Let clicks pass through except on children */
}

.header-left {
    pointer-events: auto;
}

.header-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.header-subtitle {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-close {
    pointer-events: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-red);
    color: white;
    border: none;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

.btn-close:hover {
    transform: scale(1.1);
    background-color: #B91C1C;
}

/* --- Main Layouts --- */
.menu-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Desktop View (Flipbook) */
.desktop-view {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 80px 40px 40px 40px;
    position: relative;
}

.flip-book {
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

.page {
    background-color: #1a1a1a;
    overflow: hidden;
    /* Adding a subtle border to mimic paper edges */
    border: 1px solid rgba(255,255,255,0.05);
}

.page-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigation Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.nav-arrow:hover {
    background: var(--accent-color);
    color: black;
    border-color: var(--accent-color);
}

.prev-arrow { left: 40px; }
.next-arrow { right: 40px; }


/* Mobile View (Vertical Scroll) */
.mobile-view {
    display: none;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-top: 0;
    -webkit-overflow-scrolling: touch;
}

.mobile-page-wrapper {
    width: 100%;
    display: block;
}

.mobile-page-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: -1px; /* Remove gaps between sequential images */
}

.scroll-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
    animation: bounce 2s infinite;
    pointer-events: none;
}

.scroll-hint span {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--text-primary);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -10px); }
    60% { transform: translate(-50%, -5px); }
}

/* --- Responsive Rules --- */
@media (max-width: 768px) {
    /* Hide Flipbook entirely on mobile */
    .desktop-view {
        display: none !important;
    }

    /* Show vertical scroll on mobile */
    .mobile-view {
        display: block;
        padding-top: 80px;
        padding-bottom: 80px;
    }
    
    /* Allow body to not be fixed so mobile scroll works smoothly */
    body {
        position: relative;
        overflow: auto;
    }
    
    /* Adjust Header for mobile */
    .menu-header {
        padding: 1rem;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(10px);
        position: fixed;
    }
    
    .header-left {
        display: none; /* Hide title on mobile to match reference */
    }
    
    .btn-close {
        margin-left: auto;
        /* Put semi-transparent overlay to ensure visibility on mobile */
        box-shadow: 0 0 0 4px rgba(0,0,0,0.4);
    }
}
