html, body {
    margin: 0;
    padding: 0;
    background: #111;
    color: #fff;
    font-family: Arial, sans-serif;
}

body.game-page,
body.auth-page {
    overflow: hidden;
}

canvas {
    display: block;
    background: #252525;
}

#info {
    display: none;
}



#name-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.82);
}

.name-card {
    width: 360px;
    padding: 24px;
    background: rgba(10,10,10,.94);
    border: 2px solid rgba(255,255,255,.75);
    box-shadow: 0 0 30px rgba(56,189,248,.25);
    text-align: center;
}

.name-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

.name-subtitle {
    font-size: 14px;
    opacity: .8;
    margin-bottom: 16px;
}

#player-name-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    font-size: 20px;
    text-align: center;
    color: #fff;
    background: #111;
    border: 1px solid #777;
    outline: none;
    margin-bottom: 12px;
}

#player-name-start {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    background: #22c55e;
    border: 0;
    cursor: pointer;
}

#player-name-error {
    height: 18px;
    margin-top: 10px;
    color: #ef4444;
    font-size: 13px;
}

#user-bar {
    top: 10px;
    right: 12px;
    z-index: 20;
    padding: 8px 12px;
    background: rgba(0,0,0,.65);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 8px;
    font-size: 14px;
}

#user-bar a {
    color: #facc15;
    text-decoration: none;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1f2937, #050505 70%);
}

.auth-card {
    width: 360px;
    padding: 26px;
    background: rgba(10,10,10,.94);
    border: 2px solid rgba(255,255,255,.7);
    box-shadow: 0 0 30px rgba(56,189,248,.25);
    text-align: center;
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.auth-card p {
    margin: 0 0 18px;
    opacity: .8;
    font-size: 14px;
}

.auth-card input {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
    padding: 12px;
    color: #fff;
    background: #111;
    border: 1px solid #777;
    outline: none;
    font-size: 18px;
    text-align: center;
}

.auth-card button {
    width: 100%;
    padding: 12px;
    border: 0;
    cursor: pointer;
    color: #111;
    background: #22c55e;
    font-size: 18px;
    font-weight: 700;
}

.auth-card a {
    display: inline-block;
    margin-top: 16px;
    color: #38bdf8;
    text-decoration: none;
}

.auth-error {
    margin-bottom: 14px;
    color: #ef4444;
    font-size: 14px;
}


/* Landing page */
.landing-page {
    overflow-x: hidden;
    background:
        radial-gradient(circle at 10% 10%, rgba(34,197,94,.22), transparent 28%),
        radial-gradient(circle at 90% 20%, rgba(56,189,248,.18), transparent 32%),
        linear-gradient(135deg, #05070b 0%, #111827 48%, #050505 100%);
    color: #fff;
}

.landing-page * { box-sizing: border-box; }

.landing-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 22px;
    backdrop-filter: blur(16px);
}

.brand {
    color: #fff;
    font-weight: 900;
    font-size: 22px;
    text-decoration: none;
    letter-spacing: -.04em;
}

.brand span {
    color: #22c55e;
    text-shadow: 0 0 18px rgba(34,197,94,.7);
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.landing-nav a {
    color: rgba(255,255,255,.76);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.landing-nav a:hover { color: #fff; }

.nav-login {
    padding: 10px 15px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
}

.hero-section {
    position: relative;
    max-width: 1180px;
    min-height: 720px;
    margin: 0 auto;
    padding: 90px 22px 70px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    gap: 48px;
    align-items: center;
}

.hero-bg-grid {
    position: absolute;
    inset: 0 22px;
    z-index: 0;
    opacity: .18;
    background-image:
        linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at center, black, transparent 72%);
}

.hero-content, .hero-card { position: relative; z-index: 1; }

.hero-kicker,
.section-label,
.section-title span {
    display: inline-flex;
    color: #86efac;
    background: rgba(34,197,94,.12);
    border: 1px solid rgba(34,197,94,.24);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hero-content h1 {
    margin: 22px 0 18px;
    max-width: 760px;
    font-size: clamp(44px, 7vw, 88px);
    line-height: .88;
    letter-spacing: -.075em;
}

.hero-text {
    max-width: 650px;
    margin: 0 0 28px;
    color: rgba(255,255,255,.76);
    font-size: 20px;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 900;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
    color: #041008;
    background: linear-gradient(135deg, #a3e635, #22c55e);
    box-shadow: 0 20px 40px rgba(34,197,94,.28);
}

.btn-secondary {
    color: #fff;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 700px;
}

.hero-stats div,
.feature-grid article,
.steps-list li,
.cta-section {
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.065);
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
    backdrop-filter: blur(18px);
}

.hero-stats div {
    padding: 16px;
    border-radius: 18px;
}

.hero-stats strong,
.hero-stats span { display: block; }
.hero-stats strong { font-size: 16px; }
.hero-stats span { margin-top: 5px; color: rgba(255,255,255,.58); font-size: 13px; }

.hero-card {
    transform: rotate(2deg);
}

.game-window {
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,.16);
    background: #08110c;
    box-shadow: 0 40px 100px rgba(0,0,0,.55), 0 0 80px rgba(34,197,94,.18);
}

.game-window-top {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    background: rgba(255,255,255,.08);
}

.game-window-top span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
}

.mini-map {
    position: relative;
    height: 430px;
    overflow: hidden;
    background:
        linear-gradient(45deg, transparent 48%, rgba(255,255,255,.07) 49%, rgba(255,255,255,.07) 51%, transparent 52%),
        linear-gradient(135deg, #102015, #15241f);
}

.road { position: absolute; background: #202225; box-shadow: inset 0 0 0 2px rgba(255,255,255,.04); }
.road-x { left: -30px; right: -30px; top: 46%; height: 82px; transform: rotate(-8deg); }
.road-y { top: -40px; bottom: -40px; left: 52%; width: 92px; transform: rotate(18deg); }
.block { position: absolute; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); }
.b1 { left: 32px; top: 42px; width: 130px; height: 90px; }
.b2 { right: 46px; top: 72px; width: 120px; height: 120px; }
.b3 { left: 66px; bottom: 50px; width: 150px; height: 110px; }
.b4 { right: 70px; bottom: 48px; width: 125px; height: 80px; }
.car { position: absolute; width: 28px; height: 46px; border-radius: 7px; box-shadow: 0 0 20px currentColor; }
.car-player { left: 48%; top: 51%; background: #22c55e; color: #22c55e; transform: rotate(-8deg); }
.car-police { right: 28%; top: 34%; background: #38bdf8; color: #38bdf8; transform: rotate(18deg); }
.car-enemy { left: 22%; bottom: 24%; background: #ef4444; color: #ef4444; transform: rotate(82deg); }
.hud-preview { position: absolute; left: 18px; right: 18px; bottom: 18px; display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(0,0,0,.72); border: 1px solid rgba(255,255,255,.12); }
.hud-preview b { color: #facc15; }
.hud-preview em { color: #86efac; font-style: normal; }

.section-wrap,
.split-section,
.cta-section,
.landing-footer {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 22px;
    padding-right: 22px;
}

.section-wrap { padding-top: 40px; padding-bottom: 70px; }
.section-title { max-width: 700px; margin-bottom: 28px; }
.section-title h2,
.split-section h2,
.cta-section h2 { margin: 16px 0 12px; font-size: clamp(34px, 4.5vw, 58px); line-height: .98; letter-spacing: -.055em; }
.section-title p,
.split-section p,
.cta-section p { color: rgba(255,255,255,.68); font-size: 18px; line-height: 1.6; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.feature-grid article {
    min-height: 178px;
    padding: 24px;
    border-radius: 24px;
}

.feature-grid h3 { margin: 0 0 10px; font-size: 22px; }
.feature-grid p { margin: 0; color: rgba(255,255,255,.64); line-height: 1.55; }

.split-section {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 34px;
    align-items: start;
    padding-top: 52px;
    padding-bottom: 70px;
}

.steps-list {
    list-style: none;
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
}

.steps-list li {
    position: relative;
    padding: 22px 22px 22px 70px;
    border-radius: 22px;
    counter-increment: step;
}

.steps-list li:before {
    content: counter(step);
    position: absolute;
    left: 20px;
    top: 20px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #041008;
    background: #22c55e;
    font-weight: 900;
}

.steps-list strong,
.steps-list span { display: block; }
.steps-list span { margin-top: 6px; color: rgba(255,255,255,.65); }

.cta-section {
    margin-top: 20px;
    margin-bottom: 50px;
    padding: 54px 34px;
    text-align: center;
    border-radius: 34px;
    background:
        radial-gradient(circle at 30% 20%, rgba(34,197,94,.24), transparent 38%),
        rgba(255,255,255,.07);
}

.cta-section p { max-width: 620px; margin: 0 auto 24px; }

.landing-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 24px;
    padding-bottom: 34px;
    color: rgba(255,255,255,.55);
    border-top: 1px solid rgba(255,255,255,.1);
}

.landing-footer a {
    margin-left: 14px;
    color: rgba(255,255,255,.72);
    text-decoration: none;
}

@media (max-width: 900px) {
    .landing-header { position: relative; align-items: flex-start; }
    .landing-nav { display: none; }
    .hero-section { grid-template-columns: 1fr; min-height: auto; padding-top: 50px; }
    .hero-card { transform: none; }
    .feature-grid { grid-template-columns: 1fr 1fr; }
    .split-section { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .hero-section { padding-top: 34px; }
    .hero-content h1 { font-size: 46px; }
    .hero-text { font-size: 17px; }
    .hero-actions, .hero-stats { grid-template-columns: 1fr; }
    .btn { width: 100%; }
    .feature-grid { grid-template-columns: 1fr; }
    .mini-map { height: 330px; }
    .landing-footer { display: block; text-align: center; }
    .landing-footer div { margin-top: 12px; }
}
