/* ════════════════════════════════════════════════════
   MrBytePLC — Design System
   Responsive: phone / tablet / laptop / desktop
   ════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,300&display=swap');

:root {
  --ink:    #0b0d10;
  --steel:  #111519;
  --plate:  #181d24;
  --seam:   #232b35;
  --grid:   #1e252f;
  --wire:   #2a3545;
  --dim:    #3d5068;
  --muted:  #627b95;
  --body:   #9ab0c8;
  --text:   #d4e4f4;
  --bright: #eaf3ff;
  --amber:  #f59e0b;
  --amber2: #d97706;
  --amberg: rgba(245,158,11,.08);
  --green:  #10b981;
  --greeng: rgba(16,185,129,.08);
  --red:    #ef4444;
  --blue:   #3b82f6;
  --blueg:  rgba(59,130,246,.08);
  --mono: 'DM Mono', monospace;
  --sans: 'DM Sans', sans-serif;
  --display: 'Bebas Neue', sans-serif;
  --nav-h: 58px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--steel); }
::-webkit-scrollbar-thumb { background: var(--amber); border-radius: 2px; }

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,.015) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,.015) 40px);
  pointer-events: none; z-index: 0;
}

/* ══ NAV ══════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(11,13,16,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--wire);
  padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
}
.nav-logo {
  font-family: var(--display); font-size: 22px; letter-spacing: 2px;
  color: var(--bright); text-decoration: none;
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.nav-logo .logo-icon {
  width: 28px; height: 28px; background: var(--amber); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-family: var(--mono); font-weight: 700;
  color: var(--ink); letter-spacing: 0; flex-shrink: 0;
}
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 11px;
  font-weight: 500; letter-spacing: 2px; text-transform: uppercase;
  transition: color .2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--amber); }
.nav-cta {
  background: var(--amber); color: var(--ink) !important;
  padding: 7px 16px; border-radius: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; text-decoration: none; transition: background .2s;
}
.nav-cta:hover { background: var(--amber2) !important; }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 6px; flex-shrink: 0;
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--muted); border-radius: 2px; transition: all .25s;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.nav-mobile {
  display: none; position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: rgba(11,13,16,.98);
  border-bottom: 1px solid var(--wire);
  padding: 20px 24px; flex-direction: column; gap: 4px;
  z-index: 199; overflow-y: auto;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--muted); text-decoration: none; font-size: 14px;
  font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase;
  transition: color .2s; padding: 14px 0;
  border-bottom: 1px solid var(--seam); display: flex; align-items: center; gap: 10px;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--amber); }

/* ══ SECTIONS ══════════════════════════════════════ */
section { position: relative; z-index: 1; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 100px 48px; }
.section-inner.narrow { max-width: 860px; }

.section-eyebrow {
  font-family: var(--mono); font-size: 10px; color: var(--amber);
  letter-spacing: 4px; text-transform: uppercase;
  margin-bottom: 14px; display: flex; align-items: center; gap: 12px;
}
.section-eyebrow::before { content: '//'; color: var(--dim); }
.section-h2 {
  font-family: var(--display); font-size: clamp(36px, 4vw, 64px);
  letter-spacing: 2px; line-height: .95; color: var(--bright); margin-bottom: 16px;
}
.section-sub {
  font-size: 15px; color: var(--body); max-width: 580px;
  line-height: 1.8; margin-bottom: 60px;
}
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--wire) 20%, var(--wire) 80%, transparent);
  margin: 0 48px; position: relative; z-index: 1;
}

/* ══ BUTTONS ═══════════════════════════════════════ */
.btn-primary {
  background: var(--amber); color: var(--ink);
  padding: 13px 28px; border-radius: 4px; font-weight: 700;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  text-decoration: none; transition: all .2s;
  border: 2px solid var(--amber); display: inline-block; cursor: pointer;
}
.btn-primary:hover { background: transparent; color: var(--amber); }
.btn-ghost {
  border: 1px solid var(--wire); color: var(--body);
  padding: 13px 28px; border-radius: 4px; font-weight: 500;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  text-decoration: none; transition: all .2s; display: inline-block;
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ══ NICKNAME MODAL ════════════════════════════════ */
.nick-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(11,13,16,.97); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center; justify-content: center; padding: 20px;
}
.nick-overlay.open { display: flex; }
.nick-box {
  background: var(--plate); border: 1px solid var(--wire);
  border-radius: 12px; padding: 48px 40px; max-width: 440px; width: 100%;
  text-align: center;
}
.nick-logo { font-size: 40px; margin-bottom: 16px; }
.nick-box h2 {
  font-family: var(--display); font-size: 36px; letter-spacing: 2px;
  color: var(--bright); margin-bottom: 8px;
}
.nick-box p { font-size: 13px; color: var(--muted); margin-bottom: 28px; line-height: 1.7; }
.nick-input {
  width: 100%; background: var(--ink); border: 1px solid var(--wire);
  color: var(--text); font-family: var(--mono); font-size: 16px;
  padding: 14px 18px; border-radius: 6px; outline: none;
  transition: border-color .2s; text-align: center; margin-bottom: 8px;
  letter-spacing: 1px;
}
.nick-input:focus { border-color: var(--amber); }
.nick-hint { font-size: 11px; color: var(--dim); margin-bottom: 20px; }
.nick-btn {
  width: 100%; background: var(--amber); color: var(--ink);
  border: none; padding: 14px; border-radius: 6px; font-family: var(--sans);
  font-weight: 700; font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; transition: background .2s; margin-bottom: 12px;
}
.nick-btn:hover { background: var(--amber2); }
.nick-skip {
  font-size: 11px; color: var(--dim); cursor: pointer;
  text-decoration: underline; background: none; border: none;
  font-family: var(--sans); transition: color .2s;
}
.nick-skip:hover { color: var(--muted); }
.nick-err { font-size: 11px; color: var(--red); margin-bottom: 12px; display: none; }

/* ══ ONLINE USERS BAR ══════════════════════════════ */
.online-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
  background: rgba(11,13,16,.95); border-top: 1px solid var(--wire);
  padding: 8px 24px; display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px;
}
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.4} }
.online-label { color: var(--muted); white-space: nowrap; }
.online-names { color: var(--body); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-count { color: var(--amber); font-weight: 500; white-space: nowrap; }
.user-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--seam); border: 1px solid var(--wire);
  border-radius: 20px; padding: 2px 10px; font-size: 10px; color: var(--body);
  margin-right: 4px;
}
.user-chip.me { border-color: var(--amber); color: var(--amber); }

/* ══ TOAST ═════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 56px; right: 24px; z-index: 300;
  background: var(--seam); border: 1px solid var(--wire);
  border-radius: 8px; padding: 12px 18px;
  font-family: var(--mono); font-size: 12px; color: var(--text);
  transform: translateY(20px); opacity: 0;
  transition: all .3s; pointer-events: none; max-width: 280px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red); }

/* ══ FOOTER ════════════════════════════════════════ */
footer {
  background: var(--ink); border-top: 1px solid var(--wire);
  padding: 32px 80px; padding-bottom: 70px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 1;
}
.footer-left { font-family: var(--mono); font-size: 11px; color: var(--dim); line-height: 1.8; }
.footer-left strong { color: var(--amber); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  font-family: var(--mono); font-size: 10px; color: var(--dim);
  text-decoration: none; letter-spacing: 1px; transition: color .2s;
}
.footer-links a:hover { color: var(--amber); }

/* ══ VIDEO MODAL ═══════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(11,13,16,.94); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--plate); border: 1px solid var(--wire);
  border-radius: 10px; overflow: hidden;
  max-width: 860px; width: 100%; position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: var(--seam); border: none; color: var(--muted);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  font-size: 16px; transition: all .2s; z-index: 10;
}
.modal-close:hover { background: var(--red); color: #fff; }
.modal-iframe { display: block; width: 100%; aspect-ratio: 16/9; border: none; }

/* ══ ANIMATIONS ════════════════════════════════════ */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════════════ */

/* ── Tablet landscape & small desktop (900–1024px) ── */
@media (max-width: 1024px) {
  nav { padding: 0 24px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 10px; letter-spacing: 1px; }
  .section-inner { padding: 80px 32px; }
  .divider { margin: 0 32px; }
  footer { padding: 28px 32px 70px; }
}

/* ── Tablet portrait (600–900px) ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .section-inner { padding: 60px 24px; }
  .section-inner.narrow { padding: 60px 24px; }
  .divider { margin: 0 24px; }
  footer { flex-direction: column; gap: 16px; padding: 24px 24px 70px; text-align: center; }
  .footer-links { justify-content: center; }
}

/* ── Mobile (< 480px) ── */
@media (max-width: 480px) {
  :root { --nav-h: 54px; }
  nav { padding: 0 16px; }
  .nav-logo { font-size: 18px; }
  .section-inner { padding: 48px 16px; }
  .section-h2 { font-size: clamp(30px, 8vw, 42px); }
  .section-sub { font-size: 14px; margin-bottom: 36px; }
  .divider { margin: 0 16px; }
  footer { padding: 20px 16px 70px; gap: 14px; }
  .btn-primary, .btn-ghost { padding: 11px 20px; font-size: 11px; }
  .nick-box { padding: 32px 24px; }
  .nick-box h2 { font-size: 28px; }
  .online-bar { padding: 6px 14px; gap: 8px; }
}
