:root {
    --bg-color: #0b1121;
    /* Dark blue-ish black from reference map */
    --land-color: #4a5568;
    /* Gray squares as requested */
    --ocean-color: transparent;
    --pixel-size: 8px;
    --gap-size: 2px;
    --highlight-green: #2ecc71;
    /* Vibrant green */
    --highlight-blue: #3498db;
    /* Vibrant blue */
}

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

body {
    background-color: var(--bg-color);
    background: radial-gradient(circle at center, #1a233b 0%, #050505 100%);
    color: #fff;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: auto;
}

#app {
    text-align: center;
    width: 100%;
    max-width: 1600px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    line-height: 0.9;
    letter-spacing: -0.02em;
    color: #fff;
}

h1 span {
    font-size: 6rem;
    display: block;
}

#map-container {
    display: grid;
    /* Columns/Rows set in JS */
    gap: var(--gap-size);
    justify-content: center;
    margin: 0 auto;
    position: relative;
    padding: 2rem;
}

.pixel {
    width: var(--pixel-size);
    height: var(--pixel-size);
    background-color: var(--ocean-color);
    border-radius: 1px;
    /* Slight rounding for cleaner look */
    transition: all 0.3s ease;
}

.pixel.land {
    background-color: var(--land-color);
    opacity: 0.8;
}

.pixel.city {
    position: relative;
    z-index: 10;
    transform: scale(1.5);
    border-radius: 2px;
}

.pixel.green {
    background-color: var(--highlight-green);
    box-shadow: 0 0 8px var(--highlight-green);
    animation: pulse-green 3s infinite;
}

.pixel.blue {
    background-color: var(--highlight-blue);
    box-shadow: 0 0 8px var(--highlight-blue);
    animation: pulse-blue 3s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(46, 204, 113, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(52, 152, 219, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

/* Tooltip */
.pixel.city::after {
    content: attr(data-city);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 10px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    border-radius: 4px;
}

.pixel.city:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* City Status Section */
.city-status {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 2.5rem;
    position: relative;
    z-index: 2;
}

.status-group {
    text-align: left;
}

.status-group h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.status-group.on-air h3 {
    color: var(--highlight-green);
}

.status-group.coming-soon h3 {
    color: var(--highlight-blue);
}

.status-group ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    max-width: 400px;
}

.status-group.coming-soon ul {
    max-width: 650px;
    /* Wider container for 2 rows */
    justify-content: flex-start;
}

.status-group li {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.status-group li a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.status-group.on-air li a {
    color: var(--highlight-green);
}

.status-group.on-air li a:hover {
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
    color: #fff;
}

.status-group.coming-soon li a:hover {
    color: var(--highlight-blue);
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

/* Footer */
footer {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 2;
}

footer span {
    letter-spacing: 0.02em;
}

footer nav {
    display: flex;
    gap: 1.5rem;
}

footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: linear-gradient(145deg, #1a233b 0%, #0d1526 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 480px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.about-content {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.about-content p {
    margin-bottom: 1rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--highlight-blue);
    background: rgba(255, 255, 255, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    background: linear-gradient(135deg, var(--highlight-blue) 0%, #2980b9 100%);
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ========== MOBILE RESPONSIVE STYLES ========== */

/* Burger Menu Button */
.burger-menu {
    display: none;
    position: fixed;
    top: 1.5rem;
    bottom: auto;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #1a233b 0%, #0d1526 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
}

.burger-menu:hover {
    transform: scale(1.05);
}

.burger-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(145deg, #1a233b 0%, #0d1526 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 20px 20px;
    padding: 2rem;
    padding-top: 6rem;
    z-index: 99;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
}

.mobile-menu a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.mobile-menu .copyright {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* Tablet Breakpoint */
@media (max-width: 1024px) {
    :root {
        --pixel-size: 6px;
        --gap-size: 1.5px;
    }

    h1 {
        font-size: 3.5rem;
    }

    h1 span {
        font-size: 4.5rem;
    }

    .city-status {
        gap: 2rem;
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    :root {
        --pixel-size: 4px;
        --gap-size: 1px;
    }

    #app {
        padding: 1.5rem;
        padding-bottom: 5rem;
    }

    header {
        margin-bottom: 1.5rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h1 span {
        font-size: 3rem;
    }

    #map-container {
        padding: 0.5rem;
        transform: scale(0.95);
        transform-origin: center top;
    }

    /* City Status - Elegant Mobile Layout */
    .city-status {
        flex-direction: column;
        gap: 2rem;
        margin-top: 2rem;
        padding: 0 1rem;
        width: 100%;
    }

    .status-group {
        text-align: center;
    }

    .status-group h3 {
        font-size: 0.85rem;
        margin-bottom: 1rem;
        letter-spacing: 0.15em;
    }

    .status-group ul {
        justify-content: center;
        max-width: none;
        gap: 0.75rem 1.25rem;
    }

    .status-group li {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.75);
        padding: 0.25rem 0;
    }

    .status-group.on-air li {
        color: rgba(46, 204, 113, 0.9);
        font-weight: 500;
    }

    /* Hide desktop footer, show burger */
    footer {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    /* Modal adjustments */
    .modal {
        padding: 2rem 1.5rem;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal h2 {
        font-size: 1.5rem;
    }
}

/* Small Mobile Breakpoint */
@media (max-width: 480px) {
    :root {
        --pixel-size: 3px;
        --gap-size: 0.75px;
    }

    h1 {
        font-size: 2rem;
    }

    h1 span {
        font-size: 2.5rem;
    }

    #map-container {
        transform: scale(0.9);
    }

    .status-group h3 {
        font-size: 0.8rem;
    }

    .status-group li {
        font-size: 0.95rem;
    }
}