/* xity.quest — cursor reactive creative */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --urban-night: #0D0D1A;
    --street-dark: #1A1A2E;
    --electric-teal: #00F5D4;
    --sunset-coral: #FE6D73;
    --metro-purple: #7400B8;
    --streetlight-white: #E8E8E8;
    --muted-urban: #8888AA;
    --deep-surface: #222240;
    --mx: 50%;
    --my: 50%;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--urban-night);
    color: var(--streetlight-white);
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

/* ===== CURSOR GLOW (flashlight effect) ===== */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background: radial-gradient(circle 200px at var(--mx) var(--my), rgba(0,245,212,0.08), transparent);
    transition: background 0.05s linear;
}

/* ===== CURSOR TRAIL ===== */
.cursor-trail {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--electric-teal);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease, opacity 0.25s ease;
    box-shadow: 0 0 12px rgba(0,245,212,0.6), 0 0 30px rgba(0,245,212,0.2);
    opacity: 0.9;
}

.cursor-trail::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0,245,212,0.4);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.4s ease;
}

/* ===== TYPOGRAPHY ===== */
.section-heading {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 30px;
    color: var(--streetlight-white);
    text-align: center;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.section-heading--sub {
    font-size: 24px;
    margin-top: 3rem;
}

/* ===== PIN ICON ===== */
.pin-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    color: var(--electric-teal);
}

.pin-icon-sm {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--urban-night);
}

.skyline-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    pointer-events: none;
}

.skyline-layer {
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 110%;
    height: 100%;
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.building {
    transition: stroke-opacity 0.3s ease, filter 0.3s ease;
    stroke: var(--electric-teal);
    stroke-width: 0.5;
    stroke-opacity: 0.15;
}

.building.near {
    stroke-opacity: 0.3;
}

.building.lit {
    stroke-opacity: 1;
    filter: drop-shadow(0 0 6px rgba(0,245,212,0.5));
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 600px;
    padding: 0 2rem;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 72px;
    color: var(--electric-teal);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: 0 0 40px rgba(0,245,212,0.3), 0 0 80px rgba(0,245,212,0.1);
    will-change: transform;
    position: relative;
}

.hero-title::after {
    content: 'XITY QUEST';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    color: rgba(0,245,212,0.15);
    z-index: -1;
    transition: transform 0.3s ease;
    will-change: transform;
}

.hero-sub {
    font-size: 18px;
    font-weight: 400;
    color: var(--muted-urban);
    margin-bottom: 2.5rem;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.start-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--urban-night);
    background: var(--electric-teal);
    padding: 14px 36px;
    border-radius: 6px;
    text-decoration: none;
    outline: 2px solid var(--electric-teal);
    outline-offset: 4px;
    box-shadow: 0 0 20px rgba(0,245,212,0.3);
    transition: box-shadow 0.3s ease, outline-offset 0.3s ease, transform 0.3s ease;
    will-change: box-shadow, transform;
}

.start-btn:hover {
    box-shadow: 0 0 40px rgba(0,245,212,0.6), 0 0 80px rgba(0,245,212,0.2);
    outline-offset: 6px;
    transform: translateY(-2px);
}

.start-btn.proximity-glow {
    box-shadow: 0 0 50px rgba(0,245,212,0.7), 0 0 100px rgba(0,245,212,0.3);
}

/* ===== QUEST CARDS ===== */
.quests {
    max-width: 900px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.quest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.quest-card {
    background: var(--street-dark);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    will-change: transform;
    transform: perspective(600px) rotateX(0deg) rotateY(0deg);
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    cursor: none;
}

.quest-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.quest-card:hover .card-overlay {
    opacity: 0.08;
}

.card-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.card-icon {
    margin-bottom: 0.75rem;
}

.quest-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--streetlight-white);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.quest-desc {
    font-size: 14px;
    color: var(--muted-urban);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.street-bar {
    height: 10px;
    background: var(--deep-surface);
    border-radius: 5px;
    position: relative;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.street-center {
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    border-top: 2px dashed var(--muted-urban);
    opacity: 0.3;
    z-index: 1;
}

.street-fill {
    height: 100%;
    background: var(--electric-teal);
    border-radius: 5px;
    position: relative;
    z-index: 2;
    transition: width 1s ease;
}

.street-fill.coral {
    background: var(--sunset-coral);
}

.street-fill.purple {
    background: var(--metro-purple);
}

.walker {
    position: absolute;
    right: -4px;
    top: -10px;
    font-size: 16px;
    animation: walk-bounce 0.6s ease-in-out infinite;
}

@keyframes walk-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.quest-meta {
    font-family: 'Fira Mono', monospace;
    font-size: 12px;
    color: var(--muted-urban);
}

/* ===== NEON HOVER on interactive elements ===== */
.quest-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

.quest-card:hover::before {
    border-color: var(--electric-teal);
    box-shadow: 0 0 15px rgba(0,245,212,0.2);
}

/* ===== MAP SECTION ===== */
.map-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

.map-container {
    margin-bottom: 2rem;
}

.district-map {
    position: relative;
    width: 100%;
    height: 400px;
    background: var(--street-dark);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0,245,212,0.1);
}

.district {
    position: absolute;
    cursor: none;
    transition: transform 0.2s ease;
}

.district-inner {
    width: 100%;
    height: 100%;
    background: var(--deep-surface);
    border: 1px solid rgba(0,245,212,0.15);
    border-radius: 4px;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.district:hover .district-inner {
    background: rgba(0,245,212,0.08);
    border-color: var(--electric-teal);
    box-shadow: 0 0 20px rgba(0,245,212,0.15);
}

.district-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: var(--urban-night);
    border: 1px solid var(--electric-teal);
    border-radius: 6px;
    padding: 8px 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 20;
    box-shadow: 0 0 15px rgba(0,245,212,0.15);
}

.district:hover .district-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dt-name {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: var(--electric-teal);
    margin-bottom: 2px;
}

.dt-quests {
    font-family: 'Fira Mono', monospace;
    font-size: 11px;
    color: var(--muted-urban);
}

/* ===== TROPHY GRID ===== */
.trophy-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto;
}

.trophy {
    background: var(--street-dark);
    padding: 1.25rem 0.75rem;
    border-radius: 8px;
    text-align: center;
    will-change: transform;
    transition: transform 0.2s ease;
}

.trophy:hover {
    transform: translateY(-4px);
}

.trophy.locked {
    opacity: 0.25;
}

.trophy-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 0.4rem;
    will-change: transform;
}

.trophy-name {
    font-family: 'Fira Mono', monospace;
    font-size: 11px;
    color: var(--muted-urban);
}

/* ===== LEADERBOARD ===== */
.leader-panel {
    max-width: 500px;
    margin: 0 auto;
    background: var(--street-dark);
    border-radius: 10px;
    padding: 1.25rem;
}

.leader-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    border-radius: 6px;
    transition: background 0.2s ease;
}

.leader-row:last-child {
    border-bottom: none;
}

.leader-row:hover {
    background: rgba(0,245,212,0.04);
}

.leader-rank {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--electric-teal);
    min-width: 2rem;
    text-align: center;
}

.leader-row:nth-child(1) .leader-rank { color: var(--electric-teal); }
.leader-row:nth-child(2) .leader-rank { color: var(--sunset-coral); }
.leader-row:nth-child(3) .leader-rank { color: var(--metro-purple); }

.leader-name {
    flex: 1;
    font-size: 15px;
    color: var(--streetlight-white);
}

.leader-score {
    font-family: 'Fira Mono', monospace;
    font-size: 13px;
    color: var(--electric-teal);
}

/* ===== JOURNAL ===== */
.journal {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

.journal-entries {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.journal-entry {
    background: var(--street-dark);
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 3px solid var(--electric-teal);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
}

.journal-entry:hover {
    transform: translateX(4px);
    box-shadow: -4px 0 20px rgba(0,245,212,0.08);
}

.journal-entry.completed-quest {
    border-left-color: var(--muted-urban);
    opacity: 0.7;
}

.journal-entry.completed-quest:hover {
    opacity: 0.9;
}

.je-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.je-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-active {
    background: var(--electric-teal);
    box-shadow: 0 0 8px rgba(0,245,212,0.5);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 8px rgba(0,245,212,0.5); }
    50% { box-shadow: 0 0 16px rgba(0,245,212,0.8); }
}

.status-complete {
    background: var(--muted-urban);
}

.je-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--streetlight-white);
    flex: 1;
}

.je-coord {
    font-family: 'Fira Mono', monospace;
    font-size: 11px;
    color: var(--muted-urban);
}

.je-body {
    padding-left: 1.6rem;
}

.je-desc {
    font-size: 14px;
    color: var(--muted-urban);
    margin-bottom: 1rem;
}

/* ===== FOOTER ===== */
.footer {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
    text-align: center;
    will-change: transform;
}

.footer-inner {
    position: relative;
}

.coords {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.coord {
    font-family: 'Fira Mono', monospace;
    font-size: 14px;
    color: var(--muted-urban);
}

.coord-sep {
    color: rgba(136,136,170,0.4);
    font-size: 14px;
}

.footer-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.fstat {
    font-family: 'Fira Mono', monospace;
    font-size: 12px;
    color: var(--electric-teal);
}

.fstat-sep {
    color: rgba(0,245,212,0.3);
    font-size: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.flink {
    font-size: 14px;
    color: var(--muted-urban);
    text-decoration: none;
    transition: color 0.2s ease;
}

.flink:hover {
    color: var(--electric-teal);
}

.footer-copy {
    font-size: 12px;
    color: rgba(136,136,170,0.5);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    .cursor-glow,
    .cursor-trail {
        display: none;
    }

    .hero-title {
        font-size: 48px;
    }

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

    .trophy-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .district-map {
        height: 280px;
    }

    .je-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}

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

    .hero-sub {
        font-size: 15px;
    }

    .section-heading {
        font-size: 24px;
    }

    .trophy-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-stats {
        flex-direction: column;
        gap: 0.25rem;
    }

    .fstat-sep {
        display: none;
    }
}

/* ===== FADE-IN ANIMATION ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
