/* =============================================
   Laser Layers – Design System v7.8
   Dark navy gradient + glassmorphism
   ============================================= */

:root {
  --brand-primary: #173255;
  --brand-primary-light: #2a4a7a;
  --brand-accent: #E63946;
  --brand-accent-hover: #d62839;

  --bg-gradient: linear-gradient(135deg, #0a0e27 0%, #1a2747 100%);
  --bg-solid: #0a0e27;

  --text-primary: #f5f7fa;
  --text-secondary: #b8c2d9;
  --text-muted: #6b7a99;

  --surface: rgba(255, 255, 255, 0.05);
  --surface-elevated: rgba(255, 255, 255, 0.08);
  --surface-border: rgba(255, 255, 255, 0.08);
  --surface-blur: 12px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 24px rgba(230, 57, 70, 0.2);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* ─── Base ─────────────────────────────────── */

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

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  animation: pageIn var(--transition-slow) ease-out both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
}

/* ─── Global dark-theme Tailwind overrides ──────
   !important needed: Tailwind CDN injects styles
   dynamically (after linked CSS in cascade order).
   ────────────────────────────────────────────── */

/* Text */
.text-gray-900, .text-gray-800 { color: var(--text-primary) !important; }
.text-gray-700                  { color: var(--text-secondary) !important; }
.text-gray-600, .text-gray-500  { color: var(--text-muted) !important; }
.text-gray-400, .text-gray-300  { color: rgba(107, 122, 153, 0.75) !important; }

/* Backgrounds */
.bg-white   { background-color: rgba(255, 255, 255, 0.06) !important; }
.bg-gray-50 { background-color: rgba(255, 255, 255, 0.03) !important; }
.bg-gray-100{ background-color: rgba(255, 255, 255, 0.07) !important; }

/* Borders */
.border-gray-100 { border-color: rgba(255, 255, 255, 0.05) !important; }
.border-gray-200 { border-color: rgba(255, 255, 255, 0.08) !important; }
.border-gray-300 { border-color: rgba(255, 255, 255, 0.11) !important; }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }

/* ─── Glass utilities ───────────────────────── */

.glass-card {
  background: var(--surface);
  backdrop-filter: blur(var(--surface-blur));
  -webkit-backdrop-filter: blur(var(--surface-blur));
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  transition: background var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-base);
}
.glass-card:hover {
  background: var(--surface-elevated);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.glass-panel {
  background: var(--surface);
  backdrop-filter: blur(var(--surface-blur));
  -webkit-backdrop-filter: blur(var(--surface-blur));
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
}

/* Accent border glow */
.glass-panel-accent {
  background: var(--surface);
  backdrop-filter: blur(var(--surface-blur));
  -webkit-backdrop-filter: blur(var(--surface-blur));
  border: 1px solid rgba(230, 57, 70, 0.35);
  box-shadow: var(--shadow-md), 0 0 20px rgba(230, 57, 70, 0.08);
  border-radius: var(--radius-md);
}

/* ─── Buttons ───────────────────────────────── */

.btn-accent {
  background: var(--brand-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  transition: background var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-fast);
}
.btn-accent:hover {
  background: var(--brand-accent-hover);
  box-shadow: var(--shadow-glow);
  color: #fff;
  text-decoration: none;
}
.btn-accent:active { transform: scale(0.97); }

.btn-glass {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  transition: background var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  text-decoration: none;
}
.btn-glass:active { transform: scale(0.97); }

/* ─── Inputs ─────────────────────────────────── */

.input-dark {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  width: 100%;
  transition: border-color var(--transition-fast),
              background var(--transition-fast),
              box-shadow var(--transition-fast);
}
.input-dark:focus {
  outline: none;
  border-color: rgba(230, 57, 70, 0.5);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}
.input-dark::placeholder { color: var(--text-muted); }

/* ─── Range sliders ─────────────────────────── */

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--brand-accent);
  border-radius: 50%;
  cursor: pointer;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:active::-webkit-slider-thumb {
  box-shadow: 0 0 0 5px rgba(230, 57, 70, 0.22);
  transform: scale(1.15);
}
input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--brand-accent);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: box-shadow var(--transition-fast);
}
input[type="range"]:hover::-moz-range-thumb {
  box-shadow: 0 0 0 5px rgba(230, 57, 70, 0.22);
}

/* ─── Gradient text ──────────────────────────── */

.text-gradient {
  background: linear-gradient(135deg, #f5f7fa 0%, #b8c2d9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-accent {
  background: linear-gradient(130deg, #ffffff 0%, #E63946 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Badges ─────────────────────────────────── */

.badge-glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.03em;
  display: inline-block;
}

/* ─── Scrollbar ──────────────────────────────── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

/* ─── Micro-interactions ─────────────────────── */

/* Card hover scale (applies to glass-card via :hover already, but explicit scale for links) */
a.glass-card:hover,
a.glass-panel:hover {
  transform: translateY(-2px);
}

/* Generic hover lift for any element with data-lift */
[data-lift]:hover {
  transform: translateY(-2px);
  transition: transform var(--transition-base);
}

/* Focus ring for all interactive elements */
button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgba(230, 57, 70, 0.6);
  outline-offset: 2px;
}

/* Select highlight on dark */
::selection {
  background: rgba(230, 57, 70, 0.3);
  color: #fff;
}

/* ─── Alpine.js transition helpers ──────────── */

[x-cloak] { display: none !important; }

/* ─── Cookie Consent ─────────────────────────── */

#cc-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: rgba(10,14,39,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 2px solid #E63946;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  padding: 0;
}
#cc-banner.cc-visible { transform: translateY(0); }
.cc-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cc-text {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
  flex: 1;
  min-width: 220px;
  margin: 0;
}
.cc-link { color: #60a5fa; }
.cc-link:hover { text-decoration: underline; }
.cc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cc-btn {
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity .15s, background .15s;
  white-space: nowrap;
  border: none;
}
.cc-btn:hover { opacity: 0.88; }
.cc-btn-primary { background: #E63946; color: #fff; }
.cc-btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.18);
}
.cc-btn-text {
  background: transparent;
  color: var(--text-muted);
  padding: 7px 8px;
}

/* Modal */
#cc-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
#cc-modal-backdrop.cc-visible { display: flex; }
#cc-modal {
  background: #0d1630;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  margin: 16px;
  overflow: hidden;
  animation: ccModalIn .22s ease-out;
}
@keyframes ccModalIn {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}
.cc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.cc-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}
.cc-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.cc-close:hover { color: var(--text-primary); }
.cc-modal-body { padding: 6px 0; }
.cc-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cc-category:last-child { border-bottom: none; }
.cc-category-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  padding-right: 16px;
}
.cc-category-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}
.cc-category-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.cc-toggle {
  width: 42px;
  min-width: 42px;
  height: 24px;
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.cc-toggle.cc-on { background: #E63946; }
.cc-toggle-disabled {
  opacity: 0.5;
  cursor: default;
  background: #E63946;
}
.cc-toggle-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: left .2s;
}
.cc-toggle.cc-on .cc-toggle-thumb,
.cc-toggle-disabled .cc-toggle-thumb { left: 21px; }
.cc-modal-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
  justify-content: flex-end;
}
@media (max-width: 600px) {
  .cc-inner { flex-direction: column; align-items: flex-start; }
  .cc-modal-footer { flex-direction: column-reverse; }
  .cc-modal-footer .cc-btn { width: 100%; text-align: center; }
}

/* ── Dukat credits widget ────────────────────────────────────────────────── */
.credit-dukat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  color: #FFD700;
  transition: background 0.2s, border-color 0.2s;
  cursor: default;
  user-select: none;
}
.credit-dukat:hover {
  background: rgba(255, 215, 0, 0.14);
  border-color: rgba(255, 215, 0, 0.4);
}
.credit-dukat.dukat-low {
  color: #FFA500;
  border-color: rgba(255, 165, 0, 0.35);
  background: rgba(255, 165, 0, 0.07);
}
.credit-dukat.dukat-empty {
  color: #E63946;
  border-color: rgba(230, 57, 70, 0.3);
  background: rgba(230, 57, 70, 0.07);
}
.dukat-count { letter-spacing: 0.03em; }
.dukat-icon { display: inline-flex; align-items: center; }
@media (max-width: 480px) {
  .credit-dukat { padding: 2px 6px; font-size: 0.75rem; }
}

/* ── Footer links ────────────────────────────────────────────────────────── */
.footer-nav-link {
  color: var(--text-muted);
  transition: color 0.15s;
  padding: 4px 2px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-nav-link:hover { color: #fff; }

.footer-policy-link {
  font-size: 14px;
  color: #9CA3AF;
  transition: color 0.15s;
  padding: 8px 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 500;
}
.footer-policy-link:hover { color: #fff; }

@media (max-width: 640px) {
  .footer-policy-link { font-size: 14px; padding: 10px 6px; }
}
