/* GLOBAL CLEAN FONT ENFORCEMENT */

body, button, input, select, textarea, span, p, a, div, h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: -0.01em;
}
b, strong {
  font-weight: 550 !important;
}
h1, h2, h3, h4 {
  font-weight: 500 !important;
  letter-spacing: -0.02em;
}

:root {
  --bg-primary: #0a0c10;
  --bg-secondary: #0f131a;
  --bg-card: #131722;
  --bg-card-hover: #181d2b;
  --bg-glass: rgba(19, 23, 34, 0.75);

  /* Modern Clean Accent: Electric Indigo / Volt Cyan */
  --accent-yellow: #38bdf8;
  --accent-yellow-light: #7dd3fc;
  --accent-yellow-dark: #0284c7;
  --accent-yellow-glow: rgba(56, 189, 248, 0.22);
  --accent-yellow-subtle: rgba(56, 189, 248, 0.1);

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dark: #020617;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-active: rgba(56, 189, 248, 0.4);

  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #38bdf8;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-glow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background-image: none;
}

/* Ambient Moving Aurora Waves & Ribbons (Smooth, organic flow) */
.ambient-glow-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.aurora-beam {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  will-change: transform, opacity;
  transform-origin: center center;
}

/* Wave 1: Top flowing diagonal ribbon */
.aurora-beam-1 {
  width: 140vw;
  height: 320px;
  background: linear-gradient(90deg, transparent 0%, rgba(2, 132, 199, 0.45) 20%, rgba(56, 189, 248, 0.75) 50%, rgba(14, 165, 233, 0.45) 80%, transparent 100%);
  top: -40px;
  left: -20vw;
  opacity: 0.85;
  transform: rotate(-12deg);
  animation: auroraWave1 16s ease-in-out infinite alternate;
}

/* Wave 2: Middle flowing light stream directly crossing the center */
.aurora-beam-2 {
  width: 150vw;
  height: 340px;
  background: linear-gradient(90deg, transparent 0%, rgba(30, 64, 175, 0.4) 15%, rgba(2, 132, 199, 0.65) 45%, rgba(56, 189, 248, 0.75) 60%, rgba(3, 105, 161, 0.4) 85%, transparent 100%);
  top: 25vh;
  left: -25vw;
  opacity: 0.8;
  transform: rotate(15deg);
  animation: auroraWave2 20s ease-in-out infinite alternate;
}

/* Wave 3: Bottom ambient undulating stream */
.aurora-beam-3 {
  width: 140vw;
  height: 380px;
  background: linear-gradient(90deg, transparent 0%, rgba(3, 105, 161, 0.4) 25%, rgba(30, 58, 138, 0.6) 55%, rgba(56, 189, 248, 0.5) 75%, transparent 100%);
  bottom: -60px;
  right: -20vw;
  opacity: 0.8;
  transform: rotate(-8deg);
  animation: auroraWave3 19s ease-in-out infinite alternate;
}

@keyframes auroraWave1 {
  0% {
    transform: rotate(-14deg) translateY(0) scaleY(1);
    opacity: 0.7;
  }
  50% {
    transform: rotate(-8deg) translateY(50px) scaleY(1.35);
    opacity: 0.9;
  }
  100% {
    transform: rotate(-19deg) translateY(100px) scaleY(0.9);
    opacity: 0.65;
  }
}

@keyframes auroraWave2 {
  0% {
    transform: rotate(18deg) translateY(0) scaleX(1);
    opacity: 0.55;
  }
  50% {
    transform: rotate(12deg) translateY(-60px) scaleX(1.15) scaleY(1.25);
    opacity: 0.8;
  }
  100% {
    transform: rotate(22deg) translateY(-30px) scaleX(0.95);
    opacity: 0.5;
  }
}

@keyframes auroraWave3 {
  0% {
    transform: rotate(-10deg) translateY(0) scaleY(1);
    opacity: 0.6;
  }
  50% {
    transform: rotate(-4deg) translateY(-70px) scaleY(1.2);
    opacity: 0.85;
  }
  100% {
    transform: rotate(-15deg) translateY(30px) scaleY(0.85);
    opacity: 0.55;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #272a38;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-yellow-dark);
}

/* App Layout */
.app-container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 16px 18px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Top Navigation Bar */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(14, 18, 27, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  width: 100%;
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  transition: transform var(--transition-normal);
}
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}
.brand:hover .brand-icon {
  transform: scale(1.04);
}

.brand-info {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 5px;
}
.brand-name span {
  color: var(--accent-yellow);
  font-weight: 400;
}
.brand-badge {
  font-size: 0.65rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.2px;
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(10, 11, 16, 0.65);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 450;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-tab-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.nav-tab-btn .badge-pill {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-weight: 500;
}
.nav-tab-btn.active .badge-pill {
  background: var(--accent-yellow);
  color: #020617;
}

/* User Profile Nav Controls */
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 230, 0, 0.08);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--accent-yellow);
  font-weight: 450;
}
.user-status-pill .indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
}
.user-status-pill.expired .indicator-dot {
  background: var(--color-danger);
  box-shadow: 0 0 8px var(--color-danger);
}

.points-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.points-pill:hover {
  transform: scale(1.04);
}

.btn-auth {
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-yellow-dark));
  color: #000000;
  border: none;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px var(--accent-yellow-glow);
  transition: all var(--transition-fast);
}
.btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-yellow-glow);
  filter: brightness(1.08);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  font-family: inherit;
  font-weight: 450;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Tab Panels */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== 1. VPN CLIENT VIEW ==================== */
.vpn-main-card {
  background: rgba(14, 18, 27, 0.35);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.vpn-main-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-yellow), transparent);
}

/* Quick Server Bar */
.quick-server-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 580px;
  background: rgba(14, 16, 23, 0.8);
  border: 1px solid var(--border-subtle);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 40px;
  cursor: pointer;
  transition: all var(--transition-normal);
}
.quick-server-bar:hover {
  border-color: var(--border-color);
  background: rgba(20, 23, 33, 0.9);
  transform: translateY(-2px);
}

.server-quick-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.country-flag {
  font-size: 26px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
.server-quick-details {
  display: flex;
  flex-direction: column;
}
.server-quick-title {
  font-weight: 500;
  font-size: 0.95rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.server-proto-badge {
  font-size: 0.68rem;
  font-weight: 500;
  background: rgba(255, 230, 0, 0.15);
  color: var(--accent-yellow);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}
.server-quick-ping {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.server-quick-ping .ping-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
}

.server-quick-action {
  color: var(--accent-yellow);
  font-size: 0.85rem;
  font-weight: 450;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Giant Power Button Area */
.power-section {
  position: relative;
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 35px;
}

/* Animated Circular Cyber Scanner & Track */
.circular-radar-track {
  position: absolute;
  width: 224px;
  height: 224px;
  border-radius: 50%;
  border: 1px solid rgba(255, 230, 0, 0.12);
  pointer-events: none;
  transition: all var(--transition-normal);
}

.circular-scanner-beam {
  position: absolute;
  width: 216px;
  height: 216px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.circular-dash-ring {
  position: absolute;
  width: 202px;
  height: 202px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 230, 0, 0.2);
  pointer-events: none;
  opacity: 0;
  transition: all var(--transition-normal);
  z-index: 3;
}

.circular-orbit-ring {
  position: absolute;
  width: 236px;
  height: 236px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 4;
}

.orbit-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-yellow);
  box-shadow: 0 0 12px var(--accent-yellow);
}
.orbit-particle.p1 {
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
}
.orbit-particle.p2 {
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(255, 230, 0, 0.2);
  pointer-events: none;
  opacity: 0;
}

.radar-spinner {
  display: none;
}

.power-btn {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: #141824;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.power-btn:hover {
  transform: scale(1.02);
  border-color: rgba(56, 189, 248, 0.3);
  color: #fff;
}

.power-btn svg {
  width: 48px;
  height: 48px;
  transition: all var(--transition-normal);
}

.power-btn-label {
  font-size: 0.75rem;
  font-weight: 450;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Connecting State: Clean minimalist pulse */
.power-section.connecting .circular-radar-track {
  border-color: rgba(56, 189, 248, 0.25);
}
.power-section.connecting .circular-scanner-beam {
  opacity: 1;
  background: conic-gradient(from 0deg, transparent 0%, transparent 60%, rgba(56, 189, 248, 0.2) 80%, var(--accent-yellow) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2px));
  animation: circularScan 1.2s linear infinite;
}
.power-section.connecting .circular-dash-ring {
  opacity: 0.3;
  border-color: rgba(56, 189, 248, 0.3);
}
.power-section.connecting .power-btn {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.2);
}
.power-section.connecting .pulse-ring {
  opacity: 0.4;
  border-color: rgba(56, 189, 248, 0.2);
  animation: pulseOut 2s ease-out infinite;
}

/* Completing / Smooth Deceleration Lock-in Phase */
.power-section.completing .circular-scanner-beam {
  opacity: 0.85;
  animation: circularScan 2.4s cubic-bezier(0.1, 0.8, 0.2, 1) 1;
  filter: drop-shadow(0 0 16px var(--accent-yellow));
  transition: all 0.7s ease;
}

.power-section.completing .circular-orbit-ring {
  animation: spinClockwise 2.6s cubic-bezier(0.1, 0.8, 0.2, 1) 1;
  transition: all 0.7s ease;
}

.power-section.completing .circular-dash-ring {
  animation: spinCounter 3.5s cubic-bezier(0.1, 0.8, 0.2, 1) 1;
  border-color: var(--accent-yellow);
  transition: all 0.7s ease;
}

.power-section.completing .power-btn {
  transform: scale(1.03);
  box-shadow: 0 0 45px rgba(255, 230, 0, 0.6);
  border-color: #ffffff;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.power-section.completing::after {
  content: '';
  position: absolute;
  width: 175px;
  height: 175px;
  border-radius: 50%;
  border: 2px solid var(--accent-yellow);
  box-shadow: 0 0 25px var(--accent-yellow);
  animation: lockInWave 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

@keyframes lockInWave {
  0% { transform: scale(0.95); opacity: 0.95; }
  100% { transform: scale(1.36); opacity: 0; }
}

/* Connected State */
.power-section.connected .circular-radar-track {
  border: 1px solid rgba(255, 230, 0, 0.5);
  box-shadow: 0 0 25px rgba(255, 230, 0, 0.3);
}
.power-section.connected .circular-scanner-beam {
  opacity: 0.7;
  background: conic-gradient(from 0deg, transparent 0%, transparent 50%, rgba(255, 230, 0, 0.3) 80%, var(--accent-yellow) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #fff calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #fff calc(100% - 3px));
  animation: circularScan 4s linear infinite;
}
.power-section.connected .circular-dash-ring {
  opacity: 0.7;
  border-color: rgba(255, 230, 0, 0.4);
  animation: spinCounter 6s linear infinite;
}
.power-section.connected .radar-spinner {
  border: 2px solid var(--accent-yellow);
  box-shadow: 0 0 25px var(--accent-yellow-glow);
}
.power-section.connected .power-btn {
  background: radial-gradient(circle at 35% 35%, #ffe600, #cca800);
  border-color: #ffffff;
  color: #000000;
  box-shadow: 0 0 45px rgba(255, 230, 0, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.5);
  transform: scale(1.02);
}
.power-section.connected .power-btn svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}
.power-section.connected .pulse-ring {
  animation: pulseOut 3s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  border-color: rgba(255, 230, 0, 0.4);
}

@keyframes circularScan {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinCounter {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes spinRadar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulseOut {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* VPN Status Message */
.vpn-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 450;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  margin-bottom: 28px;
}
.vpn-status-badge.connected {
  background: rgba(255, 230, 0, 0.12);
  color: var(--accent-yellow);
  border-color: rgba(255, 230, 0, 0.3);
}

/* Live Stats Grid */
.vpn-live-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 680px;
}

.stat-box {
  background: rgba(14, 16, 23, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  min-width: 0;
}
.stat-box-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 450;
  letter-spacing: 0.5px;
}
.stat-box-val {
  font-size: 1.15rem;
  font-weight: 500;
  color: #fff;
  font-family: var(--font-mono);
}
.stat-box-val.highlight {
  color: var(--accent-yellow);
}

/* Stealth Banner */
.stealth-banner {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 230, 0, 0.05);
  border: 1px dashed rgba(255, 230, 0, 0.25);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.stealth-banner span {
  color: var(--accent-yellow);
  font-weight: 500;
}

/* ==================== 2. REFERRAL HUB (HERO MARKETING) ==================== */
.ref-hero-banner {
  background: linear-gradient(135deg, rgba(255, 230, 0, 0.15), rgba(17, 19, 26, 0.95)), var(--bg-card);
  border: 1px solid rgba(255, 230, 0, 0.3);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.ref-hero-banner::after {
  content: '⚡';
  position: absolute;
  right: -20px;
  bottom: -40px;
  font-size: 180px;
  opacity: 0.04;
  pointer-events: none;
}

.ref-hero-text h2 {
  font-size: 1.7rem;
  font-weight: 550;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.ref-hero-text h2 span {
  color: var(--accent-yellow);
}
.ref-hero-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 600px;
}

/* Referral Link Section */
.ref-link-section {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-top: 24px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  align-items: start;
}

/* Share grid (deprecated, kept for compat) */
.ref-share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ref-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.ref-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
}
.ref-card-title {
  font-size: 1.1rem;
  font-weight: 550;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Referral URL row - never overflows */
.ref-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.ref-url-box {
  flex: 1 1 0%;
  min-width: 0;
  background: rgba(10, 11, 16, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  overflow: hidden;
}

.ref-url-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 450;
  color: var(--accent-yellow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.btn-copy-link {
  flex-shrink: 0;
  white-space: nowrap;
}

.copy-box {
  display: flex;
  align-items: center;
  background: rgba(10, 11, 16, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 14px;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.copy-box-val {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-yellow);
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-box input {
  min-width: 0;
  flex: 1 1 0%;
  width: 100%;
  box-sizing: border-box;
}
.btn-copy {
  flex-shrink: 0;
  white-space: nowrap;
  background: var(--accent-yellow);
  color: #000;
  border: none;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}
.btn-copy:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Social Share Buttons */
.social-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-social {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 450;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.btn-social.tg:hover {
  background: #229ED9;
  border-color: #229ED9;
}
.btn-social.vk:hover {
  background: #0077FF;
  border-color: #0077FF;
}
.btn-social.qr:hover {
  background: var(--accent-yellow);
  color: #000;
  border-color: var(--accent-yellow);
}

/* Tier Progress Bar Card */
.tier-progress-card {
  background: linear-gradient(180deg, rgba(25, 28, 40, 0.9), rgba(15, 17, 24, 0.9));
  border: 1px solid rgba(255, 230, 0, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tier-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tier-badge-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tier-badge-icon {
  font-size: 32px;
}
.tier-name {
  font-size: 1.3rem;
  font-weight: 550;
  color: #fff;
}
.tier-perk {
  font-size: 0.85rem;
  color: var(--accent-yellow);
  font-weight: 450;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-yellow-dark), var(--accent-yellow));
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px var(--accent-yellow-glow);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.tier-next-hint {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 4-Stat Metric Row */
.ref-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.ref-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ref-stat-card .label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 450;
}
.ref-stat-card .number {
  font-size: 1.5rem;
  font-weight: 500;
  color: #fff;
  font-family: var(--font-mono);
}
.ref-stat-card .number.yellow {
  color: var(--accent-yellow);
}

/* Reward Exchange Shop & Leaderboard Columns */
.ref-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.rewards-shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.reward-pack-card {
  background: rgba(14, 16, 23, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all var(--transition-fast);
}
.reward-pack-card:hover {
  border-color: var(--border-color);
  background: rgba(22, 25, 36, 0.9);
  transform: translateY(-2px);
}
.reward-pack-title {
  font-weight: 550;
  font-size: 1rem;
  color: #fff;
}
.reward-pack-price {
  font-size: 0.85rem;
  color: #fbbf24;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-redeem {
  background: rgba(255, 230, 0, 0.15);
  border: 1px solid var(--accent-yellow);
  color: var(--accent-yellow);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.8rem;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-redeem:hover {
  background: var(--accent-yellow);
  color: #000;
}

/* Leaderboard */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(14, 16, 23, 0.6);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.leader-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.leader-badge {
  font-size: 18px;
  font-weight: 550;
  min-width: 28px;
}
.leader-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: #fff;
}
.leader-count {
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--accent-yellow);
  font-family: var(--font-mono);
}

/* Friends History Table */
.friends-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 14px;
}
table.styled-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}
table.styled-table th {
  padding: 12px 14px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
}
table.styled-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}
table.styled-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ==================== 3. SERVERS SELECTION VIEW ==================== */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.server-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}
.server-item-card:hover {
  border-color: var(--border-color);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.server-item-card.active-server {
  border-color: var(--accent-yellow);
  background: rgba(255, 230, 0, 0.05);
  box-shadow: 0 0 18px var(--accent-yellow-glow);
}
.server-item-card.active-server::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-yellow);
}

.server-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.server-main-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.server-card-name {
  font-weight: 550;
  font-size: 0.95rem;
  color: #fff;
}
.server-card-city {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.server-card-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
}
.load-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}
.load-bar {
  width: 50px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}
.load-bar-inner {
  height: 100%;
  background: var(--color-success);
}

/* ==================== 4. ADMIN PANEL (STRICT) ==================== */
.admin-badge-banner {
  background: linear-gradient(90deg, #b45309, #d97706);
  color: #000;
  font-weight: 450;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.admin-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.admin-kpi-card .kpi-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 450;
}
.admin-kpi-card .kpi-num {
  font-size: 1.35rem;
  font-weight: 500;
  color: #fff;
  font-family: var(--font-mono);
}

.admin-sub-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.admin-sub-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 450;
  font-size: 0.83rem;
  padding: 7px 15px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.admin-sub-btn.active {
  background: var(--accent-yellow);
  color: #000;
  border-color: var(--accent-yellow);
}

/* User Action Buttons */
.btn-action-sm {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-action-sm:hover {
  background: rgba(255, 255, 255, 0.15);
}
.btn-action-sm.yellow {
  background: rgba(255, 230, 0, 0.15);
  border-color: rgba(255, 230, 0, 0.3);
  color: var(--accent-yellow);
}
.btn-action-sm.yellow:hover {
  background: var(--accent-yellow);
  color: #000;
}
.btn-action-sm.danger {
  color: var(--color-danger);
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
}
.btn-action-sm.danger:hover {
  background: var(--color-danger);
  color: #fff;
}

/* Modal Windows */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 6, 9, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: #12141c;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open .modal-dialog {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title {
  font-size: 1.25rem;
  font-weight: 550;
  color: #fff;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover {
  color: #fff;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input {
  background: rgba(7, 8, 12, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 10px 14px;
  transition: all var(--transition-fast);
}
.form-input:focus {
  outline: none;
  border-color: var(--accent-yellow);
  box-shadow: 0 0 10px var(--accent-yellow-glow);
}

/* Toast Alerts */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: #141722;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 450;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 280px;
}
.toast.success {
  border-left: 4px solid var(--accent-yellow);
}
.toast.error {
  border-left: 4px solid var(--color-danger);
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==================== 5. BILLING & PLANS ==================== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  transition: all var(--transition-normal);
  min-width: 0;
}

.plan-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-yellow);
  box-shadow: 0 12px 30px rgba(255, 230, 0, 0.15);
}

.plan-card.featured {
  border-color: var(--accent-yellow);
  background: linear-gradient(180deg, rgba(255, 230, 0, 0.08), rgba(22, 25, 35, 0.9));
  box-shadow: 0 0 25px rgba(255, 230, 0, 0.2);
}

.plan-card-badge {
  position: absolute;
  top: -11px;
  right: 18px;
  background: var(--accent-yellow);
  color: #000;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(255, 230, 0, 0.4);
}

.plan-title {
  font-size: 1.15rem;
  font-weight: 500;
  color: #fff;
}

.plan-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0;
}

.plan-price {
  font-size: 2rem;
  font-weight: 500;
  color: var(--accent-yellow);
  font-family: var(--font-mono);
}

.plan-period {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.plan-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0;
}

.plan-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-main);
  font-weight: 500;
}

.plan-feature-item svg {
  color: var(--accent-yellow);
  flex-shrink: 0;
}

.btn-buy-plan {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-yellow-dark));
  color: #000;
  border: none;
  font-family: inherit;
  font-weight: 450;
  font-size: 0.92rem;
  padding: 11px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 15px var(--accent-yellow-glow);
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-buy-plan:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 6px 20px var(--accent-yellow-glow);
}

/* Payment Methods Grid in Modal */
.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.payment-method-card {
  background: rgba(14, 16, 23, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.payment-method-card:hover {
  border-color: var(--border-color);
  background: rgba(24, 27, 39, 0.9);
}

.payment-method-card.selected {
  border-color: var(--accent-yellow);
  background: rgba(255, 230, 0, 0.12);
  box-shadow: 0 0 14px var(--accent-yellow-glow);
}

.payment-method-icon {
  font-size: 22px;
}

.payment-method-name {
  font-size: 0.86rem;
  font-weight: 450;
  color: #fff;
}

.payment-method-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==================== SERVERS TOP BAR & NAV BUTTON ==================== */
.servers-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.btn-back-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 230, 0, 0.1);
  border: 1px solid var(--accent-yellow);
  color: var(--accent-yellow);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-back-nav:hover {
  background: var(--accent-yellow);
  color: #000;
  transform: translateX(-3px);
  box-shadow: 0 0 16px var(--accent-yellow-glow);
}

.ref-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.ref-code-label {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.ref-code-label strong {
  color: #fff;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

/* ==================== RESPONSIVE MEDIA QUERIES ==================== */
@media (max-width: 1080px) {
  .top-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  .nav-tabs {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 6px;
    margin-top: 4px;
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 12px 14px 30px;
    gap: 16px;
  }
  .top-nav {
    padding: 10px 14px;
    gap: 10px;
  }
  .vpn-main-card {
    padding: 24px 14px;
  }
  .power-section {
    width: 210px;
    height: 210px;
    margin: 6px 0 24px;
  }
  .power-btn {
    width: 150px;
    height: 150px;
  }
  .radar-spinner {
    width: 190px;
    height: 190px;
  }

  /* Servers view on tablet/mobile */
  .servers-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* ==================== REFERRAL TAB MOBILE FIXES ==================== */
  .ref-hero-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 20px 18px;
    gap: 16px;
    text-align: left;
  }
  .ref-hero-banner::after {
    display: none;
  }
  .ref-hero-text h2 {
    font-size: 1.35rem;
    line-height: 1.25;
  }
  .ref-hero-text p {
    font-size: 0.85rem;
    line-height: 1.45;
  }
  .ref-hero-banner .btn-auth {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    font-size: 0.95rem;
  }

  .tier-progress-card {
    padding: 18px 16px;
    gap: 14px;
  }
  .tier-top-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .tier-name {
    font-size: 1.15rem;
  }
  .tier-next-hint {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .ref-link-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ref-share-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .ref-card {
    padding: 18px 16px;
    gap: 14px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }
  .ref-link-row {
    gap: 8px;
  }
  .ref-url-text {
    font-size: 0.8rem;
  }

  /* Clean 2x2 grid for stats on mobile */
  .ref-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .ref-stat-card {
    padding: 14px 12px;
  }
  .ref-stat-card .number {
    font-size: 1.35rem;
  }
  .ref-stat-card .label {
    font-size: 0.72rem;
  }

  .ref-split-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Rewards shop: full-width rows with clear button alignment */
  .rewards-shop-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .reward-pack-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 12px;
  }
  .reward-pack-title {
    font-size: 0.95rem;
  }
  .reward-pack-price {
    font-size: 0.85rem;
    margin-top: 2px;
  }

  /* Friends history table */
  .friends-table-card {
    padding: 18px 16px;
  }
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-top: 10px;
  }
  .styled-table {
    min-width: 480px;
  }
  .styled-table th, .styled-table td {
    padding: 10px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .app-container {
    padding: 8px 10px 24px;
    gap: 12px;
  }
  .brand-name {
    font-size: 1.05rem;
  }
  .brand-badge {
    display: none;
  }
  .nav-tab-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  .user-status-pill {
    padding: 4px 9px;
    font-size: 0.74rem;
  }
  .modal-dialog {
    padding: 18px 14px;
  }

  /* Servers top bar on small screens */
  .servers-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .btn-back-nav {
    justify-content: center;
    width: 100%;
  }
  .servers-top-bar .btn-auth {
    justify-content: center;
    width: 100%;
  }

  /* Referral Card Details on small screens */
  .ref-hero-banner {
    padding: 16px 14px;
  }
  .ref-hero-text h2 {
    font-size: 1.2rem;
  }
  .tier-progress-card {
    padding: 14px 12px;
  }
  .tier-badge-icon {
    font-size: 26px;
  }
  .tier-name {
    font-size: 1.05rem;
  }
  .copy-box {
    padding: 6px 8px;
    gap: 8px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .copy-box-val {
    font-size: 0.78rem;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 0%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .copy-box input {
    min-width: 0;
    flex: 1 1 0%;
    width: 100%;
    font-size: 0.85rem;
  }
  .btn-copy {
    padding: 7px 11px;
    font-size: 0.76rem;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .btn-social.qr {
    grid-column: span 2;
  }
  .btn-social {
    padding: 9px 8px;
    font-size: 0.78rem;
  }
  .reward-pack-card {
    padding: 12px 14px;
  }
  .btn-redeem {
    padding: 7px 12px;
    font-size: 0.78rem;
  }
}

/* ==================== TELEGRAM WEB APP STYLING ==================== */
body.is-tg-webapp {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 20px);
  background-color: #050608 !important;
  overflow-y: auto !important;
}

@media (max-width: 768px) {
  body.is-tg-webapp {
    user-select: none;
    -webkit-user-select: none;
  }
}

@media (min-width: 769px) {
  body.is-tg-webapp {
    user-select: auto;
    -webkit-user-select: auto;
  }
}

body.is-tg-webapp .app-container {
  padding: 10px 12px 30px;
  gap: 14px;
}

body.is-tg-webapp .top-nav {
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: 10px;
  position: sticky;
  top: 0;
  z-index: 99;
  background: rgba(10, 12, 18, 0.96);
  backdrop-filter: blur(10px);
}

/* Header layout & Language switch for Mobile & Telegram */
.top-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-lang-bar {
  display: none;
  width: 100%;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.btn-mobile-lang {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  background: rgba(255, 230, 0, 0.09);
  border: 1px solid rgba(255, 230, 0, 0.38);
  border-radius: 14px;
  color: #ffe600;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.btn-mobile-lang:active {
  transform: scale(0.98);
  background: rgba(255, 230, 0, 0.2);
  border-color: #ffe600;
}

@media (max-width: 768px) {
  .top-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px 10px;
    gap: 8px;
  }
  .top-nav-actions {
    /* Safe distance from Telegram close cross 'X' in top-right */
    margin-right: 38px;
  }
  .desktop-only-lang {
    display: none !important;
  }
  .mobile-lang-bar {
    display: flex !important;
  }
}

@media (min-width: 769px) {
  .desktop-only-lang {
    display: inline-flex !important;
  }
  .mobile-lang-bar {
    display: none !important;
  }
}

body.is-tg-webapp .power-section {
  width: 200px;
  height: 200px;
  margin: 4px 0 20px;
}

body.is-tg-webapp .power-btn {
  width: 145px;
  height: 145px;
}

body.is-tg-webapp .radar-spinner {
  width: 185px;
  height: 185px;
}

/* ==================== INTERACTIVE HOVER TILT & SPRING ANIMATIONS ==================== */
button,
.btn-auth,
.btn-secondary,
.btn-copy,
.btn-social,
.btn-redeem,
.btn-action-sm,
.btn-buy-plan,
.btn-back-nav,
.nav-tab-btn,
.admin-sub-btn,
.brand {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.22s ease,
              filter 0.2s ease,
              background 0.2s ease !important;
  will-change: transform;
}

button:hover,
.btn-auth:hover,
.btn-secondary:hover,
.btn-copy:hover,
.btn-social:hover,
.btn-redeem:hover,
.btn-action-sm:hover,
.btn-buy-plan:hover,
.btn-back-nav:hover {
  transform: translateY(-3px) rotate(-1.5deg) scale(1.03) !important;
  box-shadow: 0 8px 22px rgba(255, 230, 0, 0.22) !important;
}

/* Alternate slight tilt for even buttons to make it look lively and playful */
button:nth-child(even):hover,
.btn-action-sm:nth-child(even):hover,
.btn-social:nth-child(even):hover,
.admin-sub-btn:nth-child(even):hover {
  transform: translateY(-3px) rotate(1.5deg) scale(1.03) !important;
}

/* Tactile press feedback */
button:active,
.btn-auth:active,
.btn-secondary:active,
.btn-copy:active,
.btn-social:active,
.btn-redeem:active,
.btn-action-sm:active,
.btn-buy-plan:active {
  transform: translateY(1px) scale(0.97) rotate(0deg) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

/* Nav tabs subtle tilt */
.nav-tab-btn:hover {
  transform: translateY(-2px) rotate(-1deg) scale(1.03) !important;
}
.nav-tab-btn:nth-child(even):hover {
  transform: translateY(-2px) rotate(1deg) scale(1.03) !important;
}
.nav-tab-btn:active {
  transform: scale(0.96) rotate(0deg) !important;
}

/* Admin sub-buttons tilt */
.admin-sub-btn:hover {
  transform: translateY(-2px) rotate(-1.2deg) scale(1.04) !important;
}

/* Cards subtle float and tilt */
.server-item-card,
.plan-card,
.reward-pack-card,
.ref-stat-card,
.admin-kpi-card {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease,
              border-color 0.25s ease !important;
  will-change: transform;
}

.server-item-card:hover,
.plan-card:hover,
.reward-pack-card:hover {
  transform: translateY(-4px) rotate(-0.8deg) scale(1.015) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 230, 0, 0.12) !important;
}

.ref-stat-card:hover,
.admin-kpi-card:hover {
  transform: translateY(-3px) rotate(0.8deg) scale(1.02) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45) !important;
}

/* Main Power Button Interactive Pulsing & Tilt */
.power-btn {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease !important;
}
.power-btn:hover {
  transform: scale(1.06) rotate(-2.5deg) !important;
  box-shadow: 0 0 50px var(--accent-yellow-glow), 0 0 20px rgba(255, 230, 0, 0.4) !important;
}
.power-btn:active {
  transform: scale(0.94) rotate(0deg) !important;
}

/* ===== USER STATS DASHBOARD ===== */
.user-stats-dashboard {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}
.usd-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-main);
}
.usd-vip-badge {
  margin-left: auto;
  background: var(--accent-yellow-subtle);
  color: var(--accent-yellow);
  border: 1px solid var(--accent-yellow);
  border-radius: var(--radius-full);
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 550;
}
.usd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.usd-stat {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.usd-stat-title {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.usd-stat-val {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-yellow);
  font-family: var(--font-mono);
}
.usd-guest {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  margin-bottom: 12px;
}

/* ===== SERVER LOAD CARD ===== */
.server-load-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.slc-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.slc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.slc-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.slc-label { font-size: 0.68rem; color: var(--text-muted); }
.slc-val { font-size: 0.9rem; font-weight: 500; color: var(--text-main); font-family: var(--font-mono); }
.slc-val.highlight { color: var(--accent-yellow); }
.slc-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 3px 0;
}
.slc-bar {
  height: 100%;
  background: linear-gradient(90deg, #ffe600, #ffaa00);
  border-radius: 999px;
  transition: width 0.8s ease;
}
.tg-ad-banner {
  max-width: 300px;
  margin: 16px auto;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Custom Range Slider (Ползунок) */
.volt-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  outline: none;
  margin: 10px 0 4px 0;
  cursor: pointer;
  transition: background 0.2s;
}
.volt-range-slider:hover {
  background: rgba(255, 255, 255, 0.22);
}
.volt-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffe600;
  border: 2px solid #12141c;
  box-shadow: 0 0 12px rgba(255, 230, 0, 0.7);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
}
.volt-range-slider::-webkit-slider-thumb:hover,
.volt-range-slider::-webkit-slider-thumb:active {
  transform: scale(1.22);
  box-shadow: 0 0 18px rgba(255, 230, 0, 1);
}
.volt-range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffe600;
  border: 2px solid #12141c;
  box-shadow: 0 0 12px rgba(255, 230, 0, 0.7);
  cursor: pointer;
}
.stepper-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.stepper-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}
.stepper-btn:active {
  transform: scale(0.95);
}
.chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary, #94a3b8);
  font-size: 0.73rem;
  font-weight: 450;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.chip-btn:hover {
  background: rgba(255, 230, 0, 0.15);
  border-color: rgba(255, 230, 0, 0.35);
  color: #ffe600;
}
.chip-btn:active {
  transform: scale(0.95);
}

