/* ═══════════════════════════════════════════════════════
   StarService — 3D Glass Black & White Theme
   ═══════════════════════════════════════════════════════ */

:root {
  --glass-bg: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.12);
  --glass-shadow: 0 8px 40px rgba(0,0,0,0.6);
  --glow: rgba(255,255,255,0.3);
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.65);
  --accent: #ffffff;
  --accent-dim: rgba(255,255,255,0.15);
  --bg: #000000;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  background: #000;
  color: var(--text-primary);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

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

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ── Glass Card ── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.15);
}

.glass-strong {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  box-shadow: 0 16px 60px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ── Buttons ── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  letter-spacing: 0.5px;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: 50px;
  background: conic-gradient(from 0deg, transparent 0%, white 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
  animation: none;
  z-index: -1;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 50px;
  background: rgba(0,0,0,0.85);
  z-index: -1;
}

.btn:hover::before {
  opacity: 1;
  animation: orbit-light 1.2s linear infinite;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255,255,255,0.15), 0 8px 30px rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.5);
}

.btn:active { transform: translateY(0); }

.btn-primary {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
}

.btn-primary:hover {
  background: rgba(255,255,255,0.25);
  box-shadow: 0 0 30px rgba(255,255,255,0.2), 0 8px 30px rgba(0,0,0,0.5);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.15);
}

.btn-danger {
  background: rgba(255,50,50,0.15);
  border-color: rgba(255,100,100,0.3);
  color: #ff8888;
}

.btn-danger:hover {
  background: rgba(255,50,50,0.25);
  box-shadow: 0 0 20px rgba(255,50,50,0.2);
}

.btn-sm { padding: 8px 18px; font-size: 12px; }
.btn-lg { padding: 16px 40px; font-size: 16px; }

@keyframes orbit-light {
  0% { transform: rotate(0deg); opacity: 1; }
  100% { transform: rotate(360deg); opacity: 1; }
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.navbar-brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-logo {
  width: 32px; height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.navbar-logo-placeholder {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 50px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.1);
}

.navbar-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.navbar-hamburger span {
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── Hero Banner ── */
.banner {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 80px 24px 60px;
  text-align: center;
}

.banner-inner {
  max-width: 700px;
  position: relative;
  z-index: 1;
}

.banner-image {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%; height: 100%;
  opacity: 0.15;
  z-index: 0;
}

.banner h1 {
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  text-shadow: 0 0 40px rgba(255,255,255,0.3);
  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;
}

.banner p {
  font-size: clamp(14px, 2vw, 18px);
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Plans Grid ── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.plan-card {
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.plan-card.featured {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.1);
}

.plan-card.featured::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent, rgba(255,255,255,0.15));
  pointer-events: none;
  z-index: -1;
}

.plan-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.plan-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.plan-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.plan-price {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 4px;
  line-height: 1;
}

.plan-price span {
  font-size: 18px;
  font-weight: 400;
  vertical-align: super;
  margin-right: 4px;
}

.plan-period {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.plan-features {
  list-style: none;
  margin-bottom: 28px;
  text-align: left;
}

.plan-features li {
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-features li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

/* ── Profile ── */
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  object-fit: cover;
  cursor: pointer;
  transition: all 0.3s;
}

.profile-avatar:hover {
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 0 20px rgba(255,255,255,0.15);
}

.profile-avatar-placeholder {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  cursor: pointer;
}

.subscription-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  font-size: 13px;
}

.subscription-badge.active {
  background: rgba(100,255,100,0.08);
  border-color: rgba(100,255,100,0.25);
  color: #88ff88;
}

.subscription-badge.expired {
  background: rgba(255,100,100,0.08);
  border-color: rgba(255,100,100,0.25);
  color: #ff8888;
}

.days-counter {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Admin Panel ── */
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  padding: 20px 0;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  color: var(--text-secondary);
  border-left: 2px solid transparent;
}

.admin-nav-item:hover, .admin-nav-item.active {
  color: #fff;
  background: rgba(255,255,255,0.05);
  border-left-color: rgba(255,255,255,0.5);
}

.admin-nav-item i { width: 18px; text-align: center; }

.stat-card {
  padding: 20px;
  text-align: center;
}

.stat-number {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── Form Controls ── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}

.form-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.05);
}

.form-input::placeholder { color: rgba(255,255,255,0.3); }

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-switch {
  position: relative;
  width: 44px; height: 24px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 24px;
  transition: all 0.3s;
  cursor: pointer;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 2px; top: 2px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  transition: all 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.4);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: #fff;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  animation: slideUp 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* ── Page Layouts ── */
.page {
  display: none;
  min-height: 100vh;
  padding-top: 70px;
}

.page.active { display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.section-title p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ── Language Toggle ── */
.lang-toggle {
  display: flex;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  overflow: hidden;
}

.lang-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: rgba(255,255,255,0.5);
  border: none;
  background: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lang-btn.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 50px;
}

/* ── Payment Methods ── */
.payment-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  margin-bottom: 10px;
}

.payment-method:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.2);
}

.payment-method.selected {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
}

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

/* ── Upload Photo ── */
.upload-zone {
  border: 2px dashed rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.03);
}

/* ── Table ── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-success { background: rgba(100,255,100,0.1); color: #88ff88; border: 1px solid rgba(100,255,100,0.2); }
.badge-warning { background: rgba(255,200,50,0.1); color: #ffcc50; border: 1px solid rgba(255,200,50,0.2); }
.badge-danger { background: rgba(255,80,80,0.1); color: #ff8888; border: 1px solid rgba(255,80,80,0.2); }
.badge-info { background: rgba(100,150,255,0.1); color: #88aaff; border: 1px solid rgba(100,150,255,0.2); }

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  min-width: 250px;
  animation: toastSlide 0.3s ease;
  backdrop-filter: blur(20px);
}

.toast-success { background: rgba(50,200,50,0.15); border: 1px solid rgba(50,200,50,0.3); color: #88ff88; }
.toast-error { background: rgba(255,50,50,0.15); border: 1px solid rgba(255,50,50,0.3); color: #ff8888; }
.toast-info { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: #fff; }

@keyframes toastSlide { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ── Loader ── */
.loader {
  width: 40px; height: 40px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: rgba(255,255,255,0.8);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mobile ── */
@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .navbar-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    gap: 4px;
  }
  .navbar-hamburger { display: flex; }
  .plans-grid { grid-template-columns: 1fr; }
  .admin-sidebar { width: 100%; padding: 0; }
  .modal { padding: 20px; }
  .section { padding: 40px 0; }
}

/* ── 3D Perspective ── */
.perspective-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.5s ease;
}

.shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }

/* ── Divider ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  margin: 20px 0;
}

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

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px;
  padding: 4px;
  overflow-x: auto;
}

.tab {
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
  white-space: nowrap;
  border: none;
  background: none;
}

.tab.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.tab:hover:not(.active) { color: rgba(255,255,255,0.8); }

/* ── Floating animation ── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.float { animation: float 3s ease-in-out infinite; }

/* ── Glow text ── */
.glow-text {
  text-shadow: 0 0 20px rgba(255,255,255,0.5), 0 0 40px rgba(255,255,255,0.2);
}

/* ── Balance Card ── */
.balance-card {
  transition: box-shadow 0.3s ease;
}

.balance-card:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(136,255,136,0.1), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ── Balance amount glow ── */
@keyframes balanceGlow {
  0%, 100% { text-shadow: 0 0 20px rgba(136,255,136,0.3); }
  50% { text-shadow: 0 0 40px rgba(136,255,136,0.6), 0 0 80px rgba(136,255,136,0.2); }
}

/* ── Topup success animation ── */
@keyframes successPulse {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.success-icon { animation: successPulse 0.5s ease; }

/* ── Quick amount buttons ── */
.amount-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.amount-preset {
  padding: 8px 4px;
  font-size: 12px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.2s;
}

.amount-preset:hover, .amount-preset.active {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ── Profile page improvements ── */
@media (max-width: 520px) {
  .balance-card .balance-amount {
    font-size: 36px;
  }
}
