/* GTA6Records - neon sunset theme */
:root {
  --bg: #0b0219;
  --bg2: #150530;
  --panel: rgba(30, 10, 60, 0.72);
  --line: rgba(255, 46, 151, 0.28);
  --pink: #ff2e97;
  --cyan: #19e3ff;
  --orange: #ff9a3d;
  --yellow: #ffe45c;
  --text: #f4ecff;
  --muted: #b39fd1;
  --good: #3dffa2;
  --bad: #ff5c6c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Rajdhani', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 46, 151, 0.22), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(25, 227, 255, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg) 60%);
  background-attachment: fixed;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.1; letter-spacing: 0.02em; }
h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 700; text-transform: uppercase; }
h2 { font-size: 24px; text-transform: uppercase; color: var(--cyan); }
h3 { font-size: 19px; }
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 16px 60px; }
.muted { color: var(--muted); }
.loading { text-align: center; color: var(--muted); padding: 60px 0; }
.script { font-family: 'Yellowtail', cursive; text-transform: none; color: var(--pink); text-shadow: 0 0 14px rgba(255, 46, 151, 0.8); font-weight: 400; }
.mono { font-family: 'Share Tech Mono', monospace; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 10px 20px;
  background: rgba(11, 2, 25, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 0 24px rgba(255, 46, 151, 0.18);
}
.logo { display: flex; align-items: baseline; gap: 6px; }
.logo-script { font-family: 'Yellowtail', cursive; font-size: 34px; color: var(--pink); text-shadow: 0 0 12px rgba(255, 46, 151, 0.9); }
.logo-block { font-size: 22px; font-weight: 700; letter-spacing: 0.22em; color: var(--cyan); text-shadow: 0 0 10px rgba(25, 227, 255, 0.7); }
.nav nav { display: flex; align-items: center; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav nav a { padding: 8px 12px; border-radius: 8px; color: var(--text); font-weight: 600; text-transform: uppercase; font-size: 15px; letter-spacing: 0.06em; }
.nav nav a:hover, .nav nav a.active { background: rgba(255, 46, 151, 0.16); color: #fff; }
.nav nav .spacer { flex: 1; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); font-size: 20px; border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.badge-count { background: var(--pink); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 13px; margin-left: 4px; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-block; cursor: pointer; border: 0; border-radius: 10px;
  padding: 10px 20px; font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: #1a0428; background: linear-gradient(90deg, var(--pink), var(--orange));
  box-shadow: 0 0 18px rgba(255, 46, 151, 0.45);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn:hover { transform: translateY(-2px); color: #1a0428; box-shadow: 0 0 26px rgba(255, 46, 151, 0.75); }
.btn:disabled { opacity: 0.5; cursor: wait; transform: none; }
.btn.alt { background: transparent; color: var(--cyan); border: 1px solid var(--cyan); box-shadow: 0 0 14px rgba(25, 227, 255, 0.25); }
.btn.alt:hover { color: #fff; }
.btn.small { padding: 5px 12px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid var(--bad); box-shadow: none; }
.btn.ok { background: var(--good); box-shadow: 0 0 14px rgba(61, 255, 162, 0.4); }

label { display: block; margin: 14px 0 5px; font-weight: 700; text-transform: uppercase; font-size: 14px; letter-spacing: 0.08em; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--text);
  background: rgba(8, 2, 20, 0.8); border: 1px solid rgba(179, 159, 209, 0.3); border-radius: 8px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(25, 227, 255, 0.18); }
input[type=file] { padding: 8px; }
textarea { min-height: 90px; resize: vertical; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.check { display: flex; gap: 10px; align-items: center; margin-top: 16px; text-transform: none; font-size: 16px; color: var(--text); letter-spacing: 0; }
.check input { width: auto; }
.hint { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.form-error { color: var(--bad); font-weight: 700; min-height: 22px; margin: 12px 0 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; align-items: center; }

/* ---------- panels ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; margin-bottom: 22px; backdrop-filter: blur(6px);
}
.panel.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.panel.mid { max-width: 760px; margin-left: auto; margin-right: auto; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.head h1, .head h2 { margin: 0; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filters > div { flex: 1; min-width: 200px; }
.filters label { margin-top: 0; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 18px; margin-bottom: 26px;
  min-height: 400px; padding: 48px 28px 150px; text-align: center;
  background: linear-gradient(180deg, #1b0647 0%, #5b1a7a 38%, #d4347f 68%, #ff9a3d 100%);
  border: 1px solid var(--line);
}
.hero .sun {
  position: absolute; left: 50%; bottom: 96px; width: 300px; height: 300px; transform: translateX(-50%);
  border-radius: 50%;
  background: repeating-linear-gradient(180deg, transparent 0 22px, rgba(27, 6, 71, 0.0) 22px 22px), linear-gradient(180deg, var(--yellow), var(--pink));
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 26px, transparent 26px 32px);
  mask-image: repeating-linear-gradient(180deg, #000 0 26px, transparent 26px 32px);
  opacity: 0.85;
}
.hero .grid {
  position: absolute; left: -50%; right: -50%; bottom: 0; height: 110px;
  background:
    linear-gradient(transparent 0, rgba(11, 2, 25, 0.2) 100%),
    repeating-linear-gradient(90deg, rgba(25, 227, 255, 0.55) 0 2px, transparent 2px 60px),
    repeating-linear-gradient(180deg, rgba(25, 227, 255, 0.55) 0 2px, transparent 2px 28px),
    #12032b;
  transform: perspective(300px) rotateX(55deg); transform-origin: bottom;
  animation: drive 1.2s linear infinite;
}
@keyframes drive { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 0 0, 0 0, 0 28px; } }
.hero .palm { position: absolute; bottom: 60px; width: 150px; height: 250px; fill: #12032b; }
.hero .palm.l { left: 3%; }
.hero .palm.r { right: 3%; transform: scaleX(-1); }
.hero-inner { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(34px, 7vw, 68px); text-shadow: 0 0 22px rgba(25, 227, 255, 0.6), 3px 3px 0 rgba(27, 6, 71, 0.7); }
.hero .tag { font-family: 'Yellowtail', cursive; font-size: clamp(28px, 5vw, 46px); color: #fff; text-shadow: 0 0 14px var(--pink), 0 0 30px var(--pink); margin: 0 0 6px; }
.hero p.lead { max-width: 620px; margin: 0 auto 22px; font-size: 20px; color: #ffe9f6; text-shadow: 0 1px 6px rgba(27, 6, 71, 0.9); }
.hero .actions { justify-content: center; }
@media (prefers-reduced-motion: reduce) { .hero .grid { animation: none; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { text-align: center; padding: 16px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.stat b { display: block; font-family: 'Share Tech Mono', monospace; font-size: 34px; color: var(--yellow); text-shadow: 0 0 12px rgba(255, 228, 92, 0.5); }
.stat span { text-transform: uppercase; letter-spacing: 0.12em; font-size: 14px; color: var(--muted); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid rgba(179, 159, 209, 0.12); vertical-align: middle; }
tr:hover td { background: rgba(255, 46, 151, 0.06); }
td.time { font-family: 'Share Tech Mono', monospace; font-size: 20px; color: var(--yellow); white-space: nowrap; }
td.rank { font-family: 'Share Tech Mono', monospace; font-size: 20px; width: 50px; }
tr.p1 td.rank { color: #ffd700; text-shadow: 0 0 10px #ffd700; }
tr.p2 td.rank { color: #d9e2ec; }
tr.p3 td.rank { color: #e0975a; }
.gap { font-family: 'Share Tech Mono', monospace; font-size: 14px; color: var(--muted); }
.driver { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--pink), var(--cyan)); display: inline-flex; align-items: center; justify-content: center; color: #1a0428; font-weight: 700; font-size: 15px; flex: none; }
.avatar.big { width: 96px; height: 96px; font-size: 44px; border: 3px solid var(--pink); box-shadow: 0 0 20px rgba(255, 46, 151, 0.6); }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; border: 1px solid currentColor; white-space: nowrap; }
.pill.class { color: var(--cyan); }
.pill.approved { color: var(--good); }
.pill.pending { color: var(--yellow); }
.pill.unverified { color: var(--muted); }
.pill.rejected { color: var(--bad); }
.pill.role { color: var(--orange); }

.tier { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; font-weight: 700; font-size: 18px; color: #14021f; }
.tier.S { background: #ff4d6d; box-shadow: 0 0 12px rgba(255, 77, 109, 0.7); }
.tier.A { background: var(--orange); }
.tier.B { background: var(--yellow); }
.tier.C { background: var(--good); }
.tier.D { background: var(--cyan); }
.tier.E { background: #a493ff; }
.tier.F { background: #8d8a9c; }
.tier.Sp { background: linear-gradient(135deg, var(--yellow), var(--pink)); box-shadow: 0 0 14px rgba(255, 46, 151, 0.9); font-size: 15px; }
.tier-row .tier.Sp { font-size: 22px; }
[hidden] { display: none !important; }

/* ---------- tier list ---------- */
.tier-row { display: flex; gap: 12px; align-items: stretch; margin-bottom: 8px; }
.tier-row .tier { width: 54px; height: auto; min-height: 54px; font-size: 28px; flex: none; }
.tier-cars { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; background: rgba(8, 2, 20, 0.5); border-radius: 8px; align-items: center; }
.car-chip { padding: 6px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(179, 159, 209, 0.25); font-weight: 700; }
.car-chip small { color: var(--muted); font-weight: 500; margin-left: 6px; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { display: block; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(255, 46, 151, 0.3); color: var(--text); }
.card .thumb { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; display: block; background: linear-gradient(135deg, #3a0f6b, #d4347f 70%, #ff9a3d); }
.card .thumb.none { display: flex; align-items: center; justify-content: center; font-family: 'Yellowtail', cursive; font-size: 30px; color: rgba(255, 255, 255, 0.8); }
.card .body { padding: 12px 14px 14px; }
.card h3 { margin-bottom: 4px; }
.card .nick { font-family: 'Yellowtail', cursive; color: var(--pink); font-size: 20px; }

/* ---------- media ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 14px 0; }
.gallery img, .gallery video { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: #000; display: block; max-height: 420px; object-fit: contain; }
.build td:first-child { color: var(--cyan); font-weight: 700; text-transform: uppercase; font-size: 15px; width: 34%; }
.build-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; margin-bottom: 8px; }
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 16px 0; }
.kv div span { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.kv div b { font-size: 20px; }
.big-time { font-family: 'Share Tech Mono', monospace; font-size: clamp(40px, 8vw, 64px); color: var(--yellow); text-shadow: 0 0 18px rgba(255, 228, 92, 0.5); }
.queue-item { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.queue-item:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }

/* ---------- step-by-step forms ---------- */
.wiz { min-height: 420px; }
.wiz h1 { margin-bottom: 18px; }
.progress { height: 6px; border-radius: 99px; background: rgba(179, 159, 209, 0.18); overflow: hidden; margin-bottom: 14px; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--pink)); box-shadow: 0 0 12px var(--pink); transition: width 0.25s; }
.step-count { margin: 0 0 4px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--pink); font-weight: 700; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.opts.small { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); max-height: 420px; overflow-y: auto; padding-right: 4px; }
.opt {
  display: flex; flex-direction: column; gap: 3px; text-align: left; cursor: pointer;
  padding: 14px 16px; border-radius: 12px; font: inherit; color: var(--text);
  background: rgba(8, 2, 20, 0.7); border: 1px solid rgba(179, 159, 209, 0.3);
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.opt b { font-size: 18px; }
.opt small { color: var(--muted); font-size: 14px; }
.opt:hover, .opt:focus-visible { outline: none; border-color: var(--cyan); transform: translateY(-2px); box-shadow: 0 0 16px rgba(25, 227, 255, 0.3); }
.opt.sel { border-color: var(--pink); box-shadow: 0 0 16px rgba(255, 46, 151, 0.45); }
.opts.small .opt { padding: 10px 12px; }
.opts.small .opt b { font-size: 16px; }
.wiz h3.group { margin: 20px 0 0; font-size: 15px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--cyan); }
.wiz h3.group + .opts { margin-top: 8px; }
optgroup { background: #150530; color: var(--cyan); }
option { background: #0b0219; color: var(--text); }
.big-input { font-size: 30px; text-align: center; padding: 14px; color: var(--yellow); }
.summary { background: rgba(8, 2, 20, 0.5); border-radius: 12px; padding: 16px; }
.hero .btn.alt { background: rgba(11, 2, 25, 0.7); color: #fff; }

/* ---------- community feed ---------- */
.composer textarea { min-height: 76px; font-size: 18px; }
.file-btn { cursor: pointer; }
.feed-item { padding: 16px 0; border-top: 1px solid rgba(179, 159, 209, 0.16); }
.feed-item:first-child { border-top: 0; }
.feed-head { display: flex; gap: 10px; align-items: center; }
.feed-head > div { flex: 1; min-width: 0; line-height: 1.2; }
.feed-head .avatar { width: 40px; height: 40px; font-size: 18px; }
.feed-time { font-size: 13px; color: var(--muted); }
.feed-body { margin: 10px 0 0; font-size: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.feed-item .gallery { margin-bottom: 0; }
.feed-card {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; padding: 12px 14px; color: var(--text);
  background: rgba(8, 2, 20, 0.55); border: 1px solid rgba(179, 159, 209, 0.25); border-radius: 12px; transition: border-color 0.12s;
}
.feed-card:hover { border-color: var(--cyan); color: var(--text); }
.feed-card > span:not(.tier):not(.big-time) { flex: 1; min-width: 140px; }
.feed-thumb { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; }

footer { text-align: center; padding: 18px 16px 26px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer p { margin: 0; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 50; background: #1a0428; border: 1px solid var(--cyan); color: #fff; padding: 12px 22px; border-radius: 10px; box-shadow: 0 0 24px rgba(25, 227, 255, 0.4); font-weight: 700; max-width: 90vw; }
.toast.err { border-color: var(--bad); box-shadow: 0 0 24px rgba(255, 92, 108, 0.4); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav nav { display: none; flex-direction: column; align-items: stretch; flex-basis: 100%; }
  .nav nav.open { display: flex; }
  .nav nav .spacer { display: none; }
  .hero .palm { width: 90px; height: 150px; }
  .hero .sun { width: 220px; height: 220px; }
  .stats { grid-template-columns: 1fr; }
  .build-row { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}
