@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --rtk-primary: #00c2cb;
  --rtk-secondary: #8bc34a;
  --rtk-accent: #ffca28;
  --rtk-dark: #0b0f14;
  --rtk-light: #ffffff;
  --rtk-bg: #0b0f14;
  --rtk-ink: #e6f1f3;
  --rtk-muted: #8aa0a6;
  --rtk-card: #121a22;
  --rtk-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --rtk-radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 10% 0%, rgba(0, 194, 203, 0.12) 0%, transparent 55%),
    radial-gradient(900px 600px at 90% 10%, rgba(139, 195, 74, 0.12) 0%, transparent 45%), var(--rtk-bg);
  color: var(--rtk-ink);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.04),
    rgba(0, 0, 0, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.35;
}

#root {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 18px 60px;
}

.app-shell {
  display: grid;
  gap: 20px;
}

.app-shell.social {
  gap: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px;
  position: relative;
}

.searchbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  background: #0f151d;
  border-radius: 16px;
  padding: 10px;
  border: 2px solid #0f1b1d;
  box-shadow: var(--rtk-shadow);
}

.searchbar input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--rtk-ink);
  font-size: 14px;
}

.rappi-hero {
  display: grid;
  gap: 12px;
}

.hero-map {
  background: linear-gradient(140deg, rgba(0, 194, 203, 0.2), rgba(139, 195, 74, 0.18));
  border-radius: 18px;
  min-height: 180px;
  position: relative;
  border: 2px solid #0f1b1d;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--rtk-ink);
}

.hero-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ffca28;
  color: #0b0f14;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  border: 2px solid #0f1b1d;
  font-size: 11px;
}

.hero-pin {
  font-size: 28px;
}

.hero-sub {
  font-size: 12px;
  color: var(--rtk-muted);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-card {
  background: #0f151d;
  border: 2px solid #0f1b1d;
  border-radius: 14px;
  padding: 12px;
  color: var(--rtk-ink);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  cursor: pointer;
}

.game-hud {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  background: linear-gradient(120deg, #0f172a 0%, #0b4f5c 50%, #0f172a 100%);
  color: #fff;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--rtk-shadow);
}

.level-chip {
  background: #ffca28;
  color: #1e1e1e;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.xp-bar {
  margin-top: 8px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #8bc34a 0%, #ffca28 100%);
  border-radius: 999px;
}

.xp-text {
  font-size: 11px;
  margin-top: 6px;
  opacity: 0.85;
}

.hud-right {
  display: grid;
  gap: 6px;
  justify-items: end;
  font-size: 12px;
}

.streak,
.coins {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  font-family: "Press Start 2P", "Space Grotesk", system-ui, sans-serif;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #0f1b1d;
}

.brand-sub {
  font-size: 12px;
  color: var(--rtk-muted);
}

.top-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  border: none;
  background: #111821;
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: var(--rtk-shadow);
  cursor: pointer;
  border: 2px solid #0f1b1d;
  position: relative;
}

.badge-dot {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ffca28;
  color: #0b0f14;
  border: 2px solid #0f1b1d;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 6px;
}

.notify-panel {
  position: absolute;
  top: 56px;
  right: 0;
  width: min(320px, 92vw);
  background: #0f151d;
  border-radius: 16px;
  box-shadow: var(--rtk-shadow);
  border: 1px solid #1b2733;
  padding: 12px;
  display: grid;
  gap: 10px;
  z-index: 10;
}

.notify-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notify-item {
  background: #101923;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--rtk-ink);
}

.notify-item.info { border-left: 3px solid var(--rtk-primary); }
.notify-item.warning { border-left: 3px solid var(--rtk-accent); }
.notify-item.error { border-left: 3px solid #e63946; }

.notify-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.notify-body {
  color: var(--rtk-muted);
}

.hero {
  background: linear-gradient(130deg, #00c2cb 0%, #5ad4b8 40%, #8bc34a 100%);
  color: #fff;
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--rtk-shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  top: -60px;
  right: -60px;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.5px;
}

.hero p {
  margin: 0 0 18px;
  font-size: 15px;
  max-width: 440px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid #0f1b1d;
  text-transform: uppercase;
  font-size: 12px;
}

.btn-primary {
  background: #e6f1f3;
  color: #0b0f14;
}

.btn-accent {
  background: #ffca28;
  color: #1e1e1e;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.map-card {
  background: var(--rtk-card);
  border-radius: var(--rtk-radius);
  box-shadow: var(--rtk-shadow);
  padding: 16px;
  min-height: 220px;
  display: grid;
  gap: 14px;
}

.map-placeholder {
  background: linear-gradient(160deg, #daf5f6 0%, #f7fffb 100%);
  border-radius: 18px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rtk-muted);
  font-size: 14px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.chip {
  background: #101923;
  color: var(--rtk-ink);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid #0f1b1d;
}

.chip.active {
  background: var(--rtk-primary);
  color: #0b0f14;
}

.stories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
}

.story {
  display: grid;
  gap: 6px;
  align-items: center;
  justify-items: center;
  font-size: 11px;
  min-width: 72px;
  color: var(--rtk-muted);
}

.story-img {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid #e7f7f8;
  background: #ffffff;
  box-shadow: var(--rtk-shadow);
}

.story-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-error {
  font-size: 12px;
  color: #9b1c1c;
}

.story-skel {
  font-size: 12px;
  color: var(--rtk-muted);
  padding: 8px 12px;
}

.missions-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--rtk-shadow);
  display: grid;
  gap: 10px;
}

.delivery-card {
  background: #0f151d;
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--rtk-shadow);
  display: grid;
  gap: 10px;
  border: 2px solid #0f1b1d;
}

.driver-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  background: #101923;
  border-radius: 14px;
  padding: 10px;
  border: 1px solid #1b2733;
}

.driver-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #0f1b1d;
}

.driver-name {
  font-weight: 700;
  font-size: 13px;
}

.driver-sub {
  font-size: 11px;
  color: var(--rtk-muted);
}

.order-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #101923;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid #1b2733;
  align-items: center;
}

.order-title {
  font-weight: 600;
  font-size: 14px;
}

.order-sub {
  font-size: 12px;
  color: var(--rtk-muted);
}

.order-steps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.order-step {
  font-size: 10px;
  border: 1px solid #1b2733;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--rtk-muted);
  background: #0f151d;
}

.order-step.active {
  background: #ffca28;
  color: #0b0f14;
  border-color: #0f1b1d;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 12, 0.75);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 18px;
}

.order-modal {
  width: min(520px, 92vw);
  background: #0f151d;
  border-radius: 18px;
  padding: 16px;
  border: 2px solid #0f1b1d;
  box-shadow: var(--rtk-shadow);
  display: grid;
  gap: 10px;
}

.order-summary {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.order-summary div {
  display: flex;
  justify-content: space-between;
  background: #101923;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #1b2733;
  font-size: 12px;
}

.mission {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid #eef1f4;
}

.mission-title {
  font-weight: 600;
  font-size: 14px;
}

.mission-sub {
  font-size: 12px;
  color: var(--rtk-muted);
}

.mission-xp {
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  white-space: nowrap;
}

.profile-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--rtk-shadow);
  display: grid;
  gap: 12px;
  border: 2px solid #0f1b1d;
}

.profile-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.profile-row .avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 2px solid #0f1b1d;
}

.profile-name {
  font-weight: 700;
  font-size: 16px;
}

.profile-sub {
  font-size: 12px;
  color: var(--rtk-muted);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.profile-stats div {
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  border: 2px solid #0f1b1d;
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.profile-stats strong {
  font-size: 14px;
}

.wallet-card {
  background: linear-gradient(120deg, rgba(0, 194, 203, 0.2) 0%, rgba(139, 195, 74, 0.16) 100%);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--rtk-shadow);
  display: grid;
  gap: 12px;
}

.wallet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.wallet-label {
  font-size: 12px;
  color: var(--rtk-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.wallet-amount {
  font-size: 26px;
  font-weight: 700;
}

.wallet-sub {
  font-size: 12px;
  color: #8bc34a;
}

.wallet-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.composer-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--rtk-card);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--rtk-shadow);
}

.composer-card .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.composer-input {
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: var(--rtk-ink);
}

.wallet-float {
  position: fixed;
  right: 20px;
  bottom: 90px;
  background: #121a22;
  border: none;
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: var(--rtk-shadow);
  display: grid;
  gap: 2px;
  text-align: left;
  cursor: pointer;
  z-index: 20;
}

.wallet-float-label {
  font-size: 11px;
  color: var(--rtk-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.wallet-float-amount {
  font-size: 14px;
  font-weight: 700;
}

.highlight-card {
  background: linear-gradient(120deg, #121a22 0%, #0f151d 100%);
}

.grid-2 {
  display: grid;
  gap: 12px;
}

.mini-card {
  background: #0f151d;
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 6px;
  border: 1px solid #1b2733;
}

.mini-title {
  font-weight: 600;
}

.mini-place {
  font-size: 12px;
  color: var(--rtk-muted);
}

.mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list {
  display: grid;
  gap: 14px;
}

.card {
  background: var(--rtk-card);
  border-radius: 18px;
  box-shadow: var(--rtk-shadow);
  padding: 16px;
  display: grid;
  gap: 10px;
  border: 2px solid #0f1b1d;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.badge {
  background: #101923;
  color: #8bc34a;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 2px solid #0f1b1d;
}

.price {
  font-size: 18px;
  font-weight: 700;
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline-card {
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #0f151d;
  border: 1px solid #1b2733;
}

.timeline-item + .timeline-item {
  margin-top: 10px;
}

.timeline-item .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--rtk-muted);
  margin-bottom: 6px;
}

.timeline-text {
  font-size: 14px;
  color: var(--rtk-ink);
  line-height: 1.4;
}

.link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: #ffca28;
  font-weight: 600;
  text-decoration: none;
}

.link.ghost {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.post-media {
  width: 100%;
  border-radius: 14px;
  margin-top: 10px;
  border: 1px solid #1b2733;
}

.timeline-stats {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--rtk-muted);
}

.skeleton-stack {
  display: grid;
  gap: 8px;
}

.skeleton-line {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1b2733 0%, #0f151d 50%, #1b2733 100%);
  animation: shimmer 1.4s infinite;
}

.skeleton-line.short {
  width: 60%;
}

.error-box {
  background: #2a0f12;
  border: 1px solid #7f1d1d;
  color: #fecaca;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.tabbar {
  position: sticky;
  bottom: 0;
  background: rgba(18, 26, 34, 0.9);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  box-shadow: 0 10px 24px rgba(15, 27, 29, 0.12);
  backdrop-filter: blur(12px);
  border: 2px solid #0f1b1d;
}

@keyframes shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.tab {
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  color: var(--rtk-muted);
  border-radius: 10px;
  border: 2px solid #0f1b1d;
  background: #101923;
  cursor: pointer;
}

.tab.active {
  background: #ffca28;
  color: var(--rtk-dark);
  font-weight: 600;
}

@media (min-width: 920px) {
  .app-shell {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }

  .app-shell.social {
    grid-template-columns: 1fr;
  }

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

  .tabbar {
    position: fixed;
    width: 320px;
    right: 30px;
    bottom: 24px;
  }
}
