/* The Crypto Taxi — mini ciudad (ver js/scenes/city.js) */
.city-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #1C2452;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.city-scene.is-dragging {
  cursor: grabbing;
}

.city-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.city-svg text,
.cs-txt {
  font-family: var(--font-display, "Bungee", "Arial Black", sans-serif);
}

/* Capas sin interacción */
.cs-sky,
.cs-screen,
.cs-clouds,
.cs-hills,
.cs-far,
.cs-farlights,
.cs-traffic,
.cs-fore,
.cs-night,
.cs-lights,
.cs-fx {
  pointer-events: none;
}

/* Edificios clicables */
.cs-bldg {
  cursor: pointer;
  outline: none;
  transition: transform 0.28s var(--ease-out, ease-out), filter 0.2s ease;
}

.cs-bldg.is-hover {
  transform: translateY(-6px);
  filter: drop-shadow(0 0 1.5px #FFC629) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.cs-lights-b {
  transition: transform 0.28s var(--ease-out, ease-out);
}

.cs-lights-b.is-hover {
  transform: translateY(-6px);
}

/* Carteles flotantes de los edificios */
.cs-label {
  cursor: pointer;
  transition: transform 0.28s var(--ease-out, ease-out);
}

.cs-label-bg {
  fill: #1B1F2A;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2;
  transition: fill 0.2s ease;
}

.cs-label-tip {
  fill: #1B1F2A;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2;
  stroke-linejoin: round;
  transition: fill 0.2s ease;
}

.cs-label-txt {
  font-size: 13px;
  letter-spacing: 1px;
  fill: #FFFFFF;
  transition: fill 0.2s ease;
}

.cs-label.is-hover {
  transform: translateY(-10px);
}

.cs-label.is-hover .cs-label-bg,
.cs-label.is-hover .cs-label-tip {
  fill: var(--taxi, #FFC629);
  stroke: #1B1F2A;
}

.cs-label.is-hover .cs-label-txt {
  fill: #1B1F2A;
}

/* Edificios que todavía no abren */
.cs-label.is-soon .cs-label-bg,
.cs-label.is-soon .cs-label-tip {
  fill: #3A3F4F;
}

.cs-label.is-soon .cs-label-txt {
  fill: #FFB4B6;
}

.cs-pronto {
  pointer-events: none;
}

/* Etiquetas de los taxis en viaje */
.cs-tag-bg {
  fill: var(--taxi, #FFC629);
  stroke: #1B1F2A;
  stroke-width: 2.4;
}

.cs-tag-tip {
  fill: var(--taxi, #FFC629);
  stroke: #1B1F2A;
  stroke-width: 2.4;
  stroke-linejoin: round;
}

.cs-tag-label,
.cs-tag-time {
  font-size: 12.5px;
  fill: #1B1F2A;
}

.cs-tag-label {
  font-family: var(--font-display, "Bungee", sans-serif);
}

.cs-tag-time {
  font-family: var(--font-ui, "Rubik", sans-serif);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cs-tag-track {
  fill: rgba(27, 31, 42, 0.55);
}

.cs-tag-bar {
  fill: #3DDBA8;
}

.cs-tag.is-leaving {
  display: none;
}

/* Etiqueta con el usuario de otros jugadores en línea */
.cs-ntag-bg {
  fill: rgba(18, 22, 32, 0.86);
  stroke: rgba(255, 255, 255, 0.28);
  stroke-width: 1.2;
}

.cs-ntag-dot {
  stroke: rgba(0, 0, 0, 0.4);
  stroke-width: 1;
}

.cs-ntag-label {
  font-family: var(--font-ui, "Rubik", sans-serif);
  font-size: 11px;
  font-weight: 700;
  fill: #F3F5F9;
}

/* Vida en la calle */
.cs-idle {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: cs-idle 3.4s ease-in-out infinite;
}

.cs-sway {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: cs-sway 6s ease-in-out infinite;
}

.cs-balloons {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: cs-sway 4.2s ease-in-out infinite;
}

.cs-flag {
  transform-box: fill-box;
  transform-origin: 0 50%;
  animation: cs-flag 1.6s ease-in-out infinite alternate;
}

.cs-jets {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: cs-jets 1.2s ease-in-out infinite alternate;
}

@keyframes cs-idle {
  0%, 100% { transform: rotate(-1.2deg) translateY(0); }
  50% { transform: rotate(1.2deg) translateY(-0.6px); }
}

@keyframes cs-sway {
  0%, 100% { transform: rotate(-1.4deg); }
  50% { transform: rotate(1.4deg); }
}

@keyframes cs-flag {
  from { transform: skewY(-6deg) scaleX(0.92); }
  to { transform: skewY(5deg) scaleX(1); }
}

@keyframes cs-jets {
  from { transform: scaleY(0.9); opacity: 0.8; }
  to { transform: scaleY(1.06); opacity: 1; }
}

/* Botones laterales y ayuda */
.city-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(27, 31, 42, 0.72);
  color: #FFFFFF;
  font: 700 26px/1 var(--font-ui, system-ui, sans-serif);
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s var(--ease-out, ease-out);
}

.city-nav:hover {
  background: rgba(27, 31, 42, 0.9);
}

.city-nav:active {
  transform: translateY(-50%) scale(0.94);
}

.city-nav:focus-visible {
  outline: 3px solid var(--taxi, #FFC629);
  outline-offset: 2px;
}

.city-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.city-nav--l {
  left: 16px;
}

.city-nav--r {
  right: 16px;
}

.city-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(27, 31, 42, 0.78);
  color: #FFFFFF;
  font: 600 13px/1.2 var(--font-ui, system-ui, sans-serif);
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out, ease-out);
}

.city-hint.is-hidden {
  opacity: 0;
  transform: translate(-50%, 8px);
}

@media (hover: none) {
  .city-nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-idle,
  .cs-sway,
  .cs-balloons,
  .cs-flag,
  .cs-jets {
    animation: none;
  }

  .cs-bldg,
  .cs-label,
  .cs-lights-b {
    transition: none;
  }
}

/* Avionetas con cartel de Telegram */
.sky-plane {
  position: absolute; left: 0; z-index: 5; display: flex; align-items: center; text-decoration: none; cursor: pointer; will-change: transform;
}
.sky-plane__body { display: block; animation: sky-bob 2.4s ease-in-out infinite; }
.sky-plane__svg { display: block; width: 104px; height: auto; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .25)); }
.sky-plane__prop { transform-box: fill-box; transform-origin: center; animation: sky-prop .09s linear infinite alternate; }
.sky-plane__blink { animation: sky-blink 1.1s steps(2, start) infinite; }
.sky-plane__rope { width: 54px; height: 0; border-top: 2px solid rgba(27, 31, 42, .75); margin: 0 -2px; transform: translateY(6px) rotate(-4deg); }
.sky-plane__banner { display: block; animation: sky-bob 2.4s ease-in-out -.4s infinite; }
.sky-plane__cloth {
  display: flex; align-items: center; gap: 8px; padding: 6px 16px 6px 8px; border: 2.5px solid #1B1F2A; border-radius: 4px 12px 12px 4px;
  background: linear-gradient(180deg, #FFF4C2, #FFE38A); color: #1B1F2A; box-shadow: 0 8px 18px rgba(0, 0, 0, .3);
  transform-origin: right center; animation: sky-wave 1.6s ease-in-out infinite; transition: filter .2s, transform .2s;
}
.sky-plane__cloth > span { display: grid; line-height: 1.1; text-align: left; }
.sky-plane__cloth b { font-family: var(--font-display, "Bungee", sans-serif); font-weight: 400; font-size: 14px; letter-spacing: .02em; white-space: nowrap; }
.sky-plane__cloth small { font-family: var(--font-ui, "Rubik", sans-serif); font-size: 11px; font-weight: 700; color: #4A3D12; white-space: nowrap; }
.sky-plane__tg { width: 28px; height: 28px; flex: none; }
.sky-plane:hover .sky-plane__cloth { filter: brightness(1.06); box-shadow: 0 0 0 3px rgba(42, 171, 238, .6), 0 8px 18px rgba(0, 0, 0, .3); }
.sky-plane--support .sky-plane__cloth { background: linear-gradient(180deg, #E4F4FD, #BFE6FA); }
.sky-plane--chat .sky-plane__cloth { background: linear-gradient(180deg, #FFFFFF, #E9EDF3); }
@keyframes sky-bob { 50% { transform: translateY(-6px); } }
@keyframes sky-prop { to { transform: scaleY(.15); } }
@keyframes sky-blink { 50% { opacity: 0; } }
@keyframes sky-wave { 0%, 100% { transform: skewY(-1.5deg); } 50% { transform: skewY(1.5deg) scaleX(.985); } }
@media (max-width: 900px) {
  .sky-plane__svg { width: 80px; }
  .sky-plane__rope { width: 34px; }
  .sky-plane__cloth { padding: 4px 12px 4px 6px; gap: 6px; }
  .sky-plane__cloth b { font-size: 12px; }
  .sky-plane__cloth small { font-size: 10px; }
  .sky-plane__tg { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .sky-plane__body, .sky-plane__banner, .sky-plane__cloth, .sky-plane__prop { animation: none; }
}

/* Auto de aplicación (se le tiran huevos) */
.cs-car.is-appcar { cursor: pointer; }
.cs-car.is-appcar:hover { filter: drop-shadow(0 0 6px rgba(255, 198, 41, .8)); }
.cs-splat { animation: cs-splat .25s cubic-bezier(.34, 1.56, .64, 1) both; transform-box: fill-box; }
@keyframes cs-splat { from { opacity: 0; } }
.egg-fly {
  position: fixed; left: -9px; top: -11px; z-index: 260; width: 18px; height: 22px; pointer-events: none;
  border-radius: 50% 50% 48% 48% / 60% 60% 40% 40%; border: 1.5px solid #1B1F2A;
  background: radial-gradient(circle at 35% 30%, #FFFFFF, #F3EBD8 60%, #E2D6BA);
}
