:root {
  --bg: #070b0d;
  --panel: rgba(12, 17, 20, 0.88);
  --panel-solid: #11181c;
  --line: rgba(255, 255, 255, 0.14);
  --orange-line: rgba(255, 111, 0, 0.46);
  --text: #ffffff;
  --muted: #c5cbd0;
  --orange: #ff6b00;
  --orange-2: #ff9d2e;
  --teal: #23dbc7;
  --green: #35d978;
  --red: #ff5568;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  display: grid;
  width: 100%;
  min-height: 78px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 0 clamp(20px, 5vw, 62px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(5, 8, 10, 0.92), rgba(5, 8, 10, 0.54));
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.brand em {
  color: var(--orange);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-style: italic;
  transform: rotate(-8deg);
}

.main-nav {
  display: flex;
  gap: clamp(12px, 2vw, 28px);
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-tab,
.portal-tab,
.tab {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #f2f2f2;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-tab.active,
.portal-tab.active,
.tab.active {
  border-color: var(--orange-line);
  color: var(--orange-2);
}

.server-pill,
.play-button,
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.server-pill {
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.server-pill span:first-child {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
}

.server-pill span:first-child.offline {
  background: var(--red);
  box-shadow: 0 0 16px rgba(255, 85, 104, 0.7);
}

.play-button,
.button.primary {
  border: 1px solid var(--orange);
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #160900;
  box-shadow: 0 0 24px rgba(255, 107, 0, 0.28);
}

.play-button {
  padding: 0 22px;
}

.button {
  padding: 0 24px;
  cursor: pointer;
}

.button.ghost,
.button.outline {
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 150px clamp(20px, 5vw, 62px) 40px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 10, 0.94) 0%, rgba(5, 8, 10, 0.5) 48%, rgba(5, 8, 10, 0.2) 100%),
    linear-gradient(180deg, rgba(5, 8, 10, 0.02) 0%, rgba(5, 8, 10, 0.68) 78%, var(--bg) 100%),
    url("assets/rio-rp-hero.png");
  background-position: center right;
  background-size: cover;
}

.hero::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 18%, rgba(255, 107, 0, 0.28), transparent 25%),
    radial-gradient(circle at 20% 76%, rgba(255, 107, 0, 0.14), transparent 28%);
  content: "";
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(620px, 100%);
  min-height: calc(100vh - 240px);
  align-content: center;
}

.script-title {
  margin: 0 0 8px;
  color: var(--orange);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-style: italic;
  letter-spacing: 0.02em;
  transform: rotate(-3deg);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 2px;
  font-size: clamp(6rem, 14vw, 11rem);
  line-height: 0.78;
}

h1 span {
  color: var(--text);
}

h1 em,
h1 + h2,
h2 span {
  color: var(--orange);
}

.hero h2 {
  margin-bottom: 22px;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.hero-copy {
  max-width: 520px;
  color: #e1e5e7;
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.feature-strip,
.stat-grid,
.about-preview,
.content-section,
.news-discord,
.inner-page {
  position: relative;
  z-index: 2;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: -72px;
}

.feature-strip article,
.stat-grid,
.about-preview,
.team-card,
.news-cards article,
.discord-box,
.rule-grid article,
.system-grid article,
.auth-card,
.profile-panel,
.dashboard-main,
.money-grid article,
.detail-grid div,
.tab-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)), var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.feature-strip article {
  min-height: 190px;
  padding: 26px;
}

.icon-box,
.stat-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  place-items: center;
  color: var(--orange);
  font-weight: 900;
}

.feature-strip h3,
.system-grid h3,
.rule-grid h3,
.news-cards h3,
.discord-box h3 {
  margin-bottom: 10px;
  font-size: 1.45rem;
}

.feature-strip p,
.about-preview p,
.system-grid p,
.rule-grid p,
.news-cards p,
.discord-box p,
.profile-panel p,
.empty-state {
  color: var(--muted);
  line-height: 1.6;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 30px;
  overflow: hidden;
}

.stat-grid article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  min-height: 100px;
  padding: 20px 28px;
  border-right: 1px solid var(--line);
}

.stat-grid article:last-child {
  border-right: 0;
}

.stat-grid strong {
  display: block;
  font-size: 2.1rem;
  line-height: 1;
}

.stat-grid strong span {
  color: var(--orange);
}

.stat-grid .online {
  color: var(--green);
}

.stat-grid .offline {
  color: var(--red);
}

.stat-grid small {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 34px;
  align-items: center;
  margin-top: 28px;
  padding: 0;
  background: transparent;
}

.about-preview > div:first-child {
  padding: 24px 0;
}

.section-kicker,
.section-title p {
  margin: 0 0 8px;
  color: var(--orange);
  font-weight: 900;
  text-transform: uppercase;
}

.about-preview h2,
.section-title h2,
.inner-page h2 {
  margin-bottom: 14px;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.92;
}

.video-card {
  min-height: 300px;
  padding: 28px;
  border: 1px solid var(--orange-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.64)),
    url("assets/rio-rp-hero.png");
  background-position: center;
  background-size: cover;
}

.video-card span,
.video-card strong {
  display: block;
  font-family: "Bebas Neue", Impact, sans-serif;
  text-transform: uppercase;
}

.video-card span {
  margin-top: 150px;
  color: var(--text);
  font-size: 3rem;
}

.video-card strong {
  color: var(--orange);
  font-size: 1.7rem;
}

.content-section,
.inner-page,
.news-discord {
  padding-top: 64px;
}

.inner-page {
  min-height: 100vh;
  padding-top: 150px;
}

.section-title {
  margin-bottom: 28px;
}

.team-grid,
.system-grid,
.rule-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.system-grid,
.rule-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.team-card {
  min-height: 210px;
  padding: 24px 16px;
  text-align: center;
}

.team-avatar,
.avatar {
  display: grid;
  width: 78px;
  height: 78px;
  margin: 0 auto 16px;
  place-items: center;
  border: 2px solid rgba(255, 107, 0, 0.62);
  border-radius: 50%;
  background: radial-gradient(circle at 70% 18%, var(--teal), transparent 34%), radial-gradient(circle at 20% 80%, var(--orange), transparent 42%), #11181c;
  color: #fff;
  font-weight: 900;
}

.team-card h3 {
  margin-bottom: 8px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
}

.team-card p {
  margin: 2px 0;
  color: var(--orange);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-discord {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  padding-bottom: 70px;
}

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

.news-cards article,
.discord-box,
.rule-grid article,
.system-grid article {
  padding: 24px;
}

.news-cards time {
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
}

.discord-box ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 24px;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.discord-box li::before {
  color: var(--orange);
  content: "+ ";
}

.portal-tabs,
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.portal-tab,
.tab {
  padding: 0 18px;
}

.portal-panel,
.tab-panel {
  display: none;
}

.portal-panel.active,
.tab-panel.active {
  display: block;
}

.status-message {
  min-height: 24px;
  margin: 0 0 18px;
  color: var(--orange-2);
  font-weight: 800;
  text-align: center;
}

.auth-card {
  display: grid;
  max-width: 620px;
  gap: 16px;
  margin: 0 auto;
  padding: 26px;
}

.auth-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-card input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.auth-card input:focus {
  border-color: var(--orange);
  outline: 0;
}

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

.profile-panel,
.dashboard-main {
  padding: 24px;
}

.profile-panel {
  text-align: center;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 18px 0;
}

.profile-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #e3e6e8;
  font-size: 0.82rem;
  font-weight: 800;
}

.profile-tags span {
  padding: 8px 10px;
}

.profile-meta {
  display: grid;
  gap: 10px;
  margin: 0;
  text-align: left;
}

.profile-meta div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profile-meta dt {
  color: var(--muted);
}

.profile-meta dd {
  margin: 0;
  font-weight: 900;
  text-align: right;
}

.logout-button {
  width: 100%;
  min-height: 42px;
  margin-top: 20px;
  border: 1px solid rgba(255, 85, 104, 0.48);
  border-radius: 6px;
  background: rgba(255, 85, 104, 0.12);
  color: #ffdce0;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
}

.hidden {
  display: none !important;
}

.money-grid,
.detail-grid,
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.detail-grid,
.inventory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.inventory-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  align-items: stretch;
}

.money-grid article,
.detail-grid div {
  padding: 18px;
}

.money-grid span,
.detail-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.money-grid strong {
  font-size: 1.8rem;
}

.tab-panel {
  min-height: 220px;
  padding: 12px;
}

.inventory-item {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  min-height: 96px;
  padding: 16px 52px 16px 16px;
  border: 1px solid rgba(255, 122, 40, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 122, 40, 0.12), transparent 46%),
    rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.inventory-image {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}

.inventory-image img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  image-rendering: auto;
}

.inventory-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.2;
}

.inventory-item b {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 28px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--orange);
  color: #101010;
  font-size: 0.78rem;
  text-align: center;
}

.vehicle-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

.vehicle-row:last-child {
  border-bottom: 0;
}

.vehicle-row span {
  font-weight: 900;
}

.vehicle-row small,
.empty-state {
  color: var(--muted);
}

.vehicle-row b {
  justify-self: end;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.14);
  color: var(--orange-2);
}

.empty-state {
  margin: 0;
  padding: 16px;
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .server-pill {
    display: none;
  }

  .feature-strip,
  .stat-grid,
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-discord,
  .about-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .topbar {
    grid-template-columns: 1fr auto;
    min-height: 68px;
    padding: 8px 14px;
  }

  .main-nav {
    grid-column: 1 / -1;
    order: 3;
  }

  .hero {
    padding-top: 138px;
  }

  .feature-strip {
    margin-top: -30px;
  }

  .feature-strip,
  .stat-grid,
  .system-grid,
  .rule-grid,
  .news-cards,
  .dashboard,
  .money-grid,
  .detail-grid,
  .inventory-grid {
    grid-template-columns: 1fr;
  }

  .stat-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat-grid article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(4.8rem, 26vw, 7rem);
  }

  .play-button {
    display: none;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-row {
    grid-template-columns: 1fr;
  }

  .vehicle-row b {
    justify-self: start;
  }
}
