/* ============================================================
   Zindul — Main Stylesheet
   Dark theme, glass-morphism, modern gaming aesthetic
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a28;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(15, 15, 25, 0.7);
  --bg-input: rgba(255, 255, 255, 0.05);

  --accent: #4f7dff;
  --accent-secondary: #7b5cff;
  --gradient: linear-gradient(135deg, #4f7dff, #7b5cff);
  --gradient-hover: linear-gradient(135deg, #6b93ff, #9572ff);

  --text-primary: #e8e8f0;
  --text-secondary: #8888a0;
  --text-muted: #55556a;

  --border: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(79, 125, 255, 0.5);

  --success: #2dd4a0;
  --danger: #ff4a6e;
  --warning: #f0b232;

  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(79, 125, 255, 0.25);

  --nav-height: 64px;
  --container-width: 1200px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--bg-tertiary) var(--bg-primary);
}

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

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-secondary); }
img { max-width: 100%; display: block; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* --- Utility Classes --- */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow { box-shadow: var(--shadow-glow); }
.fade-in { animation: fadeIn 0.6s ease-out both; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 2px 12px rgba(79, 125, 255, 0.3);
}
.btn-primary:hover {
  background: var(--gradient-hover);
  box-shadow: 0 4px 24px rgba(79, 125, 255, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-secondary:hover {
  background: rgba(79, 125, 255, 0.1);
  box-shadow: 0 0 16px rgba(79, 125, 255, 0.2);
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #e63d5e; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-outline:hover { border-color: var(--accent); }

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

.btn:disabled, .btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* === CARDS === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}
.card h3 { font-size: 1rem; margin-bottom: 0.5rem; }

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}

.card:hover, .card-glass:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow), 0 0 30px rgba(79, 125, 255, 0.08);
}

/* === BADGES === */
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.badge-success, .badge-active { background: rgba(45, 212, 160, 0.15); color: var(--success); }
.badge-danger, .badge-expired { background: rgba(255, 74, 110, 0.15); color: var(--danger); }
.badge-warning, .badge-unused { background: rgba(240, 178, 50, 0.15); color: var(--warning); }

/* === NAVIGATION === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

/* Legacy .nav compat */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
  transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; gap: 12px; align-items: center; }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 40px) 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 125, 255, 0.12) 0%, transparent 70%);
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 36px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* === FEATURES GRID === */
.features { padding: 100px 0; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card { text-align: center; padding: 36px 24px; }
.feature-card .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  border-radius: var(--radius);
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.feature-card h3 { margin-bottom: 10px; font-size: 1.1rem; }
.feature-card p  { color: var(--text-secondary); font-size: 0.9rem; }

/* === STATS === */
.stats {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  text-align: center;
}
.stat-item h2 { font-size: 2.5rem; font-weight: 800; }
.stat-item p  { color: var(--text-secondary); font-size: 0.9rem; margin-top: 4px; }

/* === TESTIMONIALS === */
.testimonials { padding: 100px 0; }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.testimonial-card { padding: 32px; }
.testimonial-card .quote  { color: var(--text-secondary); font-style: italic; margin-bottom: 16px; }
.testimonial-card .author { font-weight: 600; font-size: 0.9rem; }
.testimonial-card .role   { color: var(--text-muted); font-size: 0.8rem; }

/* === PRICING === */
.pricing { padding: 100px 0; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}

.pricing-card { text-align: center; padding: 40px 32px; position: relative; }
.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: scale(1.04);
}
.pricing-card.popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pricing-card .tier     { font-size: 1rem; color: var(--text-secondary); margin-bottom: 8px; }
.pricing-card .price    { font-size: 2.8rem; font-weight: 800; margin-bottom: 4px; }
.pricing-card .price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-card .duration { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 28px; }

.pricing-features { list-style: none; text-align: left; margin-bottom: 32px; }
.pricing-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pricing-features li::before {
  content: '\2713';
  color: var(--success);
  font-weight: 700;
}

/* === FORMS === */
.form-group { margin-bottom: 20px; position: relative; }

.form-label, .form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-input,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition);
  outline: none;
}
.form-input::placeholder { color: var(--text-muted); }

.form-input:focus,
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(79, 125, 255, 0.15);
}

.form-input.error { border-color: var(--danger); }
.form-input.success { border-color: var(--success); }
.form-error { color: var(--danger); font-size: 0.8rem; margin-top: 6px; }

.form-card { max-width: 420px; margin: 0 auto; padding: 40px; }

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
}
.checkbox-label input { accent-color: var(--accent); }

/* Auth wrapper */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: calc(var(--nav-height) + 2rem) 2rem 2rem;
}
.auth-card { max-width: 420px; width: 100%; padding: 2.5rem; }
.auth-card h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.auth-card .subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: 0.85rem; color: var(--text-secondary); }

/* Password strength */
.pw-strength { height: 4px; border-radius: 2px; background: var(--bg-input); margin-top: 0.35rem; }
.pw-strength-bar { height: 100%; border-radius: 2px; width: 0; transition: width 0.3s, background 0.3s; }
.pw-strength-text { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Verification code input */
.code-input { display: flex; gap: 0.5rem; justify-content: center; margin: 1.5rem 0; }
.code-input input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
}
.code-input input:focus { border-color: var(--accent); }

/* === FORUM === */
.forum { padding: calc(var(--nav-height) + 40px) 0 80px; }

.thread-list { border-radius: var(--radius); overflow: hidden; }

.thread-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.thread-row:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
.thread-row:hover { background: rgba(79, 125, 255, 0.05); }
.thread-title { font-weight: 600; font-size: 0.95rem; }
.thread-meta  { color: var(--text-muted); font-size: 0.8rem; }

.post-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  margin-bottom: 16px;
}
.post-card .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  flex-shrink: 0;
}
.post-card .post-author { font-weight: 600; font-size: 0.9rem; }
.post-card .post-time   { color: var(--text-muted); font-size: 0.8rem; }
.post-card .post-body   { color: var(--text-secondary); font-size: 0.9rem; margin-top: 8px; }

.category-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(79, 125, 255, 0.15);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === DASHBOARD === */
.dashboard {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
  padding-top: var(--nav-height);
}

.sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  flex-shrink: 0;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.sidebar-link:hover, .sidebar-link.active {
  color: var(--text-primary);
  background: rgba(79, 125, 255, 0.08);
  border-right: 2px solid var(--accent);
}

.dashboard-content { flex: 1; padding: 32px; }
.dash-container { max-width: 960px; margin: 0 auto; padding: 2rem; }

/* Tab navigation */
.tab-nav { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn {
  padding: 0.6rem 1.2rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Dashboard stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card { text-align: center; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* Key management */
.key-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  margin-bottom: 12px;
}
.key-value, .item-row .key-str {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-input);
  padding: 6px 12px;
  border-radius: 4px;
}

.item-list { display: flex; flex-direction: column; gap: 0.75rem; }
.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.item-row .meta { font-size: 0.8rem; color: var(--text-muted); }
.item-actions { display: flex; gap: 0.4rem; }

.activity-list { list-style: none; }
.activity-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.activity-list li:last-child { border-bottom: none; }
.activity-time { float: right; color: var(--text-muted); font-size: 0.8rem; }

.status-active  { color: var(--success); }
.status-expired { color: var(--danger); }

/* === STORE === */
.store { padding: calc(var(--nav-height) + 40px) 0 80px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.product-card { padding: 0; overflow: hidden; }
.product-card .product-img {
  height: 180px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}
.product-card .product-info  { padding: 24px; }
.product-card .product-price { font-size: 1.5rem; font-weight: 700; }

.crypto-section { padding: 32px; text-align: center; margin-top: 40px; }
.crypto-address {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  background: var(--bg-input);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: 12px;
  word-break: break-all;
  color: var(--text-muted);
}

/* === CODE BLOCKS === */
.code-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre;
}

/* === FOOTER === */
.footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 12px; max-width: 280px; }
.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: var(--text-muted);
}
.footer-col a { display: block; color: var(--text-secondary); font-size: 0.9rem; padding: 4px 0; }
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px var(--accent); }
  50%      { box-shadow: 0 0 20px var(--accent); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

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

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .nav-hamburger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
  }

  .hero h1 { font-size: 2.2rem; }

  .features-grid,
  .pricing-grid,
  .testimonials-grid,
  .product-grid { grid-template-columns: 1fr; }

  .pricing-card.popular { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .dashboard { flex-direction: column; }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: flex;
    overflow-x: auto;
    padding: 0;
  }
  .sidebar-link { white-space: nowrap; padding: 14px 20px; border-right: none; }
  .sidebar-link.active { border-bottom: 2px solid var(--accent); border-right: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 1.8rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .thread-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}
