@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cinzel+Decorative:wght@400;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg: #050508;
  --bg2: #0a0508;
  --card: #120808;
  --border: rgba(139,0,0,0.3);
  --border-gold: rgba(200,160,30,0.4);
  --red: #cc2200;
  --red-light: #ff4444;
  --gold: #f5c842;
  --gold-dark: #c8860a;
  --text: #f0f0f0;
  --text-muted: #888;
  --radius: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

h1,h2,h3,h4 { font-family: 'Cinzel', serif; }

a { color: inherit; text-decoration: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #050508; }
::-webkit-scrollbar-thumb { background: #5a1010; border-radius: 3px; }

/* Utilities */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-gold { background: linear-gradient(135deg, #f5c842, #e8a020, #ffd700, #c8860a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-red { color: var(--red-light); }
.glow-red { text-shadow: 0 0 20px rgba(220,38,38,0.8), 0 0 40px rgba(220,38,38,0.4); }
.glow-gold { text-shadow: 0 0 20px rgba(245,200,66,0.8), 0 0 40px rgba(245,200,66,0.4); }

/* Cards */
.card { background: linear-gradient(180deg, var(--card), #0a0505); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.card-gold { background: linear-gradient(180deg, #1a0e00, #0d0700); border: 1px solid var(--border-gold); border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 0 30px rgba(200,160,30,0.1); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border-radius: 10px; font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: 0.1em; font-size: 0.875rem; border: none; cursor: pointer; transition: all 0.3s ease; text-decoration: none; }
.btn-red { background: linear-gradient(135deg, #8b0000, #cc2200); color: white; border: 1px solid rgba(220,38,38,0.4); }
.btn-red:hover { background: linear-gradient(135deg, #a00000, #dd3300); transform: translateY(-2px); box-shadow: 0 0 20px rgba(180,30,30,0.4); }
.btn-gold { background: linear-gradient(135deg, #b8860b, #f5c842); color: #000; border: none; }
.btn-gold:hover { background: linear-gradient(135deg, #c8960c, #ffd700); transform: translateY(-2px); box-shadow: 0 0 20px rgba(245,200,66,0.4); }
.btn-outline { background: transparent; color: #ccc; border: 1px solid rgba(255,255,255,0.2); }
.btn-outline:hover { background: rgba(255,255,255,0.05); color: white; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.75rem; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* Navbar */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(0,0,0,0.75); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(139,0,0,0.3); height: 64px; display: flex; align-items: center; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { display: flex; align-items: center; gap: 0.5rem; font-family: 'Cinzel Decorative', serif; font-size: 1.25rem; font-weight: 700; }
.navbar-brand .icon { color: #cc2200; font-size: 1rem; }
.navbar-nav { display: flex; align-items: center; gap: 0.75rem; }
.nav-link { font-family: 'Cinzel', serif; font-size: 0.8rem; letter-spacing: 0.1em; color: #aaa; padding: 0.5rem 0.75rem; border-radius: 8px; transition: all 0.2s; }
.nav-link:hover { color: white; background: rgba(255,255,255,0.05); }
.nav-link.admin { color: #f5c842; }

/* Hero */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.95) 100%); }
.hero-overlay2 { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.65), transparent, rgba(0,0,0,0.65)); }
.hero-content { position: relative; z-index: 10; text-align: center; padding: 0 1rem; max-width: 900px; margin: 0 auto; padding-top: 4rem; }
.hero-badge { display: inline-block; background: rgba(139,0,0,0.5); border: 1px solid rgba(180,30,30,0.5); color: #ffaaaa; font-family: 'Cinzel', serif; font-size: 0.7rem; letter-spacing: 0.2em; padding: 0.35rem 1rem; border-radius: 999px; margin-bottom: 1rem; }
.hero h1 { font-family: 'Cinzel Decorative', serif; font-size: clamp(3rem, 10vw, 6rem); font-weight: 900; line-height: 1.1; margin-bottom: 1rem; }
.hero-subtitle { font-family: 'Cinzel', serif; font-size: 1.1rem; letter-spacing: 0.3em; margin-bottom: 1rem; }
.hero-desc { color: #aaa; font-size: 1rem; max-width: 600px; margin: 0 auto 2.5rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.scroll-hint { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.25rem; color: #555; font-family: 'Cinzel', serif; font-size: 0.65rem; letter-spacing: 0.2em; animation: bounce 2s infinite; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(-6px)} }

/* Sections */
section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 0.75rem; }
.section-divider { width: 6rem; height: 2px; margin: 0 auto; }
.divider-red { background: linear-gradient(to right, transparent, #cc2200, transparent); }
.divider-gold { background: linear-gradient(to right, transparent, #f5c842, transparent); }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.feature-card { text-align: center; padding: 2rem 1.5rem; transition: transform 0.3s; }
.feature-card:hover { transform: translateY(-4px); }
.feature-icon { width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.6; }

/* Plans */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 960px; margin: 0 auto; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 1rem; transition: transform 0.3s; }
.plan-card:hover { transform: translateY(-6px); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-family: 'Cinzel', serif; font-size: 0.7rem; font-weight: 700; padding: 0.25rem 1rem; border-radius: 999px; white-space: nowrap; }
.plan-badge.popular { background: linear-gradient(135deg, #b8860b, #f5c842); color: #000; }
.plan-badge.best { background: linear-gradient(135deg, #8b0000, #cc2200); color: white; }
.plan-name { font-size: 1.25rem; text-align: center; }
.plan-price { text-align: center; }
.plan-price .currency { color: #888; font-size: 0.875rem; }
.plan-price .amount { font-family: 'Cinzel', serif; font-size: 2.5rem; font-weight: 900; }
.plan-price .period { color: #888; font-size: 0.8rem; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.plan-features li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: #ccc; }
.plan-features li::before { content: '✓'; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; flex-shrink: 0; }
.plan-popular .plan-features li::before { background: rgba(200,160,30,0.2); color: #f5c842; }
.plan-normal .plan-features li::before { background: rgba(139,0,0,0.2); color: #ff6666; }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; max-width: 800px; margin: 0 auto; text-align: center; }
.step-number { width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 50%; background: linear-gradient(135deg, rgba(139,0,0,0.5), #000); border: 1px solid rgba(139,0,0,0.4); display: flex; align-items: center; justify-content: center; font-family: 'Cinzel', serif; font-weight: 900; font-size: 1.1rem; color: #ff6666; }
.step h3 { font-size: 0.9rem; margin-bottom: 0.5rem; }
.step p { color: var(--text-muted); font-size: 0.8rem; }

/* Footer */
footer { border-top: 1px solid rgba(139,0,0,0.2); padding: 2rem 0; background: rgba(0,0,0,0.6); text-align: center; }
footer .brand { font-family: 'Cinzel Decorative', serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
footer p { color: #555; font-size: 0.75rem; }

/* Auth pages */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: radial-gradient(ellipse at center, #1a0505 0%, #050508 70%); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 1.75rem; text-align: center; margin-bottom: 0.5rem; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); font-size: 0.875rem; margin-bottom: 2rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-family: 'Cinzel', serif; font-size: 0.75rem; letter-spacing: 0.1em; color: #aaa; margin-bottom: 0.5rem; }
.form-input { width: 100%; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); color: white; border-radius: 10px; padding: 0.75rem 1rem; font-size: 0.875rem; transition: border-color 0.2s; outline: none; }
.form-input:focus { border-color: rgba(200,50,50,0.6); }
.form-input::placeholder { color: #555; }
.form-error { color: #ff6666; font-size: 0.8rem; margin-top: 0.35rem; }
.form-success { color: #66ff88; font-size: 0.8rem; margin-top: 0.35rem; }

/* Alert */
.alert { padding: 1rem 1.25rem; border-radius: 10px; margin-bottom: 1rem; font-size: 0.875rem; display: flex; align-items: flex-start; gap: 0.75rem; }
.alert-success { background: rgba(0,100,0,0.2); border: 1px solid rgba(0,180,0,0.3); color: #88ff99; }
.alert-error { background: rgba(100,0,0,0.2); border: 1px solid rgba(180,0,0,0.3); color: #ff8888; }
.alert-warning { background: rgba(100,80,0,0.2); border: 1px solid rgba(200,160,0,0.3); color: #ffdd88; }

/* Dashboard */
.dashboard { padding-top: 80px; min-height: 100vh; }
.dashboard-header { margin-bottom: 2rem; }
.dashboard-header h1 { font-size: 2rem; }
.license-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.license-card { display: flex; flex-direction: column; gap: 1rem; }
.license-status { display: flex; align-items: center; gap: 0.5rem; font-family: 'Cinzel', serif; font-size: 0.75rem; font-weight: 700; }
.status-active { color: #66ff88; }
.status-expired { color: #ff6666; }
.status-suspended { color: #ffcc44; }
.status-pending { color: #aaa; }
.license-key-box { background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.05); border-radius: 10px; padding: 0.75rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.license-key-text { font-family: monospace; font-size: 0.875rem; color: #f5c842; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { background: none; border: none; color: #888; cursor: pointer; padding: 0.25rem; border-radius: 4px; transition: color 0.2s; flex-shrink: 0; }
.copy-btn:hover { color: white; }
.license-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.stat-box { background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.05); border-radius: 10px; padding: 0.75rem; text-align: center; }
.stat-box .stat-label { color: #666; font-size: 0.7rem; margin-bottom: 0.25rem; }
.stat-box .stat-value { font-family: 'Cinzel', serif; font-size: 1.5rem; font-weight: 700; }
.empty-state { text-align: center; padding: 4rem 1rem; border-radius: var(--radius); border: 1px solid rgba(139,0,0,0.2); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* Admin */
.admin-layout { display: flex; min-height: 100vh; padding-top: 64px; }
.admin-sidebar { width: 240px; flex-shrink: 0; background: rgba(0,0,0,0.6); border-right: 1px solid rgba(139,0,0,0.2); padding: 1.5rem 1rem; position: fixed; top: 64px; bottom: 0; left: 0; overflow-y: auto; }
.admin-sidebar .brand { font-family: 'Cinzel', serif; font-size: 0.7rem; letter-spacing: 0.2em; color: #666; margin-bottom: 1.5rem; padding: 0 0.5rem; }
.admin-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.admin-nav a { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: 10px; font-family: 'Cinzel', serif; font-size: 0.8rem; letter-spacing: 0.05em; color: #888; transition: all 0.2s; }
.admin-nav a:hover { color: white; background: rgba(255,255,255,0.05); }
.admin-nav a.active { background: rgba(139,0,0,0.3); color: #ff8888; border: 1px solid rgba(139,0,0,0.4); }
.admin-main { flex: 1; margin-left: 240px; padding: 2rem; }
.admin-main h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.admin-main .subtitle { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.875rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { padding: 1.25rem; border-radius: var(--radius); border: 1px solid; }
.stat-card .stat-label { font-size: 0.8rem; color: #888; margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: space-between; }
.stat-card .stat-value { font-family: 'Cinzel', serif; font-size: 2rem; font-weight: 700; }
.stat-green { background: rgba(0,80,0,0.15); border-color: rgba(0,150,0,0.2); }
.stat-green .stat-value { color: #66ff88; }
.stat-blue { background: rgba(0,30,80,0.15); border-color: rgba(0,80,180,0.2); }
.stat-blue .stat-value { color: #88aaff; }
.stat-yellow { background: rgba(80,60,0,0.15); border-color: rgba(200,160,0,0.2); }
.stat-yellow .stat-value { color: #f5c842; }
.stat-red { background: rgba(80,0,0,0.15); border-color: rgba(180,0,0,0.2); }
.stat-red .stat-value { color: #ff8888; }

/* Table */
.table-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(139,0,0,0.2); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead tr { border-bottom: 1px solid rgba(255,255,255,0.08); }
thead th { padding: 1rem; text-align: left; font-family: 'Cinzel', serif; font-size: 0.7rem; letter-spacing: 0.1em; color: #888; background: rgba(0,0,0,0.3); }
tbody tr { border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.2s; }
tbody tr:hover { background: rgba(255,255,255,0.03); }
tbody td { padding: 0.875rem 1rem; color: #ccc; }
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.7rem; font-weight: 700; font-family: 'Cinzel', serif; }
.badge-active { background: rgba(0,100,0,0.3); color: #66ff88; }
.badge-expired { background: rgba(100,0,0,0.3); color: #ff8888; }
.badge-pending { background: rgba(60,60,60,0.3); color: #aaa; }
.badge-suspended { background: rgba(100,80,0,0.3); color: #ffcc44; }
.badge-admin { background: rgba(100,80,0,0.3); color: #f5c842; }
.badge-user { background: rgba(0,40,100,0.3); color: #88aaff; }
.badge-paid { background: rgba(0,100,0,0.3); color: #66ff88; }

/* Checkout */
.checkout-page { padding-top: 80px; min-height: 100vh; }
.checkout-wrap { max-width: 640px; margin: 0 auto; padding: 2rem 1rem; }

/* Responsive */
@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
  .hero h1 { font-size: 3rem; }
  .plans-grid { grid-template-columns: 1fr; }
  .navbar-nav .nav-link { display: none; }
  .navbar-nav .nav-link.btn-red { display: inline-flex; }
}

/* Spinner */
.spinner { width: 32px; height: 32px; border: 3px solid rgba(200,50,50,0.3); border-top-color: #cc2200; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
