/* ============================================
   MONOPOLE.CITY — Cyberpunk Pop-Art Transit Metropolis
   Colors: #2A2A3E, #2D2D2D, #39FF14, #FFD700, #1A1A1A, #00D4FF, #E0E0E0, #FF3366
   Fonts: Bebas Neue, Work Sans, Overpass Mono
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #0F0F1A;
    color: #E0E0E0;
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Halftone Dot Pattern (pop-art element) --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #39FF14 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

/* --- City Grid Background --- */
#city-grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#city-grid-bg.visible {
    opacity: 1;
}

#grid-svg {
    width: 100%;
    height: 100%;
}

.grid-line {
    stroke: #2A2A3E;
    stroke-width: 1;
    opacity: 0.3;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

.grid-line.animate {
    transition: stroke-dashoffset 2s ease-out;
    stroke-dashoffset: 0;
}

.transit-line {
    stroke-width: 3;
    opacity: 0.25;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

.transit-line.animate {
    transition: stroke-dashoffset 2.5s ease-out;
    stroke-dashoffset: 0;
}

.line-green { stroke: #39FF14; }
.line-cyan { stroke: #00D4FF; }
.line-gold { stroke: #FFD700; }
.line-pink { stroke: #FF3366; }
.line-white { stroke: #FFFFFF; opacity: 0.15; }

/* Energy nodes at intersections */
.energy-node {
    opacity: 0;
    transition: opacity 1s ease 2s;
}

.energy-node.visible {
    opacity: 0.6;
}

.node-green { fill: #39FF14; filter: drop-shadow(0 0 8px #39FF14); }
.node-cyan { fill: #00D4FF; filter: drop-shadow(0 0 8px #00D4FF); }
.node-gold { fill: #FFD700; filter: drop-shadow(0 0 8px #FFD700); }
.node-pink { fill: #FF3366; filter: drop-shadow(0 0 8px #FF3366); }

/* --- Hero Section --- */
#hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    overflow: hidden;
}

#hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: 72px;
    letter-spacing: 0.04em;
    color: #FFFFFF;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(-100vh);
    text-shadow: 0 0 30px rgba(57, 255, 20, 0.4), 0 0 60px rgba(57, 255, 20, 0.1);
}

#hero-title.animate {
    opacity: 1;
    transform: translateY(0);
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 200ms ease;
}

#hero-tagline {
    margin-top: 16px;
    opacity: 0;
    transform: translateY(20px);
}

#hero-tagline.animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 600ms ease 1.8s, transform 600ms ease 1.8s;
}

.hero-connector {
    position: absolute;
    bottom: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, transparent, #39FF14);
    transition: height 1s ease 2.5s;
}

.hero-connector.animate {
    height: 120px;
}

.left-connector {
    left: 30%;
}

.right-connector {
    right: 30%;
    background: linear-gradient(to bottom, transparent, #00D4FF);
}

/* --- Transit Label Style --- */
.transit-label {
    font-family: 'Overpass Mono', monospace;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #39FF14;
}

/* --- Stations Container --- */
#stations-container {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 24px 160px;
}

/* --- Station Blocks --- */
.station {
    position: relative;
    margin-bottom: 120px;
    padding-left: 60px;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.station.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Alternate stations offset right (broken grid) */
.station:nth-child(even) {
    margin-left: 15%;
    transform: translateX(30px);
}

.station:nth-child(even).visible {
    transform: translateX(0);
}

/* Connecting rail line on left */
.station::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 0;
    bottom: -120px;
    width: 3px;
    background: #2A2A3E;
}

.station:last-child::before {
    bottom: 0;
}

/* Color the rail line per station */
.station[data-line="green"]::before { background: rgba(57, 255, 20, 0.3); }
.station[data-line="cyan"]::before { background: rgba(0, 212, 255, 0.3); }
.station[data-line="gold"]::before { background: rgba(255, 215, 0, 0.3); }
.station[data-line="pink"]::before { background: rgba(255, 51, 102, 0.3); }
.station[data-line="white"]::before { background: rgba(255, 255, 255, 0.15); }

/* --- Station Marker --- */
.station-marker {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.station-dot {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #39FF14;
    background: #0F0F1A;
    position: relative;
}

.station[data-line="green"] .station-dot { border-color: #39FF14; }
.station[data-line="cyan"] .station-dot { border-color: #00D4FF; }
.station[data-line="gold"] .station-dot { border-color: #FFD700; }
.station[data-line="pink"] .station-dot { border-color: #FF3366; }
.station[data-line="white"] .station-dot { border-color: #FFFFFF; }

.station-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #39FF14;
}

.station[data-line="green"] .station-dot::after { background: #39FF14; }
.station[data-line="cyan"] .station-dot::after { background: #00D4FF; }
.station[data-line="gold"] .station-dot::after { background: #FFD700; }
.station[data-line="pink"] .station-dot::after { background: #FF3366; }
.station[data-line="white"] .station-dot::after { background: #FFFFFF; }

.station-code {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 10px;
}

.station[data-line="green"] .station-code { color: #39FF14; }
.station[data-line="cyan"] .station-code { color: #00D4FF; }
.station[data-line="gold"] .station-code { color: #FFD700; }
.station[data-line="pink"] .station-code { color: #FF3366; }
.station[data-line="white"] .station-code { color: #FFFFFF; }

/* --- Station Content --- */
.station-content {
    background: rgba(42, 42, 62, 0.4);
    border: 4px solid #2A2A3E;
    padding: 32px;
    position: relative;
}

.station[data-line="green"] .station-content { border-color: rgba(57, 255, 20, 0.3); }
.station[data-line="cyan"] .station-content { border-color: rgba(0, 212, 255, 0.3); }
.station[data-line="gold"] .station-content { border-color: rgba(255, 215, 0, 0.3); }
.station[data-line="pink"] .station-content { border-color: rgba(255, 51, 102, 0.3); }
.station[data-line="white"] .station-content { border-color: rgba(255, 255, 255, 0.15); }

.station-content h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: 40px;
    letter-spacing: 0.04em;
    color: #FFFFFF;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.station-content p {
    color: #E0E0E0;
    margin-bottom: 16px;
}

/* --- Speech Bubble (Pop-Art) --- */
.speech-bubble {
    position: relative;
    background: #FFD700;
    color: #1A1A1A;
    padding: 20px 24px;
    margin-top: 24px;
    border: 4px solid #1A1A1A;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 0.02em;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid #1A1A1A;
}

.speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 34px;
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 16px solid #FFD700;
    z-index: 1;
}

.speech-bubble p {
    color: #1A1A1A;
    font-style: italic;
    margin-bottom: 0;
}

/* --- Transit Map Mini --- */
.transit-map-mini {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.mini-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    position: relative;
}

.mini-line::before {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    flex-shrink: 0;
}

.mini-green::before { background: #39FF14; }
.mini-cyan::before { background: #00D4FF; }
.mini-gold::before { background: #FFD700; }
.mini-pink::before { background: #FF3366; }
.mini-white::before { background: #FFFFFF; }

.mini-green .transit-label { color: #39FF14; }
.mini-cyan .transit-label { color: #00D4FF; }
.mini-gold .transit-label { color: #FFD700; }
.mini-pink .transit-label { color: #FF3366; }
.mini-white .transit-label { color: #FFFFFF; }

/* --- District Grid --- */
.district-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.district-card {
    background: rgba(15, 15, 26, 0.8);
    border: 2px solid rgba(255, 215, 0, 0.3);
    padding: 20px;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.district-card:hover {
    border-color: #FFD700;
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.15);
}

.district-card h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: 24px;
    letter-spacing: 0.04em;
    color: #FFD700;
    margin-bottom: 8px;
}

.district-card p {
    font-size: 14px;
    color: #E0E0E0;
    margin-bottom: 0;
}

/* --- Energy Meter --- */
.energy-meter {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.meter-bar {
    position: relative;
    height: 32px;
    background: rgba(15, 15, 26, 0.8);
    border: 1px solid rgba(255, 51, 102, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-left: 12px;
}

.meter-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #FF3366, rgba(255, 51, 102, 0.3));
    transition: width 1.5s ease;
}

.meter-bar.animate::before {
    width: var(--level);
}

.meter-bar .transit-label {
    position: relative;
    z-index: 1;
    color: #FF3366;
}

/* --- Signal Display --- */
.signal-display {
    margin-top: 24px;
    padding: 20px;
    background: rgba(15, 15, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.signal-wave {
    height: 60px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 4px,
        rgba(255, 255, 255, 0.1) 4px,
        rgba(255, 255, 255, 0.1) 5px
    );
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

.signal-wave::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        rgba(57, 255, 20, 0.6) 2px,
        transparent 4px,
        transparent 8px
    );
    animation: signalScroll 3s linear infinite;
}

@keyframes signalScroll {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0%); }
}

.signal-info {
    display: flex;
    justify-content: space-between;
}

.signal-info .transit-label {
    color: #FFFFFF;
    opacity: 0.7;
}

/* --- Bottom Transit Navigation Bar --- */
#transit-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(15, 15, 26, 0.95);
    border-top: 2px solid #2A2A3E;
    padding: 12px 24px 16px;
    transform: translateY(100%);
    transition: transform 600ms ease;
    backdrop-filter: blur(10px);
}

#transit-nav.visible {
    transform: translateY(0);
}

.nav-line {
    position: absolute;
    top: 0;
    left: 5%;
    width: 90%;
    height: 3px;
    background: linear-gradient(90deg, #39FF14, #00D4FF, #FFD700, #FF3366, #FFFFFF);
}

.nav-stations {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.nav-stop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    transition: transform 0.2s ease;
}

.nav-stop:hover {
    transform: scale(1.1);
}

.nav-dot {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #39FF14;
    background: #0F0F1A;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-stop:hover .nav-dot,
.nav-stop.active .nav-dot {
    background: #39FF14;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.nav-stop[data-line="green"] .nav-dot { border-color: #39FF14; }
.nav-stop[data-line="cyan"] .nav-dot { border-color: #00D4FF; }
.nav-stop[data-line="gold"] .nav-dot { border-color: #FFD700; }
.nav-stop[data-line="pink"] .nav-dot { border-color: #FF3366; }
.nav-stop[data-line="white"] .nav-dot { border-color: #FFFFFF; }

.nav-stop[data-line="green"]:hover .nav-dot,
.nav-stop[data-line="green"].active .nav-dot { background: #39FF14; box-shadow: 0 0 10px rgba(57, 255, 20, 0.5); }
.nav-stop[data-line="cyan"]:hover .nav-dot,
.nav-stop[data-line="cyan"].active .nav-dot { background: #00D4FF; box-shadow: 0 0 10px rgba(0, 212, 255, 0.5); }
.nav-stop[data-line="gold"]:hover .nav-dot,
.nav-stop[data-line="gold"].active .nav-dot { background: #FFD700; box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.nav-stop[data-line="pink"]:hover .nav-dot,
.nav-stop[data-line="pink"].active .nav-dot { background: #FF3366; box-shadow: 0 0 10px rgba(255, 51, 102, 0.5); }
.nav-stop[data-line="white"]:hover .nav-dot,
.nav-stop[data-line="white"].active .nav-dot { background: #FFFFFF; box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }

.nav-label {
    font-size: 9px;
    color: #E0E0E0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.nav-stop:hover .nav-label {
    opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    #hero-title {
        font-size: 48px;
    }

    .station-content h2 {
        font-size: 28px;
    }

    .station:nth-child(even) {
        margin-left: 0;
    }

    .district-grid {
        grid-template-columns: 1fr;
    }

    .nav-label {
        font-size: 8px;
    }
}

@media (max-width: 480px) {
    #hero-title {
        font-size: 36px;
    }

    .station {
        padding-left: 40px;
    }

    .station-content {
        padding: 20px;
    }
}
