/* ==================== MetaGhostVPN — Main Styles ==================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --bg-glass: rgba(22, 22, 31, 0.7);
  --border: #2a2a3a;
  --border-light: #3a3a4a;
  --text-primary: #f0f0f5;
  --text-secondary: #8888aa;
  --text-muted: #5a5a7a;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-dark: #5b21b6;
  --accent-glow: rgba(124, 58, 237, 0.3);
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.3);
  --red: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.2);
  --yellow: #f59e0b;
  --blue: #3b82f6;
  --gradient-accent: linear-gradient(135deg, #7c3aed, #3b82f6);
  --gradient-green: linear-gradient(135deg, #10b981, #059669);
  --gradient-bg: linear-gradient(180deg, #0a0a0f 0%, #0f0f1a 50%, #0a0a0f 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

/* ==================== Lucide Icon Sizing ==================== */
.lucide {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  stroke: currentColor;
  fill: none;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--accent-light);
}

.stat-card-icon svg {
  width: 20px;
  height: 20px;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.price-emoji svg {
  width: 32px;
  height: 32px;
  stroke: var(--accent-light);
}

.faq-arrow svg {
  width: 16px;
  height: 16px;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-lg svg {
  width: 20px;
  height: 20px;
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.search-icon svg {
  width: 16px;
  height: 16px;
}

.toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ==================== Container ==================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.btn-green {
  background: var(--gradient-green);
  color: white;
  box-shadow: 0 4px 20px var(--green-glow);
}
.btn-green:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--green-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent-light);
  border: 1px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: white;
}

.btn-danger {
  background: var(--red);
  color: white;
}
.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-xs);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 17px;
  border-radius: var(--radius);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-xs);
}

/* ==================== Navigation ==================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  padding: 12px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 20px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--gradient-accent);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

/* ==================== Hero Section ==================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, var(--accent-glow) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(1deg); }
  66% { transform: translate(-20px, 20px) rotate(-1deg); }
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero h1 .gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-dashboard-btn {
  display: none;  /* Скрыта на десктопе — там есть кнопка в навбаре */
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
}

.hero-stat {
  text-align: left;
}

.hero-stat .number {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}

.hero-stat .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ghost-visual {
  width: 360px;
  height: 360px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ghost-orb {
  width: 200px;
  height: 200px;
  background: var(--gradient-accent);
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: orbFloat 6s ease-in-out infinite;
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.1); }
}

.ghost-icon {
  position: absolute;
  font-size: 120px;
  animation: ghostBob 4s ease-in-out infinite;
  filter: drop-shadow(0 0 40px var(--accent-glow));
}

@keyframes ghostBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.orbit-ring {
  position: absolute;
  border: 1px solid var(--border);
  border-radius: 50%;
  animation: spin 20s linear infinite;
}

.orbit-ring:nth-child(3) { width: 280px; height: 280px; }
.orbit-ring:nth-child(4) { width: 350px; height: 350px; animation-duration: 30s; animation-direction: reverse; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==================== Features ==================== */
.features {
  padding: 120px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--accent-glow);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 16px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ==================== Pricing ==================== */
.pricing {
  padding: 120px 0;
  position: relative;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.price-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  transform: scale(1.05);
}

.price-card.popular .popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 18px;
  background: var(--gradient-accent);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.price-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.price-card.popular:hover {
  transform: scale(1.05) translateY(-4px);
}

.price-duration {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.price-emoji {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}

.price-amount {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 4px;
}

.price-amount span {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-secondary);
}

.price-per-month {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.price-save {
  display: inline-block;
  padding: 4px 12px;
  background: var(--green-glow);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 24px;
}

.price-features {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}

.price-features li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-features li::before {
  content: '\2713';
  color: var(--green);
  font-weight: 700;
}

/* ==================== FAQ ==================== */
.faq {
  padding: 120px 0;
}

.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item.active {
  border-color: var(--accent);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.faq-question:hover {
  background: var(--bg-card-hover);
}

.faq-arrow {
  transition: var(--transition);
  color: var(--text-muted);
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* ==================== CTA ==================== */
.cta-section {
  padding: 120px 0;
}

.cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
}

.cta-box h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-box p {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 500px;
  margin: 0 auto 32px;
}

/* ==================== Footer ==================== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-text {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-light);
}

/* ==================== Dashboard Layout ==================== */
.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  margin-bottom: 32px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 18px;
}

.sidebar-nav {
  flex: 1;
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 4px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.sidebar-nav a:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.sidebar-nav a.active {
  background: var(--accent-glow);
  color: var(--accent-light);
}

.sidebar-nav .nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  background: var(--gradient-accent);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-id {
  font-size: 11px;
  color: var(--text-muted);
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
}

/* ==================== Dashboard Common ==================== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-light);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-glow);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 800;
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Tables */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.table-title {
  font-size: 16px;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

td {
  padding: 14px 24px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-card-hover);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.badge-green {
  background: var(--green-glow);
  color: var(--green);
}

.badge-red {
  background: var(--red-glow);
  color: var(--red);
}

.badge-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: var(--yellow);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue);
}

.badge-gray {
  background: rgba(100, 100, 140, 0.15);
  color: var(--text-muted);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

select.form-input {
  appearance: none;
  cursor: pointer;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 90%;
  max-width: 480px;
  transform: scale(0.95) translateY(10px);
  transition: var(--transition);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Alerts / Toasts */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  min-width: 280px;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.warning { border-left: 3px solid var(--yellow); }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==================== Login ==================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-bg);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  width: 90%;
  max-width: 420px;
  text-align: center;
}

.login-card .logo {
  justify-content: center;
  margin-bottom: 32px;
  font-size: 22px;
}

.login-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-card .subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

/* ==================== Dashboard Specific ==================== */
.key-display {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--accent-light);
  word-break: break-all;
  position: relative;
  margin-top: 12px;
}

.key-display .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  transition: var(--transition);
}

.key-display .copy-btn:hover {
  color: var(--accent-light);
  border-color: var(--accent);
}

.sub-status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.sub-status-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.sub-status-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.sub-status-date {
  color: var(--text-secondary);
  font-size: 14px;
}

.sub-timer {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 20px;
}

.timer-item {
  text-align: center;
}

.timer-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-light);
}

.timer-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Search */
.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--accent);
}

.search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

/* ==================== Download grid ==================== */
.download-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ==================== Mobile Nav Overlay ==================== */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}
.mobile-nav-overlay.active { display: block; }

.mobile-nav-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  z-index: 1001;
  padding: 24px;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-nav-panel.active {
  display: flex;
  transform: translateX(0);
}

.mobile-nav-panel .mobile-nav-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  padding: 4px 8px;
  margin-bottom: 16px;
}

.mobile-nav-panel a {
  display: block;
  padding: 14px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}
.mobile-nav-panel a:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.mobile-nav-panel .mobile-nav-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ==================== Responsive ==================== */

/* ---------- Tablet landscape ---------- */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .download-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .price-card.popular { transform: scale(1); }
  .price-card.popular:hover { transform: translateY(-4px); }

  .features { padding: 80px 0; }
  .pricing { padding: 80px 0; }
  .faq { padding: 80px 0; }
  .cta-section { padding: 80px 0; }
}

/* ---------- Tablet portrait / small tablets ---------- */
@media (max-width: 768px) {
  /* ---- Navigation ---- */
  .nav-links { display: none !important; }
  .nav-cta { display: none !important; }
  .mobile-menu-btn { display: block; }

  /* ---- Hero ---- */
  .hero { min-height: auto; padding: 100px 0 60px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; margin-bottom: 28px; }
  .hero-badge { font-size: 12px; margin-bottom: 16px; }
  .hero-buttons { flex-direction: column; align-items: center; gap: 12px; }
  .hero-dashboard-btn { display: flex !important; }
  .hero-buttons .btn-lg { width: 100%; max-width: 320px; padding: 16px 32px; font-size: 16px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; margin-top: 36px; }
  .hero-stat .number { font-size: 24px; }
  .hero-stat .label { font-size: 12px; }

  /* ---- Sections ---- */
  .features { padding: 60px 0; }
  .pricing { padding: 60px 0; }
  .faq { padding: 60px 0; }
  .cta-section { padding: 60px 0; }
  .section-header { margin-bottom: 40px; }
  .section-header h2 { font-size: 28px; }
  .section-header p { font-size: 14px; }

  /* ---- Features ---- */
  .features-grid { grid-template-columns: 1fr; gap: 16px; }
  .download-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 24px; }
  .feature-card h3 { font-size: 16px; }
  .feature-card p { font-size: 13px; }
  .feature-icon { width: 44px; height: 44px; font-size: 20px; margin-bottom: 16px; }

  /* ---- Pricing ---- */
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 16px;
  }
  .price-card { padding: 28px 24px; }
  .price-amount { font-size: 40px; }
  .price-card.popular { transform: none; }
  .price-card.popular:hover { transform: translateY(-4px); }

  /* ---- FAQ ---- */
  .faq-question { padding: 16px 20px; font-size: 14px; }
  .faq-answer-inner { padding: 0 20px 16px; font-size: 13px; }
  .faq-item { margin-bottom: 8px; }

  /* ---- CTA ---- */
  .cta-box { padding: 32px 20px; }
  .cta-box h2 { font-size: 22px; }
  .cta-box p { font-size: 14px; margin-bottom: 24px; }

  /* ---- Footer ---- */
  .footer .container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 16px; }

  /* ==================== Dashboard Mobile ==================== */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .main-content {
    margin-left: 0;
    padding: 24px 16px;
    padding-top: 72px;
  }
  #mobileHeader {
    display: flex !important;
  }

  /* Dashboard stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card-value { font-size: 22px; }
  .stat-card-icon { width: 34px; height: 34px; font-size: 15px; }

  /* Dashboard page header */
  .page-header { margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
  .page-title { font-size: 20px; }
  .page-subtitle { font-size: 13px; }

  /* Tables scrollable */
  .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 500px; }
  th { padding: 10px 16px; font-size: 11px; }
  td { padding: 12px 16px; font-size: 13px; }

  /* Keys */
  .key-display { font-size: 11px; padding: 12px; }
  .key-display .copy-btn { top: 6px; right: 6px; font-size: 12px; padding: 3px 6px; }

  /* Cards */
  .card { padding: 16px; }
  .card-title { font-size: 15px; margin-bottom: 12px; }

  /* Subscription timer */
  .sub-status-card { padding: 24px 16px; }
  .sub-status-icon { font-size: 36px; }
  .sub-status-title { font-size: 18px; }
  .timer-value { font-size: 22px; }

  /* Payment modal */
  .modal { padding: 24px 20px; width: 95%; }
  .modal-title { font-size: 16px; }

  /* Login */
  .login-card { padding: 32px 20px; }

  /* Referral stats */
  .stats-grid[style*="repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  /* Pricing grid in dashboard */
  .pricing-grid[style*="max-width:100%"] {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- Small phones ---------- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .hero { padding: 90px 0 48px; }
  .hero h1 { font-size: 26px; line-height: 1.15; }
  .hero p { font-size: 15px; }
  .hero-stats { flex-direction: column; gap: 12px; align-items: center; }
  .hero-stat .number { font-size: 22px; }
  .hero-buttons .btn-lg { max-width: 100%; }

  .section-header h2 { font-size: 24px; }

  .stats-grid { grid-template-columns: 1fr; }

  .price-amount { font-size: 36px; }

  .cta-box { padding: 28px 16px; }
  .cta-box h2 { font-size: 20px; }

  .footer-links { flex-direction: column; gap: 10px; }

  .page-title { font-size: 18px; }

  .sub-timer { gap: 10px; }
  .timer-value { font-size: 20px; }
  .timer-label { font-size: 10px; }

  /* No-sub overlay plan rows — stack on small screens */
  #noSubPlans > div {
    flex-direction: column !important;
    text-align: center !important;
    gap: 12px !important;
    padding: 20px 16px !important;
  }
  #noSubPlans > div > div {
    text-align: center !important;
  }
}

/* ---------- Touch targets ---- */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .faq-question { min-height: 48px; }
  .sidebar-nav a { padding: 14px 16px; }
}

/* ==================== Loading ==================== */
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ==================== Pagination ==================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination button {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.pagination button:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.pagination button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ==================== Tab Content ==================== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}
