/* ─── CryptoKartz Shared Styles ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

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

:root {
  --purple-deep: #1a0a2e;
  --purple-mid: #3d1a78;
  --purple-bright: #7c3aed;
  --blue-electric: #3b82f6;
  --blue-cyan: #06b6d4;
  --purple-glow: #a855f7;
  --white: #f8fafc;
  --gray-light: #cbd5e1;
  --gray-mid: #94a3b8;
  --green-success: #10b981;
  --red-error: #ef4444;
  --yellow-warn: #f59e0b;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--purple-deep);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
}

/* Animated background */
.bg-grid {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.glow-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15), transparent 70%);
  top: -200px; right: -100px;
  animation: float1 20s ease-in-out infinite;
}
.glow-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12), transparent 70%);
  bottom: -150px; left: -100px;
  animation: float2 25s ease-in-out infinite;
}

@keyframes float1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-80px, 60px); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(60px, -80px); } }

.content { position: relative; z-index: 1; }

/* ─── Navigation ─────────────────────────────────────────── */
.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.app-nav .logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--purple-bright), var(--blue-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--gray-mid);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links .btn-nav {
  padding: 8px 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple-bright), var(--blue-electric));
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.nav-links .btn-nav:hover { opacity: 0.9; }

/* ─── Cards & Containers ─────────────────────────────────── */
.card {
  padding: 40px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.08), rgba(30, 15, 60, 0.6));
  border: 1px solid rgba(124, 58, 237, 0.15);
  backdrop-filter: blur(20px);
}

.card-sm {
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.06), rgba(30, 15, 60, 0.5));
  border: 1px solid rgba(124, 58, 237, 0.1);
  backdrop-filter: blur(20px);
}

/* ─── Forms ──────────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-light);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: rgba(26, 10, 46, 0.8);
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--purple-bright);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form-input::placeholder { color: var(--gray-mid); }

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

select.form-input option {
  background: #1a0a2e;
  color: #f8fafc;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-bright), var(--blue-electric));
  color: white;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: rgba(124, 58, 237, 0.1);
  color: var(--purple-glow);
  border: 1px solid rgba(124, 58, 237, 0.2);
}
.btn-secondary:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.3);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.btn-sm { padding: 8px 16px; font-size: 0.8rem; border-radius: 8px; }
.btn-full { width: 100%; }

/* ─── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--red-error);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--green-success);
}

.alert.show { display: block; }

/* ─── Radio/Checkbox Cards ───────────────────────────────── */
.option-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.option-card {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.15);
  background: rgba(26, 10, 46, 0.6);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  position: relative;
}

.option-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.08);
}

.option-card.selected {
  border-color: var(--purple-bright);
  background: rgba(124, 58, 237, 0.12);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.option-card .icon { font-size: 1.8rem; margin-bottom: 8px; display: block; }
.option-card .label { font-weight: 600; font-size: 0.85rem; }
.option-card .desc { font-size: 0.75rem; color: var(--gray-mid); margin-top: 4px; }

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* ─── Section Headers ────────────────────────────────────── */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-glow);
  margin-bottom: 8px;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--gray-mid);
  max-width: 500px;
}

/* ─── Stats Grid ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-box {
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.06), rgba(30, 15, 60, 0.5));
  border: 1px solid rgba(124, 58, 237, 0.1);
  text-align: center;
}

.stat-box .number {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple-bright), var(--blue-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-box .label {
  font-size: 0.8rem;
  color: var(--gray-mid);
  margin-top: 4px;
}

/* ─── Tables ─────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.1);
}

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

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray-mid);
  background: rgba(124, 58, 237, 0.06);
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.06);
  color: var(--gray-light);
}

.data-table tr:hover td {
  background: rgba(124, 58, 237, 0.04);
}

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-purple {
  background: rgba(124, 58, 237, 0.15);
  color: var(--purple-glow);
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-success);
}

.badge-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: var(--yellow-warn);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-electric);
}

/* ─── Loading Spinner ────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

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

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-nav { padding: 16px 20px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 0.8rem; }
  .card { padding: 24px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .section-title { font-size: 1.6rem; }
  .option-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .app-nav { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .stats-grid { grid-template-columns: 1fr; }
  .option-cards { grid-template-columns: 1fr; }
}
