:root {
    /* Color Palette */
    --color-1: #cad2c5;
    --color-2: #84a98c;
    --color-3: #52796f;
    --color-4: #354f52;
    --color-5: #2f3e46;

    /* Semantic Mappings */
    --bg-color: var(--color-1);
    --card-bg: #ffffff;
    --primary-color: var(--color-5);
    --secondary-color: var(--color-3);
    --accent-color: var(--color-2);
    --text-color: var(--color-5);
    --text-light: var(--color-1);

    /* UI Defaults */
    --radius: 16px;
    --shadow-flat: 0 4px 6px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.5;
}

header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 2rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.header-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
    border-radius: 50%; /* Optional: matches the "rounded corners" feel for elements inside cards */
}

header h1 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    font-size: 3rem;
    line-height: 1;
}

.organizer {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}

.hunt-date {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    color: var(--color-3);
    font-weight: 500;
}

#hunt-name {
    font-size: 2.25rem;
    margin: 0;
    color: var(--color-5);
    word-break: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--color-4);
}

/* Result Banner - Flat Design */
#result-banner {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-flat);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.winner-info {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: nowrap; /* Keep side by side */
    margin-top: 1.5rem;
}

.winner-info p {
    background: var(--color-1);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin: 0;
    font-weight: 500;
    flex: 1; /* Equal width */
    max-width: 400px;
}

#prize-type, #winner-name {
    color: var(--color-4);
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-flat);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* Lightbox */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(47, 62, 70, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

#lightbox.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    object-fit: contain;
}

.close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    transform: rotate(90deg);
    color: var(--color-2);
}

/* Lightbox Navigation */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2.5rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius);
    z-index: 2100;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-2);
}

.prev { left: 2rem; }
.next { right: 2rem; }

@media (max-width: 768px) {
    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 1.5rem;
    }
    .prev { left: 0.5rem; }
    .next { right: 0.5rem; }
}

/* Animations */
.fade-in {
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

footer {
    text-align: center;
    padding: 3rem;
    background-color: var(--color-5);
    color: var(--text-light);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    header h1 { font-size: 1.5rem; }
    #hunt-name { font-size: 1.25rem; }
    .winner-info { gap: 0.75rem; }
    .winner-info p { padding: 1rem; font-size: 0.9rem; }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .gallery-item img {
        height: 150px;
    }
}
