/* ============================================================
   JACE VALUES — styles.css
   ============================================================ */

/* ---------- CSS Variables / Themes ---------- */
:root {
  --bg: #0a0a0f;
  --bg-secondary: #111118;
  --surface: rgba(20, 20, 35, 0.65);
  --surface-border: rgba(255, 255, 255, 0.06);
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --red: #ef4444;
  --green: #22c55e;
  --green-yellow: #a3e635;
  --yellow: #eab308;
  --yellow-red: #f97316;
  --popular-yellow: #f59e0b;
  --toast-bg: rgba(20, 20, 35, 0.95);
  --star-color: #f59e0b;
  --nav-bg: rgba(18, 18, 30, 0.7);
  --tube-bg: rgba(22, 22, 40, 0.55);
  --tube-hover: rgba(30, 30, 55, 0.7);
  --btn-bg: rgba(59, 130, 246, 0.15);
  --btn-border: rgba(59, 130, 246, 0.3);
  --modal-bg: rgba(18, 18, 35, 0.95);
  --transition-speed: 0.4s;
}

body.theme-red {
  --bg: #0f0a0a;
  --bg-secondary: #180f0f;
  --surface: rgba(35, 15, 15, 0.65);
  --surface-border: rgba(255, 80, 80, 0.08);
  --text: #e8d0d0;
  --text-muted: #997777;
  --accent: #ef4444;
  --accent-hover: #dc2626;
  --accent-glow: rgba(239, 68, 68, 0.3);
  --toast-bg: rgba(35, 15, 15, 0.95);
  --nav-bg: rgba(30, 12, 12, 0.7);
  --tube-bg: rgba(35, 15, 15, 0.55);
  --tube-hover: rgba(50, 20, 20, 0.7);
  --btn-bg: rgba(239, 68, 68, 0.15);
  --btn-border: rgba(239, 68, 68, 0.3);
  --modal-bg: rgba(25, 10, 10, 0.95);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background var(--transition-speed), color var(--transition-speed);
  overflow-x: hidden;
}

img, svg {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, var(--accent-glow) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  transition: background var(--transition-speed);
}

/* ---------- Brand + Theme Toggle ---------- */
.brand-area {
  position: fixed;
  top: 1.2rem;
  left: 1.2rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.brand-logo {
  height: 36px;
  width: auto;
  border-radius: 8px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.brand-text {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color var(--transition-speed);
}
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text);
  flex-shrink: 0;
}
.theme-toggle:hover {
  transform: scale(1.08);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}
.theme-icon { transition: opacity 0.3s, transform 0.3s; }
.theme-icon.sun { opacity: 1; transform: rotate(0); }
.theme-icon.moon { opacity: 0; transform: rotate(-90deg); position: absolute; }
body.theme-red .theme-icon.sun { opacity: 0; transform: rotate(90deg); }
body.theme-red .theme-icon.moon { opacity: 1; transform: rotate(0); }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 900;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 0.45rem 0.6rem;
  transition: all var(--transition-speed);
}
.nav-tabs { display: flex; gap: 0.3rem; }
.nav-tab {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.nav-tab:hover { color: var(--text); background: var(--btn-bg); }
.nav-tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.nav-version {
  display: block;
  text-align: right;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.5rem;
  color: var(--text-muted);
  opacity: 0.12;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
  padding-right: 0.2rem;
}

/* ---------- Main Content ---------- */
.main-content {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem 3rem;
  max-width: 900px;
  margin: 0 auto;
}
.tab-content { display: none; animation: fadeSlideIn 0.4s ease; }
.tab-content.active { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Servers List ---------- */
.servers-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* Continent tube */
.continent-tube {
  background: var(--tube-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.35s ease;
  cursor: pointer;
}
.continent-tube:hover {
  background: var(--tube-hover);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.continent-tube.expanded {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* Tube header */
.tube-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1.2rem;
  user-select: none;
}
.tube-name {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}
.tube-arrow {
  transition: transform 0.35s ease;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.continent-tube.expanded .tube-arrow { transform: rotate(180deg); }

/* Tube body */
.tube-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.continent-tube.expanded .tube-body { max-height: 1000px; }

/* Stats bar inside tube body */
.tube-stats-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--surface-border);
}
.tube-stats-bar img {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

/* Server row */
.server-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1.2rem;
  border-top: 1px solid var(--surface-border);
  transition: background 0.2s;
  position: relative;
}
.server-row:hover { background: rgba(255,255,255,0.03); }

.server-flag-img {
  width: 22px;
  height: auto;
  border-radius: 2px;
  flex-shrink: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.server-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
}
.server-name .city {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.78rem;
}

/* Popular tag */
.popular-tag {
  display: inline-flex;
  align-items: center;
  background: var(--popular-yellow);
  color: #000;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
  margin-left: 0.4rem;
  vertical-align: middle;
  animation: popularPulse 2s ease-in-out infinite;
}
@keyframes popularPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

/* Ping bars — 5 bars */
.ping-bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 18px;
  flex-shrink: 0;
}
.ping-bar {
  width: 4px;
  border-radius: 2px;
}
.ping-bar:nth-child(1) { height: 6px; }
.ping-bar:nth-child(2) { height: 9px; }
.ping-bar:nth-child(3) { height: 12px; }
.ping-bar:nth-child(4) { height: 15px; }
.ping-bar:nth-child(5) { height: 18px; }

.ping-bars.excellent .ping-bar,
.ping-bars.excellent .ping-bar:nth-child(1),
.ping-bars.excellent .ping-bar:nth-child(2),
.ping-bars.excellent .ping-bar:nth-child(3),
.ping-bars.excellent .ping-bar:nth-child(4),
.ping-bars.excellent .ping-bar:nth-child(5) { background: var(--green) !important; }

.ping-bars.good .ping-bar:nth-child(1),
.ping-bars.good .ping-bar:nth-child(2),
.ping-bars.good .ping-bar:nth-child(3),
.ping-bars.good .ping-bar:nth-child(4) { background: var(--green-yellow) !important; }
.ping-bars.good .ping-bar:nth-child(5) { background: rgba(255,255,255,0.06) !important; }

.ping-bars.ok .ping-bar:nth-child(1),
.ping-bars.ok .ping-bar:nth-child(2),
.ping-bars.ok .ping-bar:nth-child(3) { background: var(--yellow) !important; }
.ping-bars.ok .ping-bar:nth-child(4),
.ping-bars.ok .ping-bar:nth-child(5) { background: rgba(255,255,255,0.06) !important; }

.ping-bars.poor .ping-bar:nth-child(1),
.ping-bars.poor .ping-bar:nth-child(2) { background: var(--yellow-red) !important; }
.ping-bars.poor .ping-bar:nth-child(3),
.ping-bars.poor .ping-bar:nth-child(4),
.ping-bars.poor .ping-bar:nth-child(5) { background: rgba(255,255,255,0.06) !important; }

.ping-bars.bad .ping-bar { background: rgba(255,255,255,0.06) !important; }
.ping-bars.bad .ping-bar:nth-child(1) { background: var(--red) !important; }

.ping-ms {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* Loading ms dots animation */
.loading-ms { color: rgba(255,255,255,0.25); }
.ms-dot { animation: msDotPulse 1.2s ease-in-out infinite; }
.ms-dot:nth-child(1) { animation-delay: 0s; }
.ms-dot:nth-child(2) { animation-delay: 0.2s; }
.ms-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes msDotPulse {
  0%, 60%, 100% { opacity: 0.2; }
  30% { opacity: 1; }
}

/* Join button */
.btn-join {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}
.btn-join:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 14px var(--accent-glow);
  transform: scale(1.04);
}

/* ---------- Values Tab ---------- */
.values-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 420px;
  margin: 2rem auto;
}
.value-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 2rem 1.5rem;
  border-radius: 18px;
  text-decoration: none;
  transition: all 0.35s ease;
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.value-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.mm2values-btn {
  background: rgba(30, 30, 45, 0.7);
  color: #d0d0d0;
}
.mm2values-btn:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(40, 40, 60, 0.75);
}
.supreme-btn {
  background: rgba(180, 20, 20, 0.2);
  color: #f0c0c0;
  border-color: rgba(239, 68, 68, 0.25);
}
.supreme-btn:hover {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(180, 20, 20, 0.3);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
}
.value-btn-text {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 2rem;
}

/* ---------- About Tab ---------- */
.about-container {
  max-width: 600px;
  margin: 2rem auto;
  text-align: center;
}
.about-container h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.about-container p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.9rem;
  font-weight: 500;
}
.about-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 1.5rem 0;
}
.about-feature {
  font-weight: 600;
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--surface-border);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
}
.about-footer { margin-top: 1.5rem; font-size: 0.85rem; opacity: 0.5; }

/* ---------- Modal Overlay ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }

.modal-window {
  background: var(--modal-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  transform: translateY(-30px) scale(0.94);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-overlay.show .modal-window { transform: translateY(0) scale(1); }
.modal-overlay.closing .modal-window {
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: all 0.25s ease-in;
}

/* ---------- Step Progress Bar ---------- */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
}
.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.15);
  transition: all 0.4s ease;
}
.step-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}
.step-dot.done {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}
.step-line {
  width: 40px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  transition: background 0.4s ease;
}
.step-line.done { background: var(--green); }

/* ---------- Join Steps ---------- */
.join-step { animation: fadeSlideIn 0.35s ease; }

.search-animation { padding: 1.5rem 0; }
.magnifying-glass {
  animation: searchFloat 1.2s ease-in-out infinite;
  color: var(--accent);
  margin-bottom: 1rem;
}
@keyframes searchFloat {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}
.search-text {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}
.dots::after {
  content: '';
  animation: dotsAnim 1.4s steps(4, end) infinite;
}
@keyframes dotsAnim {
  0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } 100% { content: ''; }
}
.search-server-name { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.found-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.found-check-icon {
  width: 28px; height: 28px;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.found-header h3 { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.3rem; }
.found-details {
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.2rem;
}
.found-server-name { font-weight: 700; margin-bottom: 0.3rem; }
.found-players {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Verification images — stroke + glow + hover */
.verify-img-glow {
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: 0 0 20px rgba(255,255,255,0.05);
  transition: all 0.35s ease;
  cursor: pointer;
}
.verify-img-glow:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
  transform: scale(1.06);
}

.verify-img {
  max-width: 180px;
  border-radius: 12px;
  margin-bottom: 1rem;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.verify-img-bot { max-width: 150px; }
.verify-text { font-size: 0.95rem; margin-bottom: 0.4rem; line-height: 1.5; font-weight: 500; }
.verify-sub { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.2rem; font-weight: 500; }

/* ---------- Buttons ---------- */
.btn-primary {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(1.03);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Fill-bar continue button */
.btn-fill-bar {
  width: 100%;
  padding: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.btn-fill-bar.filled {
  border-color: var(--accent);
  cursor: pointer;
}
.fill-bar-bg {
  position: absolute;
  inset: 0;
}
.fill-bar-progress {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent), rgba(139, 92, 246, 0.7));
  width: 0%;
  border-radius: 12px;
  filter: blur(0.5px);
  transition: width 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fill-bar-progress::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
}
.btn-label {
  position: relative;
  z-index: 1;
  padding: 0.75rem 2rem;
}

/* Join bot button */
.btn-join-bot { gap: 0.6rem; }
.btn-headshot {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}

/* ---------- Rate Modal ---------- */
.modal-rate h3 { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.3rem; margin-bottom: 0.3rem; }
.rate-question { color: var(--text-muted); margin-bottom: 1.2rem; font-weight: 500; }
.stars-container { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.star {
  background: none; border: none;
  font-size: 2.4rem;
  color: rgba(255,255,255,0.15);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}
.star:hover { transform: scale(1.15); }
.star.active { color: var(--star-color); }
.star.active:hover { transform: scale(1.08); }
.btn-rate-submit { min-width: 120px; }

/* ---------- Toast Notifications (TOP) ---------- */
.toast-container {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--toast-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-border);
  padding: 0.75rem 1.4rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
             toastOut 0.35s ease 1.8s forwards;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  pointer-events: auto;
}
.toast .toast-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-10px) scale(0.9); }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ---------- Selection ---------- */
::selection { background: var(--accent); color: #fff; }

/* ---------- Utility ---------- */
.hidden { display: none !important; }

/* ============================================================
   MOBILE — iPhone X / small phones (≤480px)
   ============================================================ */
@media (max-width: 480px) {

  /* Brand area: hide text, keep logo + toggle compact */
  .brand-area { top: 0.7rem; left: 0.7rem; gap: 0.4rem; }
  .brand-logo { height: 28px; }
  .brand-text { display: none; }
  .theme-toggle { width: 28px; height: 28px; border-radius: 8px; }

  /* Navbar: compact, smaller */
  .navbar { top: 0.6rem; right: 0.6rem; }
  .nav-inner { padding: 0.3rem 0.35rem; gap: 0.25rem; border-radius: 10px; }
  .nav-tab { padding: 0.35rem 0.6rem; font-size: 0.75rem; border-radius: 7px; }

  /* Main content: less top padding */
  .main-content { padding: 4.5rem 0.7rem 2rem; max-width: 100%; }

  /* Servers list */
  .servers-list { gap: 0.5rem; }

  /* Continent tubes */
  .continent-tube { border-radius: 12px; }
  .tube-header { padding: 0.65rem 0.8rem; gap: 0.4rem; }
  .tube-name { font-size: 0.82rem; }

  /* Stats bar */
  .tube-stats-bar { padding: 0.4rem 0.8rem; font-size: 0.7rem; gap: 0.25rem; }
  .tube-stats-bar img { width: 13px; height: 13px; }

  /* Server row: compact */
  .server-row { padding: 0.5rem 0.8rem; gap: 0.4rem; flex-wrap: wrap; }
  .server-flag-img { width: 18px; }
  .server-name { font-size: 0.75rem; }
  .server-name .city { font-size: 0.68rem; }
  .popular-tag { font-size: 0.5rem; padding: 0.1rem 0.35rem; margin-left: 0.25rem; }

  /* Ping bars: smaller */
  .ping-bars { height: 14px; gap: 1px; }
  .ping-bar { width: 3px; }
  .ping-bar:nth-child(1) { height: 5px; }
  .ping-bar:nth-child(2) { height: 7px; }
  .ping-bar:nth-child(3) { height: 9px; }
  .ping-bar:nth-child(4) { height: 11px; }
  .ping-bar:nth-child(5) { height: 14px; }
  .ping-ms { font-size: 0.68rem; min-width: 36px; }

  /* Join button */
  .btn-join { padding: 0.3rem 0.6rem; font-size: 0.7rem; border-radius: 6px; }

  /* Values tab */
  .values-container { max-width: 100%; margin: 1rem auto; gap: 1rem; }
  .value-btn { padding: 1.5rem 1rem; border-radius: 14px; }
  .value-btn-text { font-size: 1.6rem; }

  /* About tab */
  .about-container { padding: 0 0.5rem; }
  .about-container h2 { font-size: 1.4rem; }
  .about-container p { font-size: 0.85rem; }
  .about-features { gap: 0.4rem; }
  .about-feature { font-size: 0.72rem; padding: 0.35rem 0.7rem; }

  /* Modal: full-width */
  .modal-window { max-width: 92%; padding: 1.5rem; border-radius: 14px; }
  .verify-img { max-width: 130px; }
  .verify-img-bot { max-width: 110px; }
  .found-header h3 { font-size: 1.1rem; }
  .search-text { font-size: 0.95rem; }
  .btn-primary { padding: 0.6rem 1.5rem; font-size: 0.9rem; }

  /* Rate modal stars */
  .star { font-size: 1.8rem; }

  /* Toast */
  .toast { font-size: 0.78rem; padding: 0.6rem 1rem; }
  .toast .toast-icon { width: 16px; height: 16px; }
}


/* ---------- Touch ripple ---------- */
.ripple {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%) scale(0);
  animation: rippleOut 0.5s ease-out forwards;
}
@keyframes rippleOut {
  to { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}