:root {
    --primary-color: #d4af37;
    --primary-glow: rgba(212, 175, 55, 0.4);
    --bg-color: #050505;
    --card-bg: rgba(0, 0, 0, 0.65);
    /* Darker for better contrast on image */
    --text-color: #ffffff;
    --text-muted: #cccccc;
    --accent-glow: rgba(212, 175, 55, 0.3);
    --transition-smooth: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Splash Screen */
.splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.splash-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.splash-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Increased opacity to prevent background bleed-through */
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.95), rgba(5, 5, 5, 1));
}

/* Hide content when splash is active */
body.splash-active header,
body.splash-active main,
body.splash-active footer,
body.splash-active .background-decor {
    display: none;
}

.splash-bg-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
}

.video-bg {
    z-index: 2;
    background: transparent;
}

.default-bg {
    z-index: 1;
}

.splash-content {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    z-index: 1;
    animation: fadeInScale 1s ease-out;
}

.splash-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4));
    border-radius: 12px;
}

.splash-content h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    color: var(--primary-color);
    font-weight: 600;
}

.splash-content p {
    color: #ffffff;
    margin-bottom: 3rem;
    font-weight: 400;
    letter-spacing: 1px;
}

.splash-btn {
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 1.2rem 2.8rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-radius: 50px;
    font-family: inherit;
    font-weight: 600;
    box-shadow: 0 0 20px var(--primary-glow);
}

.splash-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px var(--primary-glow);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Background Refinement */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('cafe_bg.png') center center / cover no-repeat fixed;
    z-index: -1;
}

.background-decor::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    /* Dark overlay for readability */
}

header {
    padding: 4rem 1rem;
    text-align: center;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.main-logo {
    max-width: 220px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
    border-radius: 15px;
}

.subtitle {
    font-weight: 400;
    color: var(--primary-color);
    letter-spacing: 8px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

main {
    flex: 1;
    padding: 0 1.5rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 140px;
}

.category-card:hover {
    transform: translateY(-8px);
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 30px var(--accent-glow);
}

.category-card h2 {
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: #ffffff;
}

/* Modal and Pan/Zoom Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow: hidden;
    /* Necessary for pan/zoom */
    touch-action: none;
}

.modal.active {
    display: block;
    /* Changed from flex to block to allow absolute children positioning */
    opacity: 1;
}

.modal-content {
    cursor: grab;
    user-select: none;
    touch-action: none;
    position: absolute;
    transform-origin: 0 0;
    will-change: transform;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.modal-content:active {
    cursor: grabbing;
}

.modal-content img {
    pointer-events: none;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.close-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 3100;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.close-btn:hover {
    background: var(--primary-color);
    color: black;
}

footer {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    .main-logo {
        max-width: 180px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .modal-content img {
        /* max-width removed to allow manual JS scaling/centering */
    }
}