/* ===============================================
   CSS Reset & Base Styles
   =============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font-hero: 'Barlow Condensed', sans-serif;
    --font-body: 'Kode Mono', monospace;
    --color-white: #ffffff;
    --color-overlay: rgba(0, 0, 0, 0.3);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-body);
    color: var(--color-white);
}

/* ===============================================
   Background Image Placeholder
   =============================================== */
.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
}

/* ===============================================
   Background Video
   =============================================== */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* ===============================================
   Vignette Overlay
   =============================================== */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.25) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ===============================================
   Navbar
   =============================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    z-index: 100;
    font-family: var(--font-body);
    font-weight: 500;
}

.navbar-left,
.navbar-right {
    font-size: 0.75rem;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.navbar-left {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.navbar-left:hover {
    opacity: 1;
}

.navbar-right {
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
    font-family: var(--font-body);
    font-weight: 500;
}

.navbar-right:hover {
    opacity: 1;
}

/* ===============================================
   Main Container
   =============================================== */
.container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 1rem;
}

/* ===============================================
   Hero Section
   =============================================== */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex: 1;
    width: 100%;
    max-width: 600px;
}

.sea-lion {
    position: relative;
    width: 95%;
    max-width: 380px;
    height: auto;
    z-index: 2;
    filter: hue-rotate(0deg);
    transition: filter 0.5s ease;
    drop-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* ===============================================
   City Input Section
   =============================================== */
.city-input-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-top: 0.5rem;
    z-index: 10;
}

.city-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    outline: none;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.city-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

/* Hide native search input clear button */
.city-input::-webkit-search-cancel-button,
.city-input::-webkit-search-decoration,
.city-input::-webkit-search-results-button,
.city-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.city-input:focus {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 1);
}

.clear-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #333;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn:hover {
    opacity: 1;
}

.clear-btn.hidden {
    display: none;
}

/* ===============================================
   Autocomplete Dropdown
   =============================================== */
.autocomplete-dropdown {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    overflow: hidden;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.autocomplete-dropdown.hidden {
    display: none;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.autocomplete-message {
    padding: 1rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.6);
    text-align: center;
}

/* ===============================================
   Footer
   =============================================== */
.footer {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.footer-link {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    color: var(--color-white);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-link:hover {
    opacity: 1;
}

.footer-link-username {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--color-white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-link-username:hover {
    opacity: 0.6;
}

/* ===============================================
   Modal
   =============================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 340px;
    width: 100%;
    position: relative;
}

.modal-content h2 {
    font-family: var(--font-hero);
    font-weight: 900;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.modal-content p {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    opacity: 1;
}

.color-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.color-legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.color-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.color-circle.blue {
    background: #4a90a4;
}

.color-circle.pink {
    background: #a44a90;
}

.color-legend-text {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.8rem;
    opacity: 0.9;
}

/* ===============================================
   Responsive Design
   =============================================== */
@media (min-width: 768px) {
    .container {
        padding: 3rem 2rem;
    }

    .hero {
        max-width: 700px;
    }

    .sea-lion {
        max-width: 427.5px;
    }

    .city-input {
        font-size: 1.1rem;
        padding: 1rem 3rem 1rem 1.5rem;
    }

    .footer {
        gap: 3rem;
    }

    .footer-link {
        font-size: 0.95rem;
    }

    /* Modal - larger on tablet/desktop */
    .modal-content {
        padding: 2rem;
        max-width: 500px;
    }

    .modal-content h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .modal-content p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .color-legend {
        gap: 0.75rem;
        margin-top: 1.5rem;
        padding-top: 1rem;
    }

    .color-circle {
        width: 24px;
        height: 24px;
    }

    .color-legend-text {
        font-size: 0.9rem;
    }
}

@media (min-width: 1024px) {
    .hero {
        max-width: 800px;
    }

    .sea-lion {
        max-width: 475px;
    }
}
