/* DetectiveCase — Dark Noir Detective & Forensic Desk Theme */

:root {
  --bg-color: #101216;
  --bg-surface: #181b22;
  --bg-card: #1f232d;
  --bg-card-hover: #262c38;
  --border-color: #2e3544;
  --border-highlight: #48546a;
  --text-main: #e6edf3;
  --text-muted: #8b949e;
  --text-dim: #656d76;
  --accent-gold: #e5a93c;
  --accent-gold-glow: rgba(229, 169, 60, 0.25);
  --accent-red: #da3633;
  --accent-red-glow: rgba(218, 54, 51, 0.25);
  --accent-blue: #388bfd;
  --accent-cyan: #39c5bb;
  --accent-green: #238636;
  --cork-bg: #2a221b;
  --font-mono: 'Courier New', Courier, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.6);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.7);
}

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

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

/* Subtle Film Grain Noise Overlay */
#noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  z-index: 9999;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-fluid {
  width: 100%;
  padding: 0 20px;
}

/* Header */
.app-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  color: var(--accent-gold);
  display: flex;
  align-items: center;
}

.brand-title {
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.brand-title .highlight {
  color: var(--accent-gold);
}

.brand-sub {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  font-family: var(--font-mono);
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background-color: var(--bg-card);
}

.badge-pro {
  background-color: var(--accent-gold);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  color: var(--text-main);
  border-color: var(--border-highlight);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 12px 4px 6px;
  border-radius: 20px;
  cursor: pointer;
  user-select: none;
}

.user-avatar {
  background-color: var(--accent-gold);
  color: #000;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
}

.tag-pro {
  background-color: var(--accent-gold);
  color: #000;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 1px 5px;
  border-radius: 3px;
}

.dropdown-menu {
  position: absolute;
  top: 48px;
  right: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 220px;
  padding: 8px 0;
  z-index: 1001;
}

.dropdown-header {
  padding: 8px 16px;
}

.dropdown-header small {
  display: block;
  color: var(--text-muted);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 6px 0;
}

.dropdown-item {
  display: block;
  padding: 8px 16px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background-color: var(--bg-card);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--accent-gold);
  color: #111;
  border-color: var(--accent-gold);
}

.btn-primary:hover {
  background-color: #f0b54e;
  box-shadow: 0 0 12px var(--accent-gold-glow);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-highlight);
}

.btn-danger {
  background-color: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

.btn-danger:hover {
  background-color: #e54b48;
  box-shadow: 0 0 12px var(--accent-red-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background-color: var(--bg-card);
  border-color: var(--border-highlight);
}

.btn-outline-warning {
  background: transparent;
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.btn-outline-warning:hover {
  background-color: rgba(229, 169, 60, 0.1);
}

.btn-outline-danger {
  background: transparent;
  color: var(--accent-red);
  border-color: var(--accent-red);
}

.btn-outline-danger:hover {
  background-color: rgba(218, 54, 51, 0.1);
}

.btn-outline-info {
  background: transparent;
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.btn-outline-info:hover {
  background-color: rgba(57, 197, 187, 0.1);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

.pulse-glow {
  animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(229, 169, 60, 0.6); }
  70% { box-shadow: 0 0 0 14px rgba(229, 169, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 169, 60, 0); }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(180deg, #181b22 0%, #101216 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 60px 0;
  text-align: center;
  position: relative;
}

.hero-stamp {
  display: inline-block;
  border: 2px solid var(--accent-red);
  color: var(--accent-red);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 3px;
  padding: 4px 14px;
  text-transform: uppercase;
  transform: rotate(-2deg);
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 3px;
  margin-bottom: 16px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #a0aab8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 32px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-color);
  padding-top: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.stat-box {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent-gold);
  font-family: var(--font-mono);
}

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

/* Cases Grid Section */
.cases-catalog-section {
  padding: 60px 20px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.case-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.case-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-md);
}

.case-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.case-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: bold;
  letter-spacing: 1px;
}

.case-badge-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.pill-free {
  background-color: rgba(35, 134, 54, 0.2);
  color: #3fb950;
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.pill-pro {
  background-color: rgba(229, 169, 60, 0.2);
  color: var(--accent-gold);
  border: 1px solid rgba(229, 169, 60, 0.3);
}

.case-card-title {
  font-size: 1.25rem;
  margin-bottom: 6px;
  color: var(--text-main);
}

.case-card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.case-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.case-synopsis-snippet {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Features Grid */
.features-section {
  padding: 40px 20px 80px;
}

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

.feature-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.feature-icon {
  color: var(--accent-gold);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Case Dossier View Layout */
.case-dossier-wrapper {
  flex: 1;
}

.dossier-top-bar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.dossier-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.back-link:hover {
  color: var(--text-main);
}

.dossier-headline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dossier-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.status-tag {
  font-size: 0.75rem;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.status-active {
  background-color: rgba(56, 139, 253, 0.2);
  color: #58a6ff;
}

.status-solved {
  background-color: rgba(35, 134, 54, 0.2);
  color: #3fb950;
}

.dossier-quick-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.clues-progress-pill {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.mini-progress-bar {
  width: 60px;
  height: 6px;
  background-color: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  background-color: var(--accent-gold);
}

/* Dossier Tabs */
.dossier-tabs-nav {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.dossier-tab-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s;
}

.dossier-tab-btn:hover, .dossier-tab-btn.active {
  background-color: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-highlight);
}

.dossier-grid-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  padding: 24px 20px;
}

@media (max-width: 900px) {
  .dossier-grid-layout {
    grid-template-columns: 1fr;
  }
}

.dossier-tab-content {
  display: none;
}

.dossier-tab-content.active {
  display: block;
}

/* Crime Report Paper */
.crime-report-paper {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  position: relative;
}

.confidential-seal {
  position: absolute;
  top: 24px;
  right: 24px;
  border: 2px solid var(--accent-red);
  color: var(--accent-red);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 10px;
  transform: rotate(4deg);
}

.paper-title {
  font-size: 1.4rem;
  font-family: var(--font-mono);
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.paper-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  background-color: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 24px;
}

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

.paper-section h4 {
  font-size: 1rem;
  color: var(--accent-gold);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.audio-briefing-box {
  background-color: #12151c;
  border-left: 4px solid var(--accent-gold);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.audio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.radio-transcript {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.timeline-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-left: 2px solid var(--border-color);
  padding-left: 20px;
  margin-left: 10px;
}

.timeline-node {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -26px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-gold);
}

.timeline-time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-weight: bold;
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-main);
}

/* Evidence Cards */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.evidence-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.evidence-card.undiscovered {
  border-style: dashed;
  opacity: 0.7;
}

.evidence-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.evidence-cat {
  font-size: 0.7rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-weight: bold;
}

.evidence-id {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.evidence-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.evidence-short {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.evidence-full-text {
  background-color: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  white-space: pre-wrap;
}

.evidence-inspection {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.locked-clue-state {
  text-align: center;
  padding: 30px 10px;
}

.locked-icon {
  color: var(--text-dim);
  margin-bottom: 12px;
}

/* Suspects Cards */
.suspects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.suspect-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.suspect-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.suspect-photo-box {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-highlight);
  display: flex;
  align-items: center;
  justify-content: center;
}

.suspect-avatar-placeholder {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--accent-gold);
}

.suspect-name {
  font-size: 1.1rem;
}

.suspect-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.suspect-bio {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.suspect-alibi-box {
  background-color: var(--bg-card);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-bottom: 16px;
}

/* Forensic Lab Grid */
.lab-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.lab-tool-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.tool-icon {
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.lab-tool-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.lab-tool-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Notepad Sidebar */
.notepad-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  position: sticky;
  top: 84px;
}

.notepad-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.85rem;
}

.save-status {
  font-size: 0.75rem;
  color: #3fb950;
}

.notepad-body textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.notepad-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  text-align: right;
}

/* Interrogation Room View */
.interrogation-header {
  padding: 20px;
}

.interrogation-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  padding-bottom: 60px;
}

@media (max-width: 860px) {
  .interrogation-grid {
    grid-template-columns: 1fr;
  }
}

.suspect-profile-pane {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.suspect-noir-portrait {
  width: 100%;
  height: 200px;
  background-color: #0c0e12;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
}

.portrait-avatar {
  font-size: 4rem;
  font-weight: 900;
  color: var(--accent-gold);
}

.noir-lamp-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(229,169,60,0.3) 0%, rgba(0,0,0,0) 70%);
}

.stress-meter-box {
  margin: 16px 0;
}

.stress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.stress-bar {
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.stress-fill {
  height: 100%;
  background-color: var(--accent-red);
  transition: width 0.4s ease;
}

.dialogue-pane {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dialogue-history {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  min-height: 280px;
  max-height: 450px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dialogue-bubble {
  padding: 16px;
  border-radius: var(--radius-sm);
  max-width: 90%;
}

.suspect-bubble {
  background-color: var(--bg-card);
  border-left: 3px solid var(--accent-gold);
  align-self: flex-start;
}

.detective-bubble {
  background-color: #162438;
  border-left: 3px solid var(--accent-blue);
  align-self: flex-end;
}

.bubble-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.bubble-text {
  font-size: 0.9rem;
  line-height: 1.5;
}

.questions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-dialog-option {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-dialog-option:hover {
  background-color: var(--bg-card);
  border-color: var(--accent-gold);
}

.btn-dialog-option.already-asked {
  opacity: 0.6;
}

.tag-asked {
  font-size: 0.7rem;
  background-color: var(--border-color);
  padding: 2px 6px;
  border-radius: 3px;
}

/* Cork Board View */
.cork-board-wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
}

.board-top-controls {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  z-index: 10;
}

.cork-surface {
  flex: 1;
  background-color: #241d18;
  background-image: radial-gradient(#3a2e24 10%, transparent 11%);
  background-size: 20px 20px;
  position: relative;
  overflow: auto;
  min-height: 800px;
  user-select: none;
}

.yarn-svg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 2500px;
  height: 2500px;
  pointer-events: none;
  z-index: 1;
}

.board-item {
  position: absolute;
  background-color: #fff;
  color: #111;
  border-radius: 2px;
  box-shadow: var(--shadow-md);
  cursor: grab;
  z-index: 2;
  transition: box-shadow 0.2s;
}

.board-item:active {
  cursor: grabbing;
  box-shadow: var(--shadow-lg);
  z-index: 100;
}

.board-suspect-polaroid {
  width: 200px;
  padding: 12px 12px 20px;
  text-align: center;
}

.polaroid-photo {
  width: 100%;
  height: 160px;
  background-color: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.polaroid-avatar {
  font-size: 3rem;
  font-weight: bold;
  color: #fff;
}

.polaroid-label {
  font-weight: bold;
  font-size: 0.95rem;
}

.polaroid-sub {
  font-size: 0.75rem;
  color: #666;
}

.board-evidence-card {
  width: 220px;
  background-color: #f7f4ea;
  padding: 14px;
  border-left: 4px solid var(--accent-red);
}

.evidence-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: bold;
  color: var(--accent-red);
  margin-bottom: 4px;
}

.board-clue-title {
  font-weight: bold;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.board-clue-snippet {
  font-size: 0.75rem;
  color: #444;
  line-height: 1.3;
}

.pushpin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.6);
  z-index: 10;
}

.pin-red { background-color: #da3633; }
.pin-yellow { background-color: #e5a93c; }

/* Accusation View */
.accusation-wrapper {
  padding: 40px 20px;
  max-width: 800px;
}

.accusation-header {
  margin-bottom: 24px;
}

.indictment-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-red);
  letter-spacing: 1px;
  font-weight: bold;
}

.indictment-form-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
}

.form-instructions {
  background-color: rgba(218, 54, 51, 0.1);
  border-left: 4px solid var(--accent-red);
  padding: 12px 16px;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.official-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent-gold);
}

.form-group {
  margin-bottom: 20px;
}

.form-input {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-gold);
}

.form-error {
  background-color: rgba(218, 54, 51, 0.15);
  color: #ff7b72;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* Solved Verdict Card */
.verdict-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
  text-align: center;
}

.stamp-solved {
  display: inline-block;
  border: 3px solid #3fb950;
  color: #3fb950;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 6px 18px;
  transform: rotate(-3deg);
  margin-bottom: 20px;
}

.verdict-epilogue {
  background-color: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-sm);
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 24px 0;
}

.verdict-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Certificate Diploma Styling */
.certificate-container {
  padding: 40px 20px;
  max-width: 900px;
}

.certificate-print-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.diploma-frame {
  background: #fbf8ee;
  color: #1a1a1a;
  padding: 24px;
  border: 8px solid #3b2a1a;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
}

.diploma-inner-border {
  border: 2px solid #8b6e4e;
  padding: 36px 28px;
  text-align: center;
}

.diploma-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 3px;
  margin: 12px 0 4px;
  color: #2b1f13;
}

.diploma-recipient {
  font-size: 2rem;
  font-weight: bold;
  font-family: 'Georgia', serif;
  color: #8b2500;
  margin: 20px 0;
  text-decoration: underline;
}

.diploma-grade-box {
  margin: 24px auto;
  border: 1px dashed #8b6e4e;
  padding: 16px;
  max-width: 500px;
}

.grade-rank {
  font-size: 1.3rem;
  font-weight: 900;
  color: #2b1f13;
}

.diploma-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 20px;
}

.wax-seal {
  width: 80px;
  height: 80px;
  background-color: #901a1e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7e6c4;
  font-size: 0.6rem;
  font-weight: bold;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
}

.diploma-hash-line {
  margin-top: 30px;
  font-size: 0.65rem;
  color: #777;
  font-family: var(--font-mono);
}

/* Pricing Page */
.pricing-page {
  padding: 60px 20px;
}

.pricing-header {
  text-align: center;
  margin-bottom: 48px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.pricing-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.pricing-featured {
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px var(--accent-gold-glow);
}

.featured-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: var(--accent-gold);
  color: #000;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 4px;
}

.plan-price {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 12px 0 6px;
}

.plan-price .period {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: normal;
}

.plan-features {
  list-style: none;
  margin: 24px 0;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.demo-code-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  max-width: 650px;
  margin: 0 auto;
}

.demo-codes-hint {
  background-color: var(--bg-card);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin: 16px 0;
}

.demo-codes-hint code {
  color: var(--accent-gold);
  font-weight: bold;
}

.redeem-form {
  display: flex;
  gap: 10px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-dialog {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-lg {
  max-width: 700px;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 10px;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

/* UV Scanner simulation */
.uv-canvas-container {
  width: 100%;
  height: 240px;
  background-color: #05070a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  cursor: crosshair;
  margin: 16px 0;
}

.uv-beam {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 43, 226, 0.5) 0%, rgba(138, 43, 226, 0) 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.uv-hidden-layer {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #39c5bb;
  font-weight: bold;
  pointer-events: none;
  display: none;
}

/* Footer */
.app-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 32px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
}

.footer-right {
  display: flex;
  gap: 12px;
}

.footer-right a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-right a:hover {
  color: var(--text-main);
}

.hidden {
  display: none !important;
}

/* Print Rules */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .app-header, .app-footer, .no-print, #noise-overlay {
    display: none !important;
  }
  .diploma-frame {
    box-shadow: none !important;
    border-width: 4px !important;
  }
}
