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

/* Design tokens (dark elegant) */
:root {
  /* Spec tokens */
  --bg: #0B0F14;
  --bg-start: #0F172A; /* gradient start */
  --bg-end: #020617;   /* gradient end */
  --surface: #121821;
  --surface-2: #161E28;
  --text: #E6E7EB;
  --text-2: #A7B0BF;
  --border: #233043;
  --accent: #4AA8FF; /* neon blue primary */
  --accent-hover: #3B82F6; /* hover accent */
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;

  /* Backward-compatible gc-* tokens */
  --gc-bg: var(--bg);
  --gc-bg-elev: #111827;
  --gc-surface: var(--surface);
  --gc-text: var(--text);
  --gc-text-muted: var(--text-2);
  --gc-primary: var(--accent);
  --gc-primary-08: rgba(47, 107, 255, .08);
  --gc-primary-25: rgba(47, 107, 255, .25);

  /* Radii, motion, shadows */
  --gc-radius-input: 12px;
  --gc-radius-card: 16px;
  --gc-radius-hero: 20px;
  --gc-ease: cubic-bezier(.2,.8,.2,1);
  --gc-transition: 220ms var(--gc-ease);
  --gc-shadow-sm: 0 1px 2px rgba(0,0,0,.30);
  --gc-shadow-lg: 0 6px 16px rgba(0,0,0,.35);
}

* { box-sizing: border-box; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif; }
html { font-size: 16px; }

html {
  position: relative;
  min-height: 100%;
}

/* Futuristic dark gradient background + subtle depth */
body {
  padding-top: 80px;
  margin-bottom: 60px;
  background: radial-gradient(circle at top left, var(--bg-start), var(--bg-end));
  color: var(--gc-text);
  letter-spacing: -0.3px;
}
@media (max-width: 576px) {
  body { padding-top: 64px; }
}

nav {
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  background: linear-gradient(to bottom, rgba(16,24,32,0.85), rgba(16,24,32,0.65)) !important;
  backdrop-filter: saturate(140%) blur(6px);
}

/* Theming: Light/Dark consistency across pages */
[data-bs-theme="dark"] body {
  background-color: var(--gc-bg);
  color: var(--gc-text);
}

[data-bs-theme="dark"] .navbar {
  background-color: var(--gc-bg) !important;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .summary-card {
  background-color: var(--gc-bg-elev);
  border: 1px solid var(--border);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: var(--gc-surface);
  border: 1px solid var(--border);
  color: var(--gc-text);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: var(--gc-surface);
  border-color: var(--gc-primary);
  box-shadow: 0 0 0 2px var(--gc-primary), 0 0 0 6px rgba(59,130,246,.18);
}

[data-bs-theme="dark"] .form-control::placeholder { color: #94a3b8; opacity: 1; }
[data-bs-theme="dark"] .text-secondary { color: #cbd5e1 !important; }

[data-bs-theme="light"] .navbar { background-color: #ffffff !important; }
[data-bs-theme="light"] .card,
[data-bs-theme="light"] .modal-content,
[data-bs-theme="light"] .summary-card { background-color: #ffffff; }
[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select { background-color: #ffffff; color: #111827; }
[data-bs-theme="light"] .form-control::placeholder { color: #6b7280; opacity: 1; }
[data-bs-theme="light"] .text-secondary { color: #6b7280 !important; }

/* Smooth, modern UI tweaks (applies to both themes) */
.navbar-brand { font-weight: 700; letter-spacing: .2px; }
.card { border-radius: var(--gc-radius-card); box-shadow: var(--gc-shadow-sm); transition: transform var(--gc-transition), box-shadow var(--gc-transition); }
.card:hover { transform: translateY(-3px); box-shadow: var(--gc-shadow-lg); }
.modal-content { border-radius: var(--gc-radius-hero); box-shadow: var(--gc-shadow-lg); }
.btn { transition: all var(--gc-transition); border-radius: var(--gc-radius-input); }
.btn.btn-primary { background: var(--gc-primary); border-color: var(--gc-primary); box-shadow: 0 6px 18px rgba(58,130,246,.25), 0 0 0 1px rgba(58,130,246,.10) inset; }
.btn.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-3px); box-shadow: 0 10px 24px rgba(58,130,246,.35), 0 0 0 1px rgba(58,130,246,.18) inset; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Generic focus ring */
:focus-visible { outline: none !important; box-shadow: 0 0 0 2px var(--gc-primary), 0 0 0 8px rgba(59,130,246,.20) !important; }
.form-control, .form-select { border-radius: var(--gc-radius-input); transition: border-color var(--gc-transition), box-shadow var(--gc-transition), background-color var(--gc-transition); }

/* Result table styling */
#result-tags thead th { background-color: rgba(74, 168, 255, .08); }
#result-tags tbody tr:hover { background-color: rgba(148, 163, 184, .08); }

/* Shared small badge used in hero sections */
.info-badge {
  background: rgba(74,168,255,.10);
  color: #a7d2ff;
  border: 1px solid rgba(74,168,255,.22);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  box-shadow: 0 0 0 2px rgba(59,130,246,.08) inset, 0 8px 24px rgba(0,0,0,.18);
}
.info-badge i { color: #bfe2ff; filter: drop-shadow(0 0 6px rgba(59,130,246,.35)); }

/* Typography scale */
h1, .display-4, .display-5, .display-6 { line-height: 1.2; font-weight: 700; letter-spacing: -0.3px; }
h1 { font-size: clamp(1.75rem, 2.2vw + 1.2rem, 2.25rem); }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
body, p { line-height: 1.6; font-weight: 400; }
.subtext { font-size: 14px; color: var(--gc-text-muted); }

/* Container max width + padding */
.container { max-width: 1200px; padding-left: 24px; padding-right: 24px; }

/* Smooth, modern UI tweaks */
.navbar-brand { font-weight: 800; letter-spacing: -0.2px; color: #eaf4ff !important; text-shadow: 0 0 18px rgba(59,130,246,.25); }

/* Nav icons sizing + glow */
.navbar .nav-link i { font-size: 1.5rem; margin-right: 8px; color: #a9cffc; transition: color var(--gc-transition), text-shadow var(--gc-transition), transform var(--gc-transition); text-shadow: 0 0 8px rgba(59,130,246,.25); }
.navbar .nav-link:hover i { color: #eaf4ff; text-shadow: 0 0 14px rgba(59,130,246,.55); transform: translateY(-1px); }

.card { border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.card:hover { box-shadow: 0 12px 28px rgba(0,0,0,.32); transition: box-shadow .25s ease; }

.btn { transition: all .22s var(--gc-ease); }
.btn.btn-primary { box-shadow: 0 6px 18px rgba(58,130,246,.25); }
.btn.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(58,130,246,.35); }

.form-control, .form-select { transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 .2rem rgba(59, 130, 246, .25); border-color: var(--accent-hover); }

/* Active glow accents */
.form-check-input:checked { border-color: var(--gc-primary); background-color: var(--gc-primary); box-shadow: 0 0 0 6px rgba(59,130,246,.18); }

/* Icon glow utility */
.icon-glow { color: #bfe2ff; text-shadow: 0 0 10px rgba(59,130,246,.5); }

/* Result table styling */
#result-tags thead th { background-color: rgba(56, 189, 248, .08); }
#result-tags tbody tr:hover { background-color: rgba(148, 163, 184, .08); }

/* Badge Colors - Light Theme */
.badge.bg-soft-light {
  color: #495057;
}

.badge.bg-soft-primary {
  color: #10335b;
}

.badge.bg-soft-success {
  color: #19490a;
}

.badge.bg-soft-danger {
  color: #660017;
}

/* Background Soft Colors - Light Theme */
.bg-soft-light {
  --bs-bg-opacity: 1;
  background-color: #fcfcfd;
}

.bg-soft-primary {
  --bs-bg-opacity: 1;
  background-color: #d4e6f9;
}

.bg-soft-success {
  --bs-bg-opacity: 1;
  background-color: #d9f0d1;
}

.bg-soft-danger {
  --bs-bg-opacity: 1;
  background-color: #ffccd7;
}

/* Badge Colors - Dark Theme */
[data-bs-theme="dark"] .badge.bg-soft-light {
  color: #f8f9fa;
}

[data-bs-theme="dark"] .badge.bg-soft-primary {
  color: #7db3ee;
}

[data-bs-theme="dark"] .badge.bg-soft-success {
  color: #7aff4d;
}

[data-bs-theme="dark"] .badge.bg-soft-danger {
  color: #f68;
}

/* Background Soft Colors - Dark Theme */
[data-bs-theme="dark"] .bg-soft-light {
  --bs-bg-opacity: 1;
  background-color: #373a3c;
}

[data-bs-theme="dark"] .bg-soft-primary {
  --bs-bg-opacity: 1;
  background-color: #0b213a;
}

[data-bs-theme="dark"] .bg-soft-success {
  --bs-bg-opacity: 1;
  background-color: #0d2405;
}

[data-bs-theme="dark"] .bg-soft-danger {
  --bs-bg-opacity: 1;
  background-color: #33000b;
}

/* Input Readonly States */
input[readonly] {
  opacity: 1 !important;
}

[data-bs-theme="dark"] input[readonly] {
  color: #858585 !important;
}

[data-bs-theme="light"] input[readonly] {
  background-color: #e9ecef !important;
}

/* Footer */
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px;
  line-height: 60px;
  text-align: center;
}

/* Custom style for Notyf */
.notyf__toast {
  max-width: 50em !important;

}

.notyf__ripple {
  height: 60em;
  width: 60em;
}

/* Lightweight animations utilities */
.lift { transition: transform var(--gc-transition), box-shadow var(--gc-transition); }
.lift:hover { transform: translateY(-3px); box-shadow: var(--gc-shadow-lg); }

@keyframes pulse-soft {
  0%, 100% { transform: translateZ(0) scale(1); opacity: 1; }
  50% { transform: translateZ(0) scale(1.03); opacity: .98; }
}
.btn-pulse { animation: pulse-soft 2.4s var(--gc-ease) infinite; }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { animation: fadeSlideUp 420ms var(--gc-ease) both; }

/* Soft scale + glow on interactive */
.hover-glow:hover { box-shadow: 0 8px 28px rgba(59,130,246,.28); transform: translateY(-2px); }

/* Hero subtle entrance */
.hero-enter { animation: fadeSlideUp 300ms var(--gc-ease) both; }

/* Button ripple (centered) */
.btn-ripple { position: relative; overflow: hidden; }
.btn-ripple::after { content: ""; position: absolute; inset: 0; margin: auto; width: 10px; height: 10px; background: rgba(255,255,255,.3); border-radius: 50%; transform: scale(0); opacity: 0; pointer-events: none; }
.btn-ripple:active::after { animation: ripple-anim 420ms ease-out; }
@keyframes ripple-anim { from { transform: scale(0); opacity: .35; } to { transform: scale(18); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
