/* ============================================
   MOUSY JOURNAL — Bug Hunting Logs
   Lexy Dehermes
   ============================================ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: #252535;
  --border-active: #3a3a50;
  --text-primary: #e8e8f0;
  --text-secondary: #9090a8;
  --text-muted: #606078;
  --accent: #f0c040;
  --accent-glow: rgba(240, 192, 64, 0.15);
  --critical: #ff4d6a;
  --high: #ff8c42;
  --medium: #f0c040;
  --low: #4caf50;
  --info: #42a5f5;
  --code-bg: #0d0d16;
  --radius: 8px;
  --radius-lg: 12px;
  --font-mono: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Noise overlay */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* Scanline */
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.03;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.02) 2px,
    rgba(255,255,255,0.02) 4px
  );
}

/* ============================================
   HEADER
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  font-size: 24px;
  filter: grayscale(0.3);
}

.logo-text {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
}

.logo-text .accent {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

/* ============================================
   HERO
   ============================================ */

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(240, 192, 64, 0.08);
  border: 1px solid rgba(240, 192, 64, 0.2);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.pulse {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(240, 192, 64, 0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 8px rgba(240, 192, 64, 0); }
}

.hero-title {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-subtitle {
  color: var(--accent);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
}

.hero-desc {
  max-width: 600px;
  margin: 0 auto 40px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
}

.hero-desc strong {
  color: var(--accent);
  font-weight: 600;
}

.hero-domain {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  background: rgba(240, 192, 64, 0.08);
  border: 1px solid rgba(240, 192, 64, 0.2);
  padding: 6px 20px;
  border-radius: 100px;
  letter-spacing: 0.5px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   FILTERS
   ============================================ */

.filters {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-chip:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}

.filter-chip.active {
  background: rgba(240, 192, 64, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   SEARCH
   ============================================ */

.search-section {
  max-width: 600px;
  margin: 0 auto 32px;
  padding: 0 24px;
}

.search-box {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

#searchInput {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

#searchInput::placeholder {
  color: var(--text-muted);
}

#searchInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ============================================
   ENTRIES GRID
   ============================================ */

.entries {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.entry-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--severity-color, var(--border));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.entry-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.entry-card:active {
  transform: translateY(0);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.entry-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.entry-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-critical { background: rgba(255, 77, 106, 0.12); color: var(--critical); }
.badge-high     { background: rgba(255, 140, 66, 0.12); color: var(--high); }
.badge-medium    { background: rgba(240, 192, 64, 0.12); color: var(--medium); }
.badge-low       { background: rgba(76, 175, 80, 0.12); color: var(--low); }
.badge-info      { background: rgba(66, 165, 245, 0.12); color: var(--info); }

.entry-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
  color: var(--text-primary);
}

.entry-target {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
}

.entry-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.entry-meta {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.entry-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.entry-bounty {
  color: var(--accent);
  font-weight: 600;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: sticky;
  top: 12px;
  float: right;
  margin: 12px 12px 0 0;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-active);
}

.modal-content {
  padding: 32px;
}

.modal-severity {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.2;
}

.modal-target {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 20px;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.modal-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.modal-section code {
  display: block;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
}

.modal-meta-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.modal-meta-row strong {
  color: var(--text-secondary);
  display: block;
  margin-bottom: 2px;
}

.modal-cve {
  font-family: var(--font-mono);
  color: var(--info);
}

.modal-bounty {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--accent);
  font-weight: 700;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}

.footer-inner p {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-tagline {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px !important;
}

.footer-domain {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 13px !important;
  color: var(--accent) !important;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.about-inner {
  border-top: 1px solid var(--border);
  padding-top: 60px;
}

.about-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 32px;
  text-align: center;
  letter-spacing: -0.5px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.25s ease;
}

.about-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.about-card-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.about-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.about-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.about-card strong {
  color: var(--accent);
  font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .hero {
    padding: 48px 16px 40px;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-value {
    font-size: 22px;
  }

  .entries {
    grid-template-columns: 1fr;
    padding: 0 16px 40px;
  }

  .modal {
    max-height: 90vh;
  }

  .modal-content {
    padding: 20px;
  }

  .modal-title {
    font-size: 20px;
  }

  .nav {
    gap: 16px;
  }
}

/* Loading state */
.loading { text-align:center; color:var(--text-secondary); padding:60px 20px; font-family:var(--font-mono); grid-column:1/-1; }
