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

:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #1a1a1a;
  --accent-red: #8b0000;
  --accent-red-bright: #cc0000;
  --text-primary: #c0c0c0;
  --text-bright: #ffffff;
  --text-dim: #666666;
  --tab-active: #660000;
}

body {
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Boot Screen */
.boot-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.boot-container {
  padding: 2rem;
  max-width: 600px;
}

.boot-line {
  color: #00ff00;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

.boot-line.typing::after {
  content: '';
  animation: blink 0.5s infinite;
}

.cursor {
  color: #00ff00;
  animation: blink 0.5s infinite;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Overlay Effects */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.7) 100%);
}

/* Watching Eye */
.watching-eye {
  position: fixed;
  font-size: 2rem;
  transform: translate(-50%, -50%);
  z-index: 998;
  opacity: 0.3;
  animation: fadeInOut 2s ease-in-out;
  pointer-events: none;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.5; }
}

/* App Container */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Header */
.main-header {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--accent-red);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  background: none;
  border: 1px solid var(--text-dim);
  color: var(--text-primary);
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s;
}

.menu-toggle:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.logo {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-bright);
  letter-spacing: 0.3em;
}

.logo-subtitle {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-red-bright);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.clearance-badge {
  background: var(--bg-tertiary);
  border: 1px solid var(--accent-red);
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.clearance-badge:hover {
  background: var(--accent-red);
  color: var(--text-bright);
}

.timestamp {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Main Content Layout */
.main-content {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: var(--bg-secondary);
  border-right: 1px solid #333;
  padding: 1rem;
  transition: all 0.3s;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar.closed {
  width: 0;
  padding: 0;
  overflow: hidden;
}

.nav-item {
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  border-left-color: var(--accent-red);
  color: var(--text-bright);
  text-shadow: 0 0 10px var(--accent-red);
}

.nav-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
}

.section-header {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.filter-btn {
  padding: 0.4rem 0.8rem;
  margin: 0.3rem 0;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--bg-tertiary);
}

.filter-btn.safe.active { color: #2d5a27; }
.filter-btn.euclid.active { color: #8b6914; }
.filter-btn.keter.active { color: #8b0000; }

.nav-stats {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.nav-stats div {
  margin-bottom: 0.5rem;
}

.nav-stats .alert-high {
  color: var(--accent-red-bright);
  animation: pulse 1s infinite;
}

.archive-notice {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #333;
  font-size: 0.7rem;
  color: #4a9;
  text-align: center;
}

.archive-notice span:first-child {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: bold;
}

/* Content Area */
.content-area {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  background: linear-gradient(135deg, var(--bg-primary) 0%, #0d0d0d 100%);
}

/* Archive Banner */
.archive-banner {
  background: linear-gradient(90deg, rgba(139, 0, 0, 0.2), transparent);
  border: 1px solid var(--accent-red);
  border-left: 3px solid var(--accent-red);
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.archive-banner span {
  display: block;
  color: var(--accent-red-bright);
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.archive-banner p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Files Grid */
.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* File Card */
.file-card {
  background: var(--bg-tertiary);
  border: 1px solid #333;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.file-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-red), transparent);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.file-card:hover::before {
  transform: scaleX(1);
}

.file-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(139, 0, 0, 0.3);
}

.file-card.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.file-card.viewed {
  border-left: 3px solid #2d5a27;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.scp-number {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--text-bright);
}

.lock-icon {
  font-size: 1.2rem;
}

.full-docs-badge {
  font-size: 1rem;
  color: #4a9;
}

.card-name {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  min-height: 1.5em;
}

.card-class {
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.card-stamp {
  font-family: 'Special Elite', cursive;
  font-size: 0.7rem;
  color: var(--accent-red);
  text-transform: uppercase;
  border: 1px solid var(--accent-red);
  padding: 0.2rem 0.5rem;
  display: inline-block;
  transform: rotate(-3deg);
  margin-top: 0.5rem;
}

.card-docs-indicator {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
}

/* Document View */
.document-view {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--bg-tertiary);
  padding: 2rem;
  position: relative;
  border: 1px solid #333;
}

.document-view.glitch {
  animation: glitch 0.15s;
}

.document-view.pictogram-mode {
  font-size: 1.2rem;
}

@keyframes glitch {
  0%, 100% { transform: translate(0); filter: none; }
  20% { transform: translate(-2px, 2px); filter: hue-rotate(90deg); }
  40% { transform: translate(2px, -2px); filter: hue-rotate(-90deg); }
  60% { transform: translate(-1px, -1px); }
  80% { transform: translate(1px, 1px); }
}

.classified-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 5rem;
  color: rgba(139, 0, 0, 0.08);
  pointer-events: none;
  font-weight: bold;
  letter-spacing: 0.3em;
  white-space: nowrap;
}

.back-btn {
  background: none;
  border: 1px solid var(--text-dim);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: all 0.2s;
}

.back-btn:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.document-header {
  border-bottom: 2px solid var(--accent-red);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.document-header h1 {
  font-size: 1.8rem;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

.header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.object-class, .disruption-class, .risk-class {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border: 2px solid;
  font-size: 0.8rem;
}

.disruption-class {
  border-color: #ff6600;
  color: #ff6600;
}

.risk-class {
  border-color: #ff3333;
  color: #ff3333;
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #333;
  padding-bottom: 1rem;
}

.tab-btn {
  background: var(--bg-secondary);
  border: 1px solid #333;
  color: var(--text-dim);
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.tab-btn:hover {
  border-color: var(--accent-red);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--tab-active);
  border-color: var(--accent-red);
  color: var(--text-bright);
}

/* Tab Content */
.tab-content {
  min-height: 300px;
}

.document-section {
  margin-bottom: 2rem;
}

.document-section h3 {
  color: var(--text-bright);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  border-left: 3px solid var(--accent-red);
  padding-left: 0.8rem;
}

.document-section p {
  line-height: 1.8;
  white-space: pre-wrap;
}

.document-section.addendum {
  background: rgba(139, 0, 0, 0.1);
  padding: 1rem;
  border-left: 3px solid var(--accent-red);
}

.redaction {
  background: #000;
  color: #000;
  padding: 0 2px;
  cursor: pointer;
  transition: all 0.3s;
  user-select: none;
}

.redaction:hover {
  background: #222;
}

.redaction.revealed {
  background: var(--accent-red);
  color: var(--text-bright);
}

.no-data {
  text-align: center;
  padding: 3rem;
  color: var(--text-dim);
  border: 1px dashed #333;
}

/* Image Gallery */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  background: #111;
  border: 1px solid #333;
  padding: 1rem;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
  filter: grayscale(30%) sepia(10%);
  transition: filter 0.3s;
}

.gallery-item img:hover {
  filter: none;
}

.gallery-item.partial-redacted img {
  filter: grayscale(50%);
}

.gallery-item.redacted .no-image,
.gallery-item.forbidden .no-image,
.gallery-item.antimemetic .no-image {
  width: 100%;
  height: 200px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.redact-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  bottom: 3rem;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--accent-red);
  font-weight: bold;
}

.redact-overlay.forbidden {
  background: repeating-linear-gradient(
    45deg,
    rgba(139, 0, 0, 0.8),
    rgba(139, 0, 0, 0.8) 10px,
    rgba(0, 0, 0, 0.9) 10px,
    rgba(0, 0, 0, 0.9) 20px
  );
}

.image-caption {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.image-date {
  display: block;
  color: #555;
  margin-top: 0.2rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1002;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 1rem;
  color: var(--text-primary);
  text-align: center;
}

/* Audio Player */
.audio-log {
  background: #0a0a0a;
  border: 1px solid #333;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.audio-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.audio-title {
  color: var(--text-bright);
  font-weight: bold;
}

.audio-date {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.audio-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.audio-player {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #000;
  padding: 1rem;
  margin-bottom: 1rem;
}

.play-btn {
  background: var(--accent-red);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-bar {
  flex: 1;
  height: 30px;
  background: #1a1a1a;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-red);
  transition: width 0.1s linear;
}

.waveform {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 5px;
}

.wave-bar {
  width: 3px;
  background: rgba(255, 255, 255, 0.3);
  animation: wave 0.3s ease-in-out infinite alternate;
}

@keyframes wave {
  from { transform: scaleY(0.3); }
  to { transform: scaleY(1); }
}

.time-display {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  color: #0f0;
  min-width: 150px;
  text-align: center;
}

.transcript-toggle, .download-btn {
  background: var(--bg-tertiary);
  border: 1px solid #333;
  color: var(--text-dim);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  transition: all 0.2s;
}

.transcript-toggle:hover {
  border-color: var(--accent-red);
  color: var(--text-primary);
}

.download-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.transcript {
  background: #000;
  border: 1px solid #333;
  padding: 1rem;
  margin-top: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.transcript pre {
  white-space: pre-wrap;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Experiment Log */
.experiment-log {
  overflow-x: auto;
}

.experiment-log table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.experiment-log th {
  background: var(--accent-red);
  color: white;
  padding: 0.8rem;
  text-align: left;
  font-weight: normal;
}

.experiment-log td {
  padding: 0.8rem;
  border-bottom: 1px solid #333;
  vertical-align: top;
}

.experiment-log tr:hover {
  background: rgba(139, 0, 0, 0.1);
}

.experiment-log .expunged-row {
  background: rgba(139, 0, 0, 0.2);
  color: var(--accent-red);
}

.result-cell {
  max-width: 200px;
}

/* Incident Reports */
.incident-reports {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.incident-card {
  background: #0a0a0a;
  border: 1px solid #333;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.incident-card:hover {
  border-color: var(--accent-red);
}

.incident-card.expanded {
  border-color: var(--accent-red);
}

.incident-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.incident-designation {
  color: var(--accent-red);
  font-weight: bold;
}

.incident-date {
  color: var(--text-dim);
}

.incident-location, .incident-personnel {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.incident-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
}

.incident-details h4 {
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.incident-details pre {
  white-space: pre-wrap;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.casualties-section {
  color: var(--accent-red);
}

/* Interview Transcripts */
.interview-transcripts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.interview-card {
  background: #0a0a0a;
  border: 1px solid #333;
  transition: all 0.2s;
}

.interview-card.expanded {
  border-color: var(--accent-red);
}

.interview-header {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  cursor: pointer;
}

.interview-header:hover {
  background: rgba(139, 0, 0, 0.1);
}

.interview-id {
  color: var(--accent-red);
  font-weight: bold;
}

.interview-date {
  color: var(--text-dim);
}

.interview-meta {
  display: flex;
  gap: 2rem;
  padding: 0 1rem 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.interview-content {
  padding: 1rem;
  border-top: 1px solid #333;
}

.foreword, .afterword {
  padding: 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-style: italic;
}

.foreword {
  background: rgba(0, 100, 0, 0.1);
  border-left: 3px solid #2d5a27;
}

.afterword {
  background: rgba(100, 0, 0, 0.1);
  border-left: 3px solid var(--accent-red);
}

.transcript-text {
  white-space: pre-wrap;
  font-size: 0.85rem;
  line-height: 1.7;
  max-height: 500px;
  overflow-y: auto;
  padding: 1rem;
  background: #000;
}

/* Document Footer */
.document-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Access Denied */
.access-denied-full {
  text-align: center;
  padding: 4rem 2rem;
}

.denied-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.access-denied-full h2 {
  font-size: 2rem;
  color: var(--accent-red);
  margin-bottom: 1rem;
}

/* Search Terminal */
.search-terminal {
  max-width: 700px;
  margin: 0 auto;
  background: #000;
  border: 1px solid #333;
  padding: 1.5rem;
}

.terminal-header {
  color: #00ff00;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.terminal-input {
  display: flex;
  align-items: center;
  background: #111;
  padding: 0.8rem;
  margin-bottom: 1rem;
}

.prompt {
  color: #00ff00;
  margin-right: 0.5rem;
}

.terminal-input input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  flex: 1;
  outline: none;
}

.cursor-blink {
  color: #00ff00;
  animation: blink 0.7s infinite;
}

.search-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.search-btn:hover {
  background: var(--accent-red);
  color: var(--text-bright);
}

.search-results {
  margin-top: 1.5rem;
}

.results-header {
  color: #00ff00;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.result-item {
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}

.result-item:hover {
  background: var(--bg-tertiary);
  border-left-color: var(--accent-red);
}

.result-class {
  float: right;
  font-size: 0.8rem;
}

.no-results {
  color: var(--accent-red);
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed var(--accent-red);
}

/* Warning Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  animation: fadeIn 0.3s;
}

.warning-modal {
  background: var(--bg-secondary);
  border: 3px solid var(--accent-red);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  animation: shake 0.5s;
}

.warning-modal.breach {
  border-color: #ff0000;
  box-shadow: 0 0 50px rgba(255, 0, 0, 0.5);
}

.warning-modal.memetic {
  border-color: #ff00ff;
  box-shadow: 0 0 50px rgba(255, 0, 255, 0.5);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.warning-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  color: var(--accent-red-bright);
  margin-bottom: 1rem;
}

.warning-icon {
  font-size: 2rem;
  animation: pulse 0.5s infinite;
}

.warning-content {
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.acknowledge-btn {
  background: var(--accent-red);
  border: none;
  color: var(--text-bright);
  padding: 0.8rem 2rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s;
}

.acknowledge-btn:hover {
  background: var(--accent-red-bright);
}

/* Code Modal */
.code-modal {
  background: var(--bg-secondary);
  border: 2px solid var(--text-dim);
  padding: 2rem;
  text-align: center;
}

.code-modal h3 {
  margin-bottom: 1rem;
  color: var(--text-bright);
}

.code-modal input {
  background: #000;
  border: 1px solid var(--text-dim);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.2rem;
  padding: 0.8rem;
  text-align: center;
  width: 100%;
  margin-bottom: 1rem;
  letter-spacing: 0.3em;
}

.code-modal input:focus {
  outline: none;
  border-color: var(--accent-red);
}

.code-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.code-buttons button {
  background: var(--bg-tertiary);
  border: 1px solid var(--text-dim);
  color: var(--text-primary);
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.code-buttons button:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* Radio Chat */
.radio-chat {
  max-width: 900px;
  margin: 0 auto;
  background: #000;
  border: 1px solid #333;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 500px;
}

.radio-header {
  background: linear-gradient(180deg, #1a0000 0%, #0a0a0a 100%);
  border-bottom: 2px solid var(--accent-red);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.radio-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-bright);
  letter-spacing: 0.1em;
}

.radio-icon {
  font-size: 1.5rem;
}

.radio-icon.pulse {
  animation: radioPulse 1.5s ease-in-out infinite;
}

@keyframes radioPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.7; }
}

.radio-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
}

.online-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #00ff00;
}

.online-dot {
  width: 8px;
  height: 8px;
  background: #00ff00;
  border-radius: 50%;
  animation: pulse 1s infinite;
  box-shadow: 0 0 10px #00ff00;
}

.encryption-badge {
  color: #4a9eff;
}

.radio-frequency {
  background: #0a0505;
  padding: 0.5rem 1.5rem;
  display: flex;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  border-bottom: 1px solid #222;
}

.live-badge {
  color: #ff0000;
  animation: blink 1s infinite;
}

.radio-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: linear-gradient(180deg, #050505 0%, #0a0a0a 100%);
  font-family: 'VT323', 'Share Tech Mono', monospace;
  font-size: 0.9rem;
}

.radio-message {
  padding: 0.4rem 0;
  border-bottom: 1px solid #111;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  animation: messageSlide 0.3s ease-out;
}

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

.msg-timestamp {
  color: #444;
  font-size: 0.8rem;
  min-width: 70px;
}

.msg-sender {
  font-weight: bold;
  min-width: 80px;
}

.msg-sender.clickable {
  cursor: pointer;
  transition: all 0.2s;
}

.msg-sender.clickable:hover {
  text-decoration: underline;
  filter: brightness(1.3);
  text-shadow: 0 0 8px currentColor;
}

/* Chat Modal */
.chat-modal {
  background: #0a0a0a;
  border: 2px solid var(--accent-red);
  width: 90%;
  max-width: 500px;
  height: 70vh;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}

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

.chat-modal-header {
  background: linear-gradient(180deg, #1a0000 0%, #0a0a0a 100%);
  padding: 1rem;
  border-bottom: 1px solid var(--accent-red);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-target-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.chat-target-name {
  font-weight: bold;
  font-size: 1.1rem;
}

.chat-target-role {
  color: #888;
  font-size: 0.8rem;
}

.chat-target-site {
  background: #222;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  color: #666;
}

.chat-close-btn {
  background: none;
  border: 1px solid #444;
  color: #888;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.chat-close-btn:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.chat-modal-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: #050505;
}

.chat-msg {
  padding: 0.6rem 1rem;
  border-radius: 4px;
  max-width: 85%;
  font-size: 0.9rem;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.chat-msg-you {
  background: var(--accent-red);
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.chat-msg-them {
  background: #1a1a1a;
  border: 1px solid #333;
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

.chat-msg-system {
  background: transparent;
  color: #4a9eff;
  align-self: center;
  font-style: italic;
  font-size: 0.8rem;
  border: 1px dashed #4a9eff;
}

.chat-msg-sender {
  font-size: 0.75rem;
  opacity: 0.7;
  font-weight: bold;
}

.chat-msg-text {
  color: var(--text-primary);
}

.chat-msg-time {
  font-size: 0.65rem;
  opacity: 0.5;
  align-self: flex-end;
}

.chat-modal-input {
  padding: 1rem;
  border-top: 1px solid #333;
  display: flex;
  gap: 0.5rem;
  background: #0a0505;
}

.chat-modal-input input {
  flex: 1;
  background: #000;
  border: 1px solid #333;
  color: var(--text-primary);
  padding: 0.7rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
}

.chat-modal-input input:focus {
  outline: none;
  border-color: var(--accent-red);
}

.chat-modal-input button {
  background: var(--accent-red);
  border: none;
  color: white;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  transition: all 0.2s;
}

.chat-modal-input button:hover {
  background: var(--accent-red-bright);
}

.chat-modal-footer {
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.7rem;
  color: #555;
  border-top: 1px solid #222;
  background: #050505;
}

.chat-modal-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-modal-messages::-webkit-scrollbar-track {
  background: #0a0a0a;
}

.chat-modal-messages::-webkit-scrollbar-thumb {
  background: var(--accent-red);
  border-radius: 2px;
}

.msg-role {
  color: #666;
  font-size: 0.75rem;
}

.msg-site {
  color: #555;
  font-size: 0.75rem;
  background: #111;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}

.msg-clearance {
  font-size: 0.7rem;
  padding: 0.1rem 0.3rem;
  background: var(--accent-red);
  color: white;
  border-radius: 2px;
}

.msg-text {
  flex: 1;
  min-width: 200px;
  color: var(--text-primary);
}

.radio-footer {
  background: #0a0505;
  border-top: 1px solid #333;
  padding: 0.8rem 1rem;
}

.radio-warning {
  text-align: center;
  font-size: 0.7rem;
  color: #ff6600;
  margin-bottom: 0.5rem;
  animation: warningFlash 3s infinite;
}

@keyframes warningFlash {
  0%, 90%, 100% { opacity: 1; }
  95% { opacity: 0.5; }
}

.radio-input-disabled {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem;
  background: #111;
  border: 1px dashed #333;
  color: #555;
  font-size: 0.8rem;
}

.radio-reason {
  font-size: 0.7rem;
  color: #444;
}

/* Radio nav item styling */
.radio-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.radio-nav-icon {
  font-size: 1rem;
}

.radio-live-dot {
  width: 6px;
  height: 6px;
  background: #ff0000;
  border-radius: 50%;
  animation: blink 1s infinite;
  box-shadow: 0 0 5px #ff0000;
}

/* Scrollbar for radio messages */
.radio-messages::-webkit-scrollbar {
  width: 6px;
}

.radio-messages::-webkit-scrollbar-track {
  background: #0a0a0a;
}

.radio-messages::-webkit-scrollbar-thumb {
  background: var(--accent-red);
  border-radius: 3px;
}

.radio-messages::-webkit-scrollbar-thumb:hover {
  background: var(--accent-red-bright);
}

/* Footer */
.main-footer {
  background: var(--bg-secondary);
  border-top: 1px solid #333;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-left {
  display: flex;
  gap: 2rem;
}

.ip-address {
  color: var(--text-dim);
}

.breach-link {
  color: var(--accent-red);
  text-decoration: none;
  transition: all 0.2s;
}

.breach-link:hover {
  color: var(--accent-red-bright);
  text-shadow: 0 0 10px var(--accent-red);
}

/* Responsive */
@media (max-width: 768px) {
  .main-header {
    padding: 0.8rem;
  }

  .logo-text {
    font-size: 1rem;
    letter-spacing: 0.1em;
  }

  .logo-subtitle {
    display: none;
  }

  .header-right {
    font-size: 0.7rem;
  }

  .connection-status {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    z-index: 99;
    width: 250px;
  }

  .sidebar.closed {
    transform: translateX(-100%);
    width: 250px;
    padding: 1rem;
  }

  .content-area {
    padding: 1rem;
  }

  .files-grid {
    grid-template-columns: 1fr;
  }

  .document-view {
    padding: 1rem;
  }

  .classified-watermark {
    font-size: 2.5rem;
  }

  .tab-navigation {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .tab-btn {
    white-space: nowrap;
    font-size: 0.65rem;
    padding: 0.5rem 0.7rem;
  }

  .header-badges {
    flex-direction: column;
    gap: 0.5rem;
  }

  .image-gallery {
    grid-template-columns: 1fr;
  }

  .audio-player {
    flex-direction: column;
  }

  .time-display {
    order: -1;
  }

  .experiment-log {
    font-size: 0.75rem;
  }

  .experiment-log th, .experiment-log td {
    padding: 0.5rem;
  }

  .main-footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .footer-left {
    flex-direction: column;
    gap: 0.3rem;
  }
}

@media (max-width: 480px) {
  .file-card {
    padding: 1rem;
  }

  .scp-number {
    font-size: 1.1rem;
  }

  .warning-modal {
    padding: 1.5rem;
  }

  .warning-header {
    font-size: 1rem;
  }

  .archive-banner {
    font-size: 0.8rem;
  }

  .archive-banner p {
    font-size: 0.7rem;
  }
}