:root {
    color-scheme: light;
}

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    /* Hidden by default */

    /* --- Key Changes --- */
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
    align-items: center;
    justify-content: center;

    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.visible {
    opacity: 1;
}

.modal-content {
    /* The main image */
    max-width: 85vw;
    /* Use viewport width for responsiveness */
    max-height: 75vh;
    /* Use viewport height */
    display: block;
    object-fit: contain;
    /* Ensures the whole image is visible */
}

#image-caption {
    /* --- Key Changes --- */
    position: static;
    /* Remove any absolute positioning */
    margin-top: 15px;
    color: #f1f1f1;
    font-size: 1.2em;
    font-weight: 600;
    text-align: center;
    width: 100%;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #ccc;
}

/* === COOKIE BANNER STYLES === */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(44, 53, 61, 0.98);
    /* Dark background */
    border-top: 2px solid #FAD961;
    /* Gold border */
    color: #ffffff;
    padding: 20px;
    z-index: 10000;
    /* Top layer */

    /* Box sizing prevents padding from breaking layout on phones */
    box-sizing: border-box;

    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);

    /* Start hidden (pushed down) */
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#cookie-banner.show {
    transform: translateY(0);
    /* Slide up */
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    width: 100%;
    gap: 20px;
}

.cookie-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    margin: 0;
    color: #E0E0E0;
    line-height: 1.5;
    flex: 1;
}

.cookie-btn {
    background: linear-gradient(120deg, #FAD961 0%, #F76B1C 100%);
    color: #2c2c2c;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.cookie-btn:hover {
    transform: scale(1.05);
}

/* === MOBILE PHONE ADJUSTMENTS === */
@media (max-width: 768px) {
    #cookie-banner {
        padding: 25px 20px;
        /* More space */
    }

    .cookie-content {
        flex-direction: column;
        /* Stack text and button */
        text-align: center;
        gap: 15px;
    }

    .cookie-btn {
        width: 100%;
        /* Full width button */
        padding: 15px 0;
    }
}

#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #FAD961, #F76B1C);
    /* Gold Gradient */
    width: 0%;
    /* Starts at 0 */
    z-index: 10000;
    transition: width 0.1s ease-out;
}

#custom-context-menu {
    display: none;
    position: absolute;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid #FAD961;
    padding: 15px;
    border-radius: 8px;
    color: #fff;
    z-index: 10000;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    font-family: 'Poppins', sans-serif;
}

/* === SCROLL REVEAL ANIMATIONS === */

/* The starting state (Invisible & pushed down) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    /* Pushed down 30px */
    transition: all 0.8s ease-out;
    /* Takes 0.8s to slide up */
}

/* The active state (Visible & original position) */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* === CUSTOM SCROLLBAR === */

/* Width of the scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

/* Track (Background) */
::-webkit-scrollbar-track {
    background: #111;
}

/* Handle (The moving part) */
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
    transition: background 0.3s;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #FAD961;
    /* Turns Gold when you grab it */
}