:root {
  --bg: #06111f;
  --bg-deep: #030914;
  --panel: rgba(13, 30, 50, .86);
  --panel-strong: rgba(11, 26, 44, .96);
  --line: rgba(139, 190, 223, .18);
  --text: #f4fbff;
  --muted: #93aabd;
  --cyan: #54f1ff;
  --cyan-2: #14b8d4;
  --pink: #ff4f9a;
  --gold: #ffd166;
  --green: #59f7a4;
  --danger: #ff5e73;
  --shadow: 0 22px 65px rgba(0,0,0,.35);
  --radius: 24px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--bg-deep); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { overflow-x: hidden; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background:
  radial-gradient(circle at 11% 4%, rgba(34, 176, 210, .14), transparent 29rem),
  radial-gradient(circle at 91% 85%, rgba(255, 79, 154, .09), transparent 28rem),
  linear-gradient(180deg, #071525, #040b16 72%); }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(18px,4vw,62px); border-bottom: 1px solid rgba(255,255,255,.055); position: relative; z-index: 50; background: rgba(4, 13, 25, .54); backdrop-filter: blur(16px); }
.brand { background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; }
.brand img { width: 174px; max-width: 44vw; display: block; }
.icon-button, .back-button { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: rgba(255,255,255,.045); color: var(--text); border-radius: 14px; cursor: pointer; }
.icon-button:hover, .back-button:hover { border-color: rgba(84,241,255,.48); background: rgba(84,241,255,.08); }
main { flex: 1; min-height: 0; }
.screen { display: none; min-height: calc(100dvh - 122px); }
.screen.active { display: block; }
.hero-screen.active { display: grid; }
.hero-screen { position: relative; grid-template-columns: minmax(0, .95fr) minmax(380px, 1.05fr); align-items: center; gap: clamp(30px,4vw,70px); padding: clamp(44px,7vw,105px) clamp(24px,6vw,90px); overflow: hidden; }
.hero-copy { position: relative; z-index: 2; max-width: 760px; }
.eyebrow { font-size: 12px; line-height: 1; text-transform: uppercase; letter-spacing: .2em; color: var(--cyan); font-weight: 800; margin-bottom: 14px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(42px,5.8vw,84px); line-height: .96; letter-spacing: -.055em; margin-bottom: 25px; max-width: 900px; }
h1 span { color: transparent; -webkit-text-stroke: 1px rgba(244,251,255,.86); text-shadow: 0 0 34px rgba(84,241,255,.08); }
h2 { font-size: clamp(30px,4vw,52px); line-height: 1.02; letter-spacing: -.04em; margin: 0; }
h3 { letter-spacing: -.025em; }
.hero-subtitle { color: #aec0cf; font-size: clamp(17px,1.55vw,21px); line-height: 1.62; max-width: 660px; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; }
.primary-button, .secondary-button, .ghost-button { border-radius: 14px; padding: 13px 18px; border: 1px solid transparent; font-weight: 800; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.primary-button { color: #031018; background: linear-gradient(135deg, #75f7ff, #32d6e9); box-shadow: 0 10px 28px rgba(84,241,255,.17); }
.primary-button:hover { transform: translateY(-1px); }
.primary-button:disabled { opacity: .5; cursor: wait; transform: none; }
.secondary-button { color: var(--text); background: rgba(255,255,255,.055); border-color: rgba(160,205,232,.19); }
.secondary-button:hover { border-color: rgba(84,241,255,.4); background: rgba(84,241,255,.07); }
.ghost-button { color: var(--muted); background: transparent; border-color: rgba(255,255,255,.08); }
.big { min-height: 56px; padding: 0 24px; font-size: 16px; }
.wide { width: 100%; min-height: 55px; }
.feature-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); max-width: 620px; margin-top: 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-strip > div { padding: 17px 18px 17px 0; display: flex; gap: 7px; flex-direction: column; }
.feature-strip strong { font-size: 18px; }
.feature-strip span { color: var(--muted); font-size: 12px; }
.hero-art { position: relative; z-index: 2; }
.route-card { position: relative; padding: 17px; border-radius: 32px; background: linear-gradient(145deg, rgba(19,49,76,.93), rgba(5,15,29,.9)); border: 1px solid rgba(125,205,235,.16); box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.05); transform: perspective(1200px) rotateY(-4deg) rotateX(2deg); }
.route-card::before { content:""; position:absolute; inset:7% 10%; background: radial-gradient(circle, rgba(84,241,255,.14), transparent 57%); filter: blur(25px); pointer-events:none; }
.route-card-label { position: absolute; top: 28px; left: 31px; z-index:2; font-size:10px; font-weight:900; letter-spacing:.18em; color:#9eb5c6; }
.route-card svg { width:100%; display:block; }
.route-legend { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; padding:0 12px 8px; color:#91a8b9; font-size:11px; font-weight:700; }
.route-legend span { display:flex; align-items:center; gap:7px; }
.route-legend i { width:7px; height:7px; border-radius:50%; display:inline-block; }
.cyan-dot { background:var(--cyan); box-shadow:0 0 10px var(--cyan); }.pink-dot { background:var(--pink); box-shadow:0 0 10px var(--pink); }
.hero-glow { position:absolute; border-radius:50%; filter:blur(70px); opacity:.17; pointer-events:none; }.hero-glow-one { width:400px;height:400px;background:#15c7e6; right:17%; top:15%; }.hero-glow-two { width:300px;height:300px;background:#ff408e; right:3%; bottom:4%; }
.content-screen { padding: clamp(34px,5vw,72px) clamp(20px,6vw,90px); max-width: 1320px; margin: 0 auto; }
.compact-screen { max-width: 820px; }
.section-heading { display:flex; gap:18px; align-items:flex-start; margin-bottom:32px; }
.section-heading .back-button { flex:0 0 auto; margin-top:2px; }
.mode-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:17px; }
.mode-card { min-height:135px; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:18px; text-align:left; padding:24px; color:var(--text); background:linear-gradient(145deg,rgba(15,38,61,.78),rgba(8,22,38,.78)); border:1px solid var(--line); border-radius:22px; cursor:pointer; box-shadow:0 12px 32px rgba(0,0,0,.13); }
.mode-card:hover { border-color:rgba(84,241,255,.42); transform:translateY(-1px); }.mode-card.featured { background:linear-gradient(145deg,rgba(20,64,79,.88),rgba(8,28,43,.86)); }
.mode-icon { width:52px;height:52px;display:grid;place-items:center;border-radius:16px;background:rgba(255,255,255,.06);font-size:24px; }.mode-copy { display:flex;flex-direction:column;gap:6px; }.mode-copy strong { font-size:18px; }.mode-copy small { color:var(--muted);font-size:13px; }.mode-arrow { color:var(--cyan);font-size:21px; }
.panel { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:clamp(20px,4vw,34px); backdrop-filter:blur(16px); }
.player-inputs { display:grid; gap:12px; }.player-input-row { display:grid; grid-template-columns:34px 1fr auto; align-items:center; gap:12px; }.player-number { width:32px;height:32px;border-radius:11px;display:grid;place-items:center;background:rgba(84,241,255,.08);color:var(--cyan);font-weight:900;font-size:12px; }.text-input,.player-input-row input,.online-panel input { width:100%; border:1px solid rgba(153,201,229,.18); border-radius:14px; background:#071728; color:var(--text); padding:14px 15px; outline:none; }.player-input-row input:focus,.online-panel input:focus,#cityInput:focus { border-color:rgba(84,241,255,.62); box-shadow:0 0 0 3px rgba(84,241,255,.07); }.remove-player { width:36px;height:36px;border:0;border-radius:10px;background:rgba(255,94,115,.08);color:#ff8d9d;cursor:pointer; }.player-tools { display:flex;justify-content:space-between;align-items:center;gap:15px;margin:18px 0 24px;color:var(--muted);font-size:12px; }
.online-panel { display:grid;gap:17px; }.online-panel label { font-size:13px;font-weight:800;color:#dcecf6; }.online-field { display:grid;gap:8px; }.room-code-display { display:flex;justify-content:space-between;align-items:center;padding:21px;border:1px dashed rgba(84,241,255,.32);border-radius:18px;background:rgba(84,241,255,.045); }.room-code-display strong { font-size:31px;letter-spacing:.18em;color:var(--cyan); }.connection-pill { display:inline-flex;align-items:center;gap:7px;font-size:12px;color:var(--muted); }.connection-pill::before { content:"";width:8px;height:8px;border-radius:50%;background:var(--gold);box-shadow:0 0 10px currentColor; }.connection-pill.connected::before { background:var(--green); }
.rules-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px; }.rule-card { display:flex;gap:19px;padding:24px;border-radius:20px;background:rgba(12,30,49,.72);border:1px solid var(--line); }.rule-card > span { color:var(--cyan);font-weight:900;font-size:12px;padding-top:4px; }.rule-card h3 { margin-bottom:8px;font-size:19px; }.rule-card p { color:var(--muted);line-height:1.55;margin:0;font-size:14px; }.rule-card.danger { border-color:rgba(255,79,154,.22); }.rule-card.danger > span { color:var(--pink); }.example-panel { margin-top:18px;display:flex;justify-content:space-between;align-items:center;gap:25px;padding:25px;border-radius:20px;background:linear-gradient(100deg,rgba(15,54,73,.75),rgba(22,30,52,.72));border:1px solid var(--line); }.example-panel h3 { margin-bottom:7px; }.example-panel p { color:var(--muted);margin:0; }
.game-screen.active { display:block; }.game-screen { min-height:calc(100dvh - 78px); }.game-layout { display:grid;grid-template-columns:minmax(285px,360px) minmax(0,1fr);height:calc(100dvh - 78px);min-height:610px; }.game-sidebar { padding:18px;display:flex;flex-direction:column;gap:14px;background:rgba(5,16,29,.96);border-right:1px solid var(--line);overflow:auto;z-index:6; }.game-status-card,.city-form,.route-summary { padding:17px;border-radius:18px;background:rgba(15,34,54,.78);border:1px solid var(--line); }.turn-row { display:flex;align-items:center;gap:10px;font-size:22px; }.turn-dot { width:12px;height:12px;border-radius:50%;background:var(--cyan);box-shadow:0 0 14px var(--cyan); }.online-status { margin-top:10px;color:var(--muted);font-size:11px; }.city-form { display:grid;gap:10px;position:relative; }.city-form label { font-size:12px;font-weight:800;color:#cfe0ec; }.search-row { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px; }.search-row input { min-width:0;border:1px solid rgba(153,201,229,.18);border-radius:13px;background:#061422;color:var(--text);padding:12px 13px;outline:none; }.form-hint { font-size:10px;line-height:1.45;color:#718a9d;margin:0; }.suggestions { position:absolute;z-index:100;top:104px;left:17px;right:17px;background:#07192a;border:1px solid rgba(84,241,255,.2);border-radius:13px;box-shadow:var(--shadow);overflow:hidden;max-height:240px;overflow-y:auto; }.suggestion-button { width:100%;text-align:left;border:0;border-bottom:1px solid rgba(255,255,255,.05);background:transparent;color:var(--text);padding:11px 13px;cursor:pointer; }.suggestion-button:hover { background:rgba(84,241,255,.07); }.route-summary { min-height:150px;flex:1;overflow:hidden;display:flex;flex-direction:column; }.route-summary-head { display:flex;justify-content:space-between;gap:10px;margin-bottom:9px;font-size:12px; }.route-summary-head span { color:var(--muted); }.route-list { list-style:none;padding:0;margin:0;overflow:auto;display:grid;gap:6px; }.route-list li { display:grid;grid-template-columns:24px 1fr auto;gap:7px;align-items:center;padding:8px;border-radius:10px;background:rgba(255,255,255,.035);font-size:12px; }.route-list .route-index { color:var(--cyan);font-size:10px;font-weight:900; }.route-list .route-player { color:var(--muted);font-size:9px; }.sidebar-actions { display:flex;gap:8px; }.sidebar-actions > * { flex:1; }.danger-text { color:#ff8292; }
.map-wrap { position:relative;min-width:0; }.map-wrap::after { content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 100px rgba(2,7,14,.18);z-index:400; }.map-wrap #map { width:100%;height:100%;background:#07131e; }.leaflet-tile-pane { filter: grayscale(.85) saturate(.55) brightness(.68) contrast(1.1) hue-rotate(162deg); }.leaflet-control-attribution { background:rgba(4,12,20,.78)!important;color:#9cb0bf!important;font-size:9px!important; }.leaflet-control-attribution a { color:#b7d9ea!important; }.leaflet-bar a { background:#0c2237!important;color:#eafaff!important;border-color:rgba(255,255,255,.1)!important; }.city-marker { width:18px;height:18px;border-radius:50%;background:var(--marker,#54f1ff);border:3px solid #fff;box-shadow:0 0 0 3px rgba(2,10,18,.55),0 0 16px var(--marker,#54f1ff); }.city-label { background:#071827!important;color:#fff!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:8px!important;box-shadow:0 6px 18px rgba(0,0,0,.25)!important;font-size:11px!important;font-weight:800!important;padding:5px 7px!important; }.city-label::before { display:none!important; }.cross-marker { width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--pink);color:white;border:2px solid white;font-weight:900;box-shadow:0 0 25px var(--pink);font-size:16px;animation:crossPulse .75s ease-in-out infinite alternate; }.crossed-route-line,.crossing-route-line { animation:crossLinePulse .75s ease-in-out infinite alternate; }
@keyframes crossPulse { from { transform:scale(1);box-shadow:0 0 16px var(--pink); } to { transform:scale(1.35);box-shadow:0 0 36px var(--pink); } }
@keyframes crossLinePulse { from { stroke-opacity:.55; } to { stroke-opacity:1; } }
.map-badge { position:absolute;top:15px;left:50%;transform:translateX(-50%);z-index:500;display:flex;align-items:center;gap:7px;padding:9px 12px;border-radius:999px;background:rgba(5,18,31,.85);border:1px solid rgba(255,255,255,.1);backdrop-filter:blur(12px);font-size:11px;font-weight:800;box-shadow:0 10px 30px rgba(0,0,0,.22); }.pulse-dot { width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 10px var(--green); }.toast { position:absolute;z-index:800;bottom:23px;left:50%;transform:translateX(-50%);max-width:min(90%,520px);padding:12px 16px;border-radius:14px;background:#081b2d;border:1px solid rgba(255,255,255,.12);box-shadow:var(--shadow);font-size:13px;font-weight:700;text-align:center; }.toast.error { border-color:rgba(255,94,115,.35);color:#ffd5db; }
.modal-backdrop { position:fixed;inset:0;z-index:2000;background:rgba(0,5,12,.78);backdrop-filter:blur(8px);display:grid;place-items:center;padding:20px; }.modal-card { width:min(560px,100%);max-height:min(85dvh,740px);overflow:auto;padding:28px;border-radius:25px;background:linear-gradient(160deg,#102a43,#071624);border:1px solid rgba(151,211,238,.17);box-shadow:0 30px 100px rgba(0,0,0,.55); }.modal-kicker { color:var(--cyan);font-size:10px;letter-spacing:.18em;text-transform:uppercase;font-weight:900;margin-bottom:9px; }.modal-card h3 { font-size:27px;margin-bottom:8px; }.modal-card > p { color:var(--muted);line-height:1.5; }.place-choices { display:grid;gap:9px;margin:20px 0; }.place-choice { text-align:left;padding:14px;border-radius:14px;background:rgba(255,255,255,.045);color:var(--text);border:1px solid rgba(255,255,255,.09);cursor:pointer; }.place-choice:hover { border-color:rgba(84,241,255,.45); }.place-choice strong { display:block;margin-bottom:4px; }.place-choice small { color:var(--muted); }.result-card { text-align:center; }.result-icon { width:66px;height:66px;margin:0 auto 17px;display:grid;place-items:center;border-radius:22px;background:rgba(255,79,154,.12);font-size:31px;box-shadow:inset 0 0 25px rgba(255,79,154,.08); }.result-route { margin:20px 0;padding:13px;border-radius:14px;background:rgba(255,255,255,.035);color:#b9cedc;font-size:11px;line-height:1.6; }.result-actions { display:flex;gap:10px;justify-content:center; }.hidden { display:none!important; }
.site-footer { min-height:44px;padding:0 clamp(18px,4vw,62px);display:flex;justify-content:space-between;align-items:center;gap:20px;border-top:1px solid rgba(255,255,255,.05);color:#61798d;font-size:9px;letter-spacing:.08em;text-transform:uppercase; }
@media (max-width: 980px) {
  .hero-screen { grid-template-columns:1fr; padding-top:55px; }.hero-art { max-width:720px; }.route-card { transform:none; }.hero-copy { max-width:760px; }.feature-strip { margin-top:34px; }.mode-grid { grid-template-columns:1fr; }.game-layout { grid-template-columns:310px minmax(0,1fr); }
}
@media (max-width: 760px) {
  .topbar { height:64px; }.screen { min-height:calc(100dvh - 102px); }.hero-screen { padding:36px 20px 46px;gap:38px; }.hero-art { margin:0 -5px; }.hero-subtitle { font-size:16px; }.feature-strip > div { padding-right:8px; }.content-screen { padding:30px 17px; }.rules-grid { grid-template-columns:1fr; }.example-panel { align-items:flex-start;flex-direction:column; }.game-screen { min-height:calc(100dvh - 64px); }.game-layout { height:auto;min-height:calc(100dvh - 64px);display:flex;flex-direction:column-reverse; }.map-wrap { height:54dvh;min-height:390px; }.game-sidebar { border-right:0;border-top:1px solid var(--line);padding:12px;overflow:visible; }.route-summary { max-height:200px; }.site-footer { min-height:38px; }.game-screen.active ~ .site-footer { display:none; }
}
@media (max-width: 520px) {
  h1 { font-size:42px; }.hero-actions { display:grid;grid-template-columns:1fr; }.feature-strip { grid-template-columns:repeat(3,1fr); }.feature-strip strong { font-size:16px; }.feature-strip span { font-size:9px; }.mode-card { min-height:112px;padding:18px; }.mode-icon { width:44px;height:44px; }.player-tools { align-items:flex-start;flex-direction:column; }.section-heading { gap:12px; }.back-button { width:40px;height:40px; }.site-footer span:last-child { display:none; }.search-row { grid-template-columns:1fr; }.search-row .primary-button { width:100%; }.suggestions { top:146px; }.result-actions { flex-direction:column; }.room-code-display { align-items:flex-start;gap:12px;flex-direction:column; }
}
.in-game .site-footer { display:none; }
