/* ═══════════════════════════════════════════════════════════════
   MrGSMPro — Modern Dark Theme Stylesheet
   ═══════════════════════════════════════════════════════════════ */

:root {
  --brand: #e63946;
  --brand-dark: #c81f32;
  --brand-light: #ff6b7a;
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #161620;
  --bg-glass: rgba(22, 22, 32, 0.75);
  --text: #f0f0f5;
  --text-muted: #8a8a9a;
  --text-dim: #5a5a6a;
  --border: rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.1);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(230,57,70,0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Preloader ── */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s ease;
}
.preloader-inner { text-align: center; }
.preloader-logo {
  font-size: 1.8rem; font-weight: 800; letter-spacing: 2px;
  margin-bottom: 24px; color: var(--brand);
  animation: pulse 2s ease-in-out infinite;
}
.preloader-bar {
  width: 160px; height: 3px;
  background: var(--border-light); border-radius: 3px; overflow: hidden;
}
.preloader-progress {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 3px;
  animation: loadBar 1.2s ease forwards;
}
@keyframes loadBar { to { width: 100%; } }
@keyframes pulse { 0%,100%{ opacity:1 } 50%{ opacity:0.6 } }

/* ── Flash Banner ── */
.flash-banner {
  position: relative; padding: 14px 20px;
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: space-between;
  animation: slideDown 0.3s ease;
}
.flash-banner button {
  background: none; border: none; color: inherit; font-size: 20px; cursor: pointer; opacity: 0.7;
}
.flash-success { background: rgba(34,197,94,0.12); color: #4ade80; border-bottom: 1px solid rgba(34,197,94,0.2); }
.flash-error { background: rgba(239,68,68,0.12); color: #f87171; border-bottom: 1px solid rgba(239,68,68,0.2); }
.flash-warning { background: rgba(245,158,11,0.12); color: #fbbf24; border-bottom: 1px solid rgba(245,158,11,0.2); }
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Container ── */
.container {
  width: 100%; max-width: 1200px;
  margin: 0 auto; padding: 0 24px;
}

/* ── Navigation ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar.scrolled { background: rgba(10,10,15,0.95); box-shadow: 0 4px 30px rgba(0,0,0,0.3); }
.navbar-spacer { height: 68px; }
.nav-container {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.nav-brand-icon { font-size: 1.4rem; }
.nav-brand-text { font-size: 1.3rem; font-weight: 800; letter-spacing: 0.5px; }
.nav-menu {
  display: flex; align-items: center; gap: 6px;
  list-style: none;
}
.nav-menu a {
  display: block; padding: 8px 14px;
  color: var(--text-muted); text-decoration: none;
  font-size: 14px; font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-menu a:hover, .nav-menu a.active {
  color: var(--text); background: var(--border-light);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 12px 24px;
    gap: 4px;
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: var(--transition);
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: all; }
  .nav-menu a { width: 100%; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; font-family: inherit;
  text-decoration: none; cursor: pointer; border: none;
  transition: var(--transition); white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; box-shadow: 0 4px 20px rgba(230,57,70,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(230,57,70,0.4); }
.btn-secondary {
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover { background: var(--border-light); }
.btn-telegram {
  background: #229ed9; color: #fff;
  box-shadow: 0 4px 15px rgba(34,158,217,0.25);
}
.btn-telegram:hover { background: #1a8bc2; transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #000; }
.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Hero ── */
.hero-section {
  position: relative; padding: 100px 0 80px;
  text-align: center; overflow: hidden;
}
.hero-section::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(230,57,70,0.12), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(230,57,70,0.05), transparent);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 100px;
  background: var(--border); border: 1px solid var(--border-light);
  font-size: 13px; color: var(--text-muted); margin-bottom: 28px;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.4} }

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -1.5px; margin-bottom: 20px;
}
.hero-title .gradient {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted); max-width: 600px;
  margin: 0 auto 36px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-light); transform: translateY(-4px); box-shadow: var(--shadow); }
.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
}
.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 18px;
  background: rgba(230,57,70,0.1); border: 1px solid rgba(230,57,70,0.2);
}
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.card-text { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ── Pricing ── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.pricing-card {
  position: relative; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px 28px; text-align: center;
  transition: var(--transition);
}
.pricing-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: var(--border-light); }
.pricing-card.popular {
  border-color: var(--brand);
  box-shadow: var(--shadow-glow);
}
.pricing-popular-badge {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 6px 18px; border-radius: 0 0 12px 12px;
  text-transform: uppercase; letter-spacing: 1px;
}
.pricing-name { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.pricing-price {
  font-size: 3rem; font-weight: 800; color: var(--text);
  margin: 16px 0; line-height: 1;
}
.pricing-price span { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.pricing-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.pricing-features { text-align: left; margin-bottom: 28px; }
.pricing-features li {
  list-style: none; padding: 8px 0; font-size: 14px;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.pricing-features li::before {
  content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0;
}
.pricing-features li:last-child { border-bottom: none; }

/* ── Forms ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; margin-bottom: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-control {
  width: 100%; padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 15px; font-family: inherit;
  transition: var(--transition);
}
.form-control:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(230,57,70,0.15);
}
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { cursor: pointer; appearance: none; }

/* ── Checkout ── */
.checkout-container { max-width: 520px; margin: 0 auto; padding: 40px 0; }
.checkout-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
}
.checkout-header { text-align: center; margin-bottom: 32px; }
.checkout-header h1 { font-size: 1.6rem; margin-bottom: 8px; }
.checkout-header p { color: var(--text-muted); font-size: 14px; }
.checkout-package {
  display: flex; align-items: center; gap: 16px;
  padding: 20px; background: var(--bg-elevated);
  border-radius: var(--radius-sm); margin-bottom: 24px;
  border: 1px solid var(--border);
}
.checkout-package-icon { font-size: 2rem; }
.checkout-package-info { flex: 1; }
.checkout-package-name { font-weight: 700; }
.checkout-package-price { font-size: 1.3rem; font-weight: 800; color: var(--brand); }
.checkout-secure {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-dim); margin-top: 16px;
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.data-table th {
  text-align: left; padding: 14px 16px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table tr:last-child td { border-bottom: none; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
}
.badge-primary { background: rgba(230,57,70,0.15); color: var(--brand-light); }
.badge-success { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-warning { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-danger { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-info { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-secondary { background: var(--border); color: var(--text-muted); }

/* ── Section Headers ── */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; margin-bottom: 12px; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

/* ── Grid Systems ── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }

/* ── Footer ── */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 60px 0 24px; margin-top: auto;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px;
}
.footer-brand-name { font-size: 1.2rem; font-weight: 800; margin-bottom: 12px; }
.footer-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: var(--transition);
}
.footer-social a:hover { background: var(--brand); color: #fff; }
.footer-links h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.footer-links a {
  display: block; color: var(--text-muted); text-decoration: none;
  font-size: 14px; padding: 6px 0; transition: var(--transition);
}
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-dim);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ── Admin Layout ── */
.admin-body { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px; background: var(--bg-elevated);
  border-right: 1px solid var(--border); flex-shrink: 0;
  display: flex; flex-direction: column;
}
.admin-sidebar-header {
  padding: 24px; border-bottom: 1px solid var(--border);
  font-size: 1.1rem; font-weight: 800;
}
.admin-sidebar-nav { list-style: none; padding: 16px 0; }
.admin-sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; color: var(--text-muted);
  text-decoration: none; font-size: 14px; font-weight: 500;
  transition: var(--transition);
}
.admin-sidebar-nav a:hover, .admin-sidebar-nav a.active {
  color: var(--text); background: rgba(230,57,70,0.08);
  border-right: 3px solid var(--brand);
}
.admin-main { flex: 1; overflow: auto; }
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px; border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.admin-content { padding: 32px; }
.admin-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.stat-value { font-size: 2rem; font-weight: 800; margin-bottom: 4px; }
.stat-label { font-size: 13px; color: var(--text-muted); }
@media (max-width: 768px) {
  .admin-body { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-sidebar-nav { display: flex; overflow-x: auto; padding: 8px; gap: 4px; }
  .admin-sidebar-nav a { white-space: nowrap; border-right: none; border-radius: var(--radius-sm); }
}

/* ── IMEI Checker ── */
.imei-box {
  max-width: 600px; margin: 0 auto; padding: 40px 0;
}
.imei-input-group {
  display: flex; gap: 12px; margin-bottom: 24px;
}
.imei-input-group .form-control {
  flex: 1; font-size: 18px; letter-spacing: 2px; text-align: center;
  font-family: 'SF Mono', monospace;
}
.imei-result {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  animation: fadeUp 0.4s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ── Animations ── */
.fade-in { animation: fadeIn 0.6s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── Utilities ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.pt-1 { padding-top: 8px; }
.pt-2 { padding-top: 16px; }
.pt-3 { padding-top: 40px; }
.pt-4 { padding-top: 60px; }
.pb-1 { padding-bottom: 8px; }
.pb-2 { padding-bottom: 16px; }
.pb-3 { padding-bottom: 40px; }
.pb-4 { padding-bottom: 60px; }
.hidden { display: none; }
