/* ============================================================
   GlassSpace - Glassmorphism 3D Black & White Theme
   ============================================================ */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --accent: #ffffff;
  --accent-glow: rgba(255, 255, 255, 0.15);
  --success: #4ade80;
  --error: #f87171;
  --warning: #fbbf24;
  --border-radius: 14px;
  --border-radius-sm: 8px;
  --blur: blur(20px);
  --blur-strong: blur(40px);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.7);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ---- Stars Canvas ---- */
#stars-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---- Banner ---- */
.banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 10px 20px;
  text-align: center;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.banner-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
}

.banner-close:hover { color: white; }

/* ---- Header ---- */
.glass-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.5));
  animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255,255,255,0.5)); }
  50% { filter: drop-shadow(0 0 16px rgba(255,255,255,0.9)); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-link:hover {
  color: white;
  background: var(--glass-bg);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Buttons ---- */
.btn-primary, .btn-ghost, .btn-outline, .btn-icon {
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--border-radius);
  padding: 10px 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-primary {
  background: rgba(255, 255, 255, 0.95);
  color: #0a0a0a;
}

.btn-primary:hover {
  background: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
  background: var(--glass-bg);
  color: white;
}

.btn-outline {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
  background: var(--glass-bg);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-1px);
}

.btn-large {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: 16px;
}

.btn-full { width: 100%; justify-content: center; }

.btn-icon {
  padding: 10px 12px;
  background: transparent;
  color: white;
  border: 1px solid var(--glass-border);
}

/* Glow button effect */
.glow-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s ease;
}

.glow-btn:hover::before { left: 100%; }

.lang-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
  letter-spacing: 0.05em;
}

.lang-btn:hover { color: white; background: var(--glass-bg); }

/* Mobile menu button */
.btn-icon { display: none; }

/* ---- Mobile Menu ---- */
.mobile-menu {
  position: fixed;
  top: 70px; left: 16px; right: 16px;
  z-index: 99;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 8px;
  transition: var(--transition);
}

.mobile-menu a:hover { color: white; background: var(--glass-bg); }
.mobile-menu hr { border-color: var(--glass-border); margin: 4px 0; }

/* ---- Glass Cards ---- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.glass-card-inner {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 16px;
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px rgba(255,255,255,0.05);
}

/* ---- Main / Sections ---- */
main { position: relative; z-index: 1; }

.section {
  min-height: 100vh;
  padding: 100px 24px 60px;
  max-width: 1280px;
  margin: 0 auto;
}

.hidden { display: none !important; }

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  animation: fade-in-up 0.6s ease forwards;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fade-in-up 0.6s 0.1s ease both;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 36px;
  line-height: 1.7;
  animation: fade-in-up 0.6s 0.2s ease both;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  animation: fade-in-up 0.6s 0.3s ease both;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  animation: fade-in-up 0.6s 0.4s ease both;
}

.stat-item { text-align: center; }

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--glass-border);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 400px;
  animation: fade-in 0.8s 0.3s ease both;
}

.hero-card, .hero-card-2, .hero-card-3 {
  position: absolute;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 0.9rem;
  min-width: 140px;
}

.hero-card { top: 20%; left: 50%; transform: translateX(-50%); }
.hero-card-2 { top: 50%; left: 20%; }
.hero-card-3 { top: 60%; right: 10%; }

.card-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Float animations */
@keyframes float1 {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-12px); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes float3 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

.float-animation { animation: float1 4s ease-in-out infinite; }
.float-animation-2 { animation: float2 5s ease-in-out infinite 1s; }
.float-animation-3 { animation: float3 6s ease-in-out infinite 2s; }

/* ---- Features ---- */
.features-section {
  padding: 80px 0;
  border-top: 1px solid var(--glass-border);
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 48px;
  font-size: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.feature-card {
  padding: 28px;
}

.feature-icon {
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  background: rgba(255,255,255,0.15);
  transform: scale(1.1);
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ---- Tariffs ---- */
.tariffs-section {
  padding: 80px 0 60px;
  border-top: 1px solid var(--glass-border);
}

.tariffs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.tariff-card {
  padding: 32px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.tariff-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 40px rgba(255,255,255,0.06);
}

.tariff-card.featured {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
}

.tariff-badge {
  display: inline-block;
  background: white;
  color: black;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.tariff-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tariff-price {
  font-size: 2.8rem;
  font-weight: 800;
  margin: 16px 0 4px;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tariff-price-sub {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 20px;
}

.tariff-features {
  text-align: left;
  margin: 20px 0;
  list-style: none;
}

.tariff-features li {
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tariff-features li:last-child { border-bottom: none; }

/* ---- Auth Section ---- */
.auth-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
}

.auth-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-switch {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 20px;
}

.auth-switch a { color: white; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ---- Form Elements ---- */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.glass-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 12px 16px;
  color: white;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  width: 100%;
  font-family: inherit;
}

.glass-input:focus {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
}

.glass-input::placeholder { color: var(--text-muted); }

.glass-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.glass-select option { background: #1a1a1a; color: white; }

textarea.glass-input { resize: vertical; min-height: 80px; }

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .glass-input { padding-right: 44px; }

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

.toggle-password:hover { color: white; }

.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: white;
  cursor: pointer;
}

/* ---- Messages ---- */
.error-msg {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fca5a5;
  font-size: 0.85rem;
}

.success-msg {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  color: #86efac;
  font-size: 0.85rem;
}

/* ---- Profile ---- */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.profile-main {
  padding: 32px;
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
  position: relative;
}

.avatar-container {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
  transition: var(--transition);
  background: rgba(255,255,255,0.1);
}

.avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.avatar-container:hover .avatar-overlay { opacity: 1; }

.avatar-menu {
  position: absolute;
  top: 90px; left: 0;
  min-width: 180px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
}

.avatar-menu.show { display: flex; }

.avatar-menu button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: left;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.avatar-menu button:hover { background: var(--glass-bg); color: white; }

.avatar-url-form {
  margin: 16px 0;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid var(--glass-border);
}

.profile-info h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.profile-username { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 10px; }

.sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
}

.sub-badge .fa-circle { font-size: 0.5rem; }

.sub-active {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: #86efac;
}

.sub-inactive {
  background: rgba(107, 114, 128, 0.15);
  border: 1px solid rgba(107, 114, 128, 0.25);
  color: rgba(255,255,255,0.5);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.stat-card .stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card .stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

.profile-edit, .profile-password {
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  margin-top: 24px;
}

.profile-edit h3, .profile-password h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

/* Profile Sidebar */
.profile-sidebar { display: flex; flex-direction: column; gap: 20px; }

.buy-card, .history-card {
  padding: 24px;
}

.buy-card h3, .history-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.buy-card p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 16px;
}

.profile-tariffs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-tariff-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  transition: var(--transition);
}

.profile-tariff-item:hover { background: rgba(255,255,255,0.06); }

.profile-tariff-info { flex: 1; }
.profile-tariff-name { font-size: 0.875rem; font-weight: 600; }
.profile-tariff-price { font-size: 0.8rem; color: var(--text-muted); }

.payments-list { display: flex; flex-direction: column; gap: 8px; }

.payment-item {
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  font-size: 0.8rem;
}

.payment-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.payment-amount { font-weight: 600; color: #86efac; }

.payment-status-completed { color: #86efac; }
.payment-status-pending { color: #fbbf24; }
.payment-status-failed { color: #f87171; }

.payment-date { color: var(--text-muted); font-size: 0.75rem; }

/* ---- Admin Panel ---- */
.admin-section { padding-top: 80px; max-width: 100%; }

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  min-height: calc(100vh - 80px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.admin-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  padding: 8px 12px 16px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 12px;
}

.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.admin-nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: left;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  width: 100%;
}

.admin-nav-btn:hover { background: var(--glass-bg); color: white; }
.admin-nav-btn.active { background: rgba(255,255,255,0.1); color: white; }

.admin-logout-btn {
  background: none;
  border: 1px solid rgba(248,113,113,0.3);
  color: rgba(248,113,113,0.8);
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: left;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  width: 100%;
  margin-top: 12px;
}

.admin-logout-btn:hover { background: rgba(248,113,113,0.1); color: #fca5a5; }

.admin-content { overflow: hidden; }

.admin-tab { display: flex; flex-direction: column; gap: 20px; }
.admin-tab.hidden { display: none; }

.admin-tab h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
}

.admin-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-search {
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 300px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.admin-stat-card {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-stat-icon {
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.admin-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
}

.admin-recent { }
.admin-recent h3 { font-size: 1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; }

/* Admin Table */
.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table thead {
  background: rgba(255,255,255,0.05);
}

.admin-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
  vertical-align: middle;
}

.admin-table tr:hover td { background: rgba(255,255,255,0.02); color: white; }
.admin-table tr:last-child td { border-bottom: none; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
}

.status-active { background: rgba(74,222,128,0.15); color: #86efac; border: 1px solid rgba(74,222,128,0.25); }
.status-inactive { background: rgba(107,114,128,0.15); color: rgba(255,255,255,0.5); border: 1px solid rgba(107,114,128,0.25); }
.status-blocked { background: rgba(248,113,113,0.15); color: #fca5a5; border: 1px solid rgba(248,113,113,0.25); }
.status-completed { background: rgba(74,222,128,0.12); color: #86efac; border: 1px solid rgba(74,222,128,0.2); }
.status-pending { background: rgba(251,191,36,0.12); color: #fde68a; border: 1px solid rgba(251,191,36,0.2); }
.status-failed { background: rgba(248,113,113,0.12); color: #fca5a5; border: 1px solid rgba(248,113,113,0.2); }

.btn-xs {
  padding: 5px 10px;
  font-size: 0.75rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-xs-primary { background: rgba(255,255,255,0.1); color: white; }
.btn-xs-primary:hover { background: rgba(255,255,255,0.2); }
.btn-xs-danger { background: rgba(248,113,113,0.15); color: #fca5a5; }
.btn-xs-danger:hover { background: rgba(248,113,113,0.25); }
.btn-xs-success { background: rgba(74,222,128,0.15); color: #86efac; }
.btn-xs-success:hover { background: rgba(74,222,128,0.25); }
.btn-xs-warning { background: rgba(251,191,36,0.15); color: #fde68a; }
.btn-xs-warning:hover { background: rgba(251,191,36,0.25); }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
  flex-wrap: wrap;
}

.page-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  transition: var(--transition);
}

.page-btn:hover, .page-btn.active { background: rgba(255,255,255,0.12); color: white; }

/* Admin Settings */
.settings-form { padding: 28px; }

.settings-group {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--glass-border);
}

.settings-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.settings-group h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 600;
}

.form-actions { display: flex; gap: 10px; margin-top: 8px; }

/* Admin Tariff Cards */
.admin-tariff-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.admin-tariff-info { flex: 1; }
.admin-tariff-name { font-weight: 600; margin-bottom: 4px; }
.admin-tariff-meta { font-size: 0.8rem; color: var(--text-muted); }
.admin-tariff-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Logs */
.logs-list { display: flex; flex-direction: column; gap: 8px; }

.log-item {
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
}

.log-action {
  font-weight: 600;
  color: white;
  min-width: 120px;
}

.log-target { color: var(--text-muted); }
.log-time { margin-left: auto; color: var(--text-muted); white-space: nowrap; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  width: 100%;
  max-width: 480px;
  padding: 28px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 6px 8px;
  border-radius: 6px;
  transition: var(--transition);
}

.modal-close:hover { color: white; background: var(--glass-bg); }

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ---- Toast ---- */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}

.toast {
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  animation: toast-in 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}

.toast-success::before { background: #4ade80; }
.toast-error::before { background: #f87171; }
.toast-info::before { background: rgba(255,255,255,0.5); }
.toast-warning::before { background: #fbbf24; }

.toast-icon { font-size: 1rem; }
.toast-success .toast-icon { color: #4ade80; }
.toast-error .toast-icon { color: #f87171; }
.toast-info .toast-icon { color: rgba(255,255,255,0.7); }
.toast-warning .toast-icon { color: #fbbf24; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---- SSE Status ---- */
.sse-indicator {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10,10,10,0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 6px 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: default;
}

.sse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(107,114,128,0.8);
  transition: var(--transition);
}

.sse-dot.connected { background: #4ade80; animation: pulse-dot 2s infinite; }
.sse-dot.error { background: #f87171; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---- Footer ---- */
.glass-footer {
  position: relative;
  z-index: 1;
  background: rgba(10,10,10,0.9);
  backdrop-filter: var(--blur);
  border-top: 1px solid var(--glass-border);
  padding: 32px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
}

.footer-copy { color: var(--text-muted); font-size: 0.8rem; }

.footer-links { display: flex; gap: 16px; }
.footer-link { color: var(--text-muted); text-decoration: none; font-size: 0.8rem; transition: var(--transition); }
.footer-link:hover { color: white; }

/* ---- Loading ---- */
.loading-spinner {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 1.5rem;
}

/* ---- Misc ---- */
.mr-2 { margin-right: 8px; }
.link-muted { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; }
.link-muted:hover { color: white; }

/* ---- Animations ---- */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .profile-layout { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; max-height: none; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-nav-btn { flex: 1; min-width: 80px; justify-content: center; text-align: center; }
  .admin-nav-btn span { display: none; }
}

@media (max-width: 768px) {
  .header-inner { padding: 12px 16px; }
  .nav-links { display: none; }
  .btn-register { display: none; }
  .btn-icon { display: flex !important; }
  .section { padding: 80px 16px 40px; }
  .hero { padding: 20px 0 40px; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .tariffs-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px; }
  .btn-large { padding: 12px 20px; font-size: 0.9rem; }
  #toast-container { left: 16px; right: 16px; max-width: 100%; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 16px; }
  .profile-stats { grid-template-columns: 1fr; }
  .admin-layout { padding: 10px; }
}
