/* Cyberpunk aesthetic overrides for Orbpondering */
/* Load this AFTER Tailwind/DaisyUI output.css */

/* ===== Fonts ===== */
h1, h2, .card-title {
  font-family: 'Audiowide', sans-serif;
  letter-spacing: 0.02em;
}

body, h3, h4, h5, h6,
.btn, .badge, .font-heading,
input, select, textarea,
.table, .label-text, .label-text-alt {
  font-family: 'Share Tech Mono', monospace;
}

code, pre, kbd {
  font-family: 'Share Tech Mono', monospace;
}

/* Slightly larger body text for readability at small sizes */
body {
  font-size: 1.05rem;
}

/* ===== CRT Grid Background ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.025) 0px,
      transparent 1px,
      transparent 4px
    );
}

/* ===== Z-index Scale ===== */
/*  -1: CRT grid (body::before)            */
/*   0: default page content               */
/*  10: glass backdrop on cards            */
/* 100: navbar                             */
/* 110: dropdown menus                     */
/* 200: modals / overlays                  */
/* 999: scan lines (visual only)           */

/* ===== Scan Line Overlay ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ===== Glass Morphism Cards ===== */
.card {
  position: relative;
  z-index: 0;
  background: rgba(43, 33, 58, 0.75) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

/* ===== Modal / Overlay ===== */
.modal,
.modal-box {
  z-index: 200 !important;
}

/* ===== Tooltips ===== */
.tooltip {
  z-index: 150;
}

.card:hover {
  border-color: rgba(54, 245, 246, 0.25);
  box-shadow:
    0 0 16px rgba(54, 245, 246, 0.10),
    0 0 4px rgba(54, 245, 246, 0.05);
}

/* Override for cards inside collapsed sections — no hover glow there */
.collapse .card:hover {
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

/* ===== Navbar ===== */
.navbar {
  position: relative;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(43, 33, 58, 0.85) !important;
}

/* ===== Dropdown menu ===== */
.dropdown-content {
  position: absolute;
  z-index: 110;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(43, 33, 58, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== Button Glow on Hover ===== */
.btn-primary:hover {
  box-shadow:
    0 0 14px rgba(231, 121, 193, 0.35),
    0 0 4px rgba(231, 121, 193, 0.15);
}

.btn-secondary:hover {
  box-shadow:
    0 0 14px rgba(246, 1, 157, 0.35),
    0 0 4px rgba(246, 1, 157, 0.15);
}

.btn-accent:hover {
  box-shadow:
    0 0 14px rgba(54, 245, 246, 0.35),
    0 0 4px rgba(54, 245, 246, 0.15);
}

.btn-error:hover {
  box-shadow:
    0 0 14px rgba(231, 76, 60, 0.35),
    0 0 4px rgba(231, 76, 60, 0.15);
}

.btn-success:hover {
  box-shadow:
    0 0 14px rgba(39, 174, 96, 0.35),
    0 0 4px rgba(39, 174, 96, 0.15);
}

.btn-warning:hover {
  box-shadow:
    0 0 14px rgba(243, 156, 18, 0.35),
    0 0 4px rgba(243, 156, 18, 0.15);
}

.btn-info:hover {
  box-shadow:
    0 0 14px rgba(52, 152, 219, 0.35),
    0 0 4px rgba(52, 152, 219, 0.15);
}

/* Ghost buttons (btn-ghost) — subtle glow only */
.btn-ghost:hover {
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.06);
}

/* ===== Badge Styling ===== */
.badge {
  border: 1px solid currentColor;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* ===== Table Row Hover ===== */
table.table-zebra tbody tr:hover {
  background: rgba(54, 245, 246, 0.04) !important;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 26, 46, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(54, 245, 246, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(54, 245, 246, 0.5);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(54, 245, 246, 0.3) rgba(26, 26, 46, 0.5);
}

/* ===== Input / Select / Textarea Glow on Focus ===== */
.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(54, 245, 246, 0.5) !important;
  box-shadow:
    0 0 0 1px rgba(54, 245, 246, 0.15),
    0 0 10px rgba(54, 245, 246, 0.08) !important;
  outline: none;
}

/* ===== Details / Collapse Styling ===== */
details.collapse {
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.25s ease;
}

details.collapse:hover {
  border-color: rgba(54, 245, 246, 0.15);
}

/* ===== Link Hover ===== */
.link-accent:hover {
  text-shadow: 0 0 8px rgba(54, 245, 246, 0.4);
}

/* ===== Alert / Notification Styling ===== */
.alert {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== Hero Section (Landing page) ===== */
.hero {
  background: transparent;
}

/* ===== Card Draw Animation ===== */
@keyframes card-draw {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#reading-content .grid > .card {
  animation: card-draw 0.35s ease-out both;
}

#reading-content .grid > .card:nth-child(1)  { animation-delay: 0.00s; }
#reading-content .grid > .card:nth-child(2)  { animation-delay: 0.06s; }
#reading-content .grid > .card:nth-child(3)  { animation-delay: 0.12s; }
#reading-content .grid > .card:nth-child(4)  { animation-delay: 0.18s; }
#reading-content .grid > .card:nth-child(5)  { animation-delay: 0.24s; }
#reading-content .grid > .card:nth-child(6)  { animation-delay: 0.30s; }
#reading-content .grid > .card:nth-child(7)  { animation-delay: 0.36s; }
#reading-content .grid > .card:nth-child(8)  { animation-delay: 0.42s; }
#reading-content .grid > .card:nth-child(9)  { animation-delay: 0.48s; }
#reading-content .grid > .card:nth-child(10) { animation-delay: 0.54s; }

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  #reading-content .grid > .card {
    animation: none;
    opacity: 1;
  }
}
