/* ═══════════════════════════════════════════════════════════════
   V.01 // INDUSTRIAL_RAW DESIGN SYSTEM
   STATUS: OPERATIONAL | CLASS: UTILITARIAN / BRUTALIST
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────
   01 // CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ───────────────────────────────────────────────────────────────── */

:root {
  /* Color Matrix */
  --bg-void: #000000;
  --text-bright: #FFFFFF;
  --text-mute: #888888;
  --grid-line: #333333;
  --accent-alert: #FF3333;
  
  /* Typography */
  --font-primary: 'Share Tech Mono', monospace;
  --font-mono: 'DM Mono', monospace;
  
  /* Spacing (8px base unit) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* Grid */
  --grid-size: 24px;
  --border-width: 1px;
  
  /* Transitions */
  --transition-fast: 0.1s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.4s ease;
  
  /* Z-Index Scale */
  --z-base: 1;
  --z-overlay: 100;
  --z-modal: 200;
  --z-notification: 300;
  --z-max: 999;
}

/* ─────────────────────────────────────────────────────────────────
   02 // RESET & BASE STYLES
   ───────────────────────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-bright);
  background-color: var(--bg-void);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Remove all border-radius - CRITICAL */
* {
  border-radius: 0 !important;
}

/* Selection */
::selection {
  background: var(--text-bright);
  color: var(--bg-void);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-void);
  border-left: 1px solid var(--grid-line);
}

::-webkit-scrollbar-thumb {
  background: var(--grid-line);
  border: 1px solid var(--text-mute);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-mute);
}

/* ─────────────────────────────────────────────────────────────────
   03 // TYPOGRAPHY
   ───────────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h1 { font-size: 48px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 18px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }

p {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  color: var(--text-mute);
  margin-bottom: var(--space-md);
}

small, .text-small {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.text-mute {
  color: var(--text-mute);
}

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

code, pre {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--grid-line);
}

code {
  padding: 2px 6px;
  font-size: 10px;
}

pre {
  padding: var(--space-md);
  overflow-x: auto;
  font-size: 10px;
  line-height: 1.6;
}

blockquote {
  border-left: 2px solid var(--text-mute);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
  font-style: italic;
  color: var(--text-mute);
}

/* ─────────────────────────────────────────────────────────────────
   04 // GRID OVERLAY SYSTEM
   ───────────────────────────────────────────────────────────────── */

.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: var(--z-base);
  background-image: 
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  opacity: 0.15;
}

.grid-overlay.hidden {
  opacity: 0;
}

/* ─────────────────────────────────────────────────────────────────
   05 // NOISE TEXTURE OVERLAY
   ───────────────────────────────────────────────────────────────── */

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: var(--z-overlay);
  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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ─────────────────────────────────────────────────────────────────
   06 // SCANLINES EFFECT
   ───────────────────────────────────────────────────────────────── */

.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: var(--z-overlay);
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.1) 0px,
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 2px
  );
  opacity: 0.3;
}

/* ─────────────────────────────────────────────────────────────────
   07 // BUTTONS
   ───────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 1px solid var(--text-bright);
  background: transparent;
  color: var(--text-bright);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.btn::before {
  content: '[';
  margin-right: 4px;
  opacity: 0.5;
}

.btn::after {
  content: ']';
  margin-left: 4px;
  opacity: 0.5;
}

.btn:hover {
  background: var(--text-bright);
  color: var(--bg-void);
}

.btn:hover::before,
.btn:hover::after {
  opacity: 1;
}

.btn:active {
  transform: translateY(1px);
}

/* Ghost Button */
.btn-ghost {
  border-color: transparent;
  color: var(--text-mute);
}

.btn-ghost:hover {
  background: transparent;
  color: var(--text-bright);
  border-color: var(--grid-line);
}

/* Alert Button */
.btn-alert {
  border-color: var(--accent-alert);
  color: var(--accent-alert);
}

.btn-alert:hover {
  background: var(--accent-alert);
  color: var(--bg-void);
}

/* Disabled Button */
.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────────
   08 // FORM ELEMENTS
   ───────────────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: var(--space-sm);
}

.form-input {
  width: 100%;
  padding: var(--space-sm) 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-bright);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--grid-line);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-bottom-color: var(--text-bright);
}

.form-input::placeholder {
  color: var(--text-mute);
  opacity: 0.5;
}

/* Textarea */
textarea.form-input {
  min-height: 100px;
  resize: vertical;
  border: 1px solid var(--grid-line);
  padding: var(--space-sm);
}

/* Select */
.form-select {
  appearance: none;
  width: 100%;
  padding: var(--space-sm) var(--space-lg) var(--space-sm) var(--space-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-bright);
  background: transparent;
  border: 1px solid var(--grid-line);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888888'%3E%3Cpath d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.form-select:focus {
  outline: none;
  border-color: var(--text-bright);
}

/* Checkbox */
.form-checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 11px;
}

.form-checkbox input {
  display: none;
}

.form-checkbox .checkmark {
  width: 16px;
  height: 16px;
  border: 1px solid var(--grid-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  transition: all var(--transition-fast);
}

.form-checkbox input:checked + .checkmark {
  border-color: var(--text-bright);
  color: var(--text-bright);
}

.form-checkbox input:checked + .checkmark::after {
  content: 'X';
}

/* Radio */
.form-radio {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-size: 11px;
}

.form-radio input {
  display: none;
}

.form-radio .radiomark {
  width: 16px;
  height: 16px;
  border: 1px solid var(--grid-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 8px;
  transition: all var(--transition-fast);
}

.form-radio input:checked + .radiomark {
  border-color: var(--text-bright);
}

.form-radio input:checked + .radiomark::after {
  content: '•';
  color: var(--text-bright);
}

/* Range Slider */
.form-range {
  width: 100%;
  height: 4px;
  appearance: none;
  background: var(--grid-line);
  outline: none;
}

.form-range::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  background: var(--text-bright);
  cursor: pointer;
  border: 1px solid var(--text-bright);
}

.form-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--text-bright);
  cursor: pointer;
  border: 1px solid var(--text-bright);
  border-radius: 0;
}

/* ─────────────────────────────────────────────────────────────────
   09 // CARDS & CONTAINERS
   ───────────────────────────────────────────────────────────────── */

.card {
  position: relative;
  border: 1px solid var(--grid-line);
  padding: var(--space-lg);
  background: rgba(0, 0, 0, 0.5);
  transition: border-color var(--transition-fast);
}

.card:hover {
  border-color: var(--text-mute);
}

/* Corner Brackets */
.card::before {
  content: '┌';
  position: absolute;
  top: -1px;
  left: -1px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1;
}

.card::after {
  content: '┘';
  position: absolute;
  bottom: -1px;
  right: -1px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--grid-line);
}

.card-index {
  font-family: var(--font-primary);
  font-size: 10px;
  color: var(--text-mute);
}

.card-title {
  font-family: var(--font-primary);
  font-size: 14px;
  text-transform: uppercase;
  margin: 0;
}

.card-body {
  color: var(--text-mute);
}

/* ─────────────────────────────────────────────────────────────────
   10 // DATA TABLES
   ───────────────────────────────────────────────────────────────── */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 10px;
}

.data-table th,
.data-table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--grid-line);
}

.data-table th {
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mute);
  background: rgba(255, 255, 255, 0.02);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.data-table .status {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: var(--space-sm);
}

.data-table .status-active {
  background: var(--text-bright);
}

.data-table .status-inactive {
  background: var(--text-mute);
}

.data-table .status-alert {
  background: var(--accent-alert);
}

/* ─────────────────────────────────────────────────────────────────
   11 // NAVIGATION
   ───────────────────────────────────────────────────────────────── */

/* Breadcrumbs */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
}

.breadcrumbs a {
  color: var(--text-mute);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--text-bright);
}

.breadcrumbs .separator {
  margin: 0 var(--space-sm);
  opacity: 0.5;
}

.breadcrumbs .current {
  color: var(--text-bright);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 11px;
}

.pagination a,
.pagination span {
  padding: var(--space-xs) var(--space-sm);
  color: var(--text-mute);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.pagination a:hover {
  color: var(--text-bright);
  border-color: var(--grid-line);
}

.pagination .active {
  color: var(--text-bright);
  border-color: var(--text-bright);
}

.pagination .arrow {
  font-size: 14px;
}

/* Nav Links */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

.nav-link::before {
  content: '->';
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-bright);
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link.active {
  color: var(--text-bright);
}

.nav-link.active::before {
  opacity: 1;
}

/* Tabs */
.tabs {
  display: flex;
  gap: var(--space-lg);
  border-bottom: 1px solid var(--grid-line);
}

.tab {
  padding: var(--space-sm) 0;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mute);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
}

.tab:hover {
  color: var(--text-bright);
}

.tab.active {
  color: var(--text-bright);
  border-bottom-color: var(--text-bright);
}

/* ─────────────────────────────────────────────────────────────────
   12 // ALERTS & NOTIFICATIONS
   ───────────────────────────────────────────────────────────────── */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--grid-line);
  font-family: var(--font-mono);
  font-size: 10px;
}

.alert-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  font-weight: bold;
}

.alert-info {
  border-color: var(--text-mute);
}

.alert-info .alert-icon::before {
  content: '[i]';
  color: var(--text-mute);
}

.alert-warning {
  border-color: #FFAA33;
}

.alert-warning .alert-icon::before {
  content: '[!]';
  color: #FFAA33;
}

.alert-error {
  border-color: var(--accent-alert);
}

.alert-error .alert-icon::before {
  content: '[X]';
  color: var(--accent-alert);
}

.alert-success {
  border-color: #33FF77;
}

.alert-success .alert-icon::before {
  content: '[✓]';
  color: #33FF77;
}

/* ─────────────────────────────────────────────────────────────────
   13 // MODAL
   ───────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid var(--grid-line);
  background: var(--bg-void);
  padding: var(--space-xl);
}

.modal::before {
  content: '┌';
  position: absolute;
  top: -1px;
  left: -1px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
}

.modal::after {
  content: '┘';
  position: absolute;
  bottom: -1px;
  right: -1px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: 1px solid var(--grid-line);
  color: var(--text-mute);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  border-color: var(--text-bright);
  color: var(--text-bright);
}

.modal-title {
  font-family: var(--font-primary);
  font-size: 18px;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

/* ─────────────────────────────────────────────────────────────────
   14 // TAGS & BADGES
   ───────────────────────────────────────────────────────────────── */

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--grid-line);
  color: var(--text-mute);
}

.tag-active {
  border-color: var(--text-bright);
  color: var(--text-bright);
}

.tag-alert {
  border-color: var(--accent-alert);
  color: var(--accent-alert);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 var(--space-xs);
  font-family: var(--font-mono);
  font-size: 9px;
  background: var(--grid-line);
  color: var(--text-bright);
}

.badge-alert {
  background: var(--accent-alert);
  color: var(--bg-void);
}

/* ─────────────────────────────────────────────────────────────────
   15 // PROGRESS & LOADING
   ───────────────────────────────────────────────────────────────── */

.progress {
  height: 4px;
  background: var(--grid-line);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--text-bright);
  transition: width var(--transition-normal);
}

.progress-bar-alert {
  background: var(--accent-alert);
}

/* Loading Spinner */
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid var(--grid-line);
  border-top-color: var(--text-bright);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────────────
   16 // UTILITY CLASSES
   ───────────────────────────────────────────────────────────────── */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

.m-sm { margin: var(--space-sm); }
.m-md { margin: var(--space-md); }
.m-lg { margin: var(--space-lg); }
.m-xl { margin: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.hidden { display: none; }
.invisible { visibility: hidden; }
.visible { visibility: visible; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

.transition { transition: all var(--transition-normal); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }

/* ─────────────────────────────────────────────────────────────────
   17 // ANIMATIONS
   ───────────────────────────────────────────────────────────────── */

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

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

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

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

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

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.animate-fadeIn { animation: fadeIn 0.3s ease forwards; }
.animate-slideUp { animation: slideUp 0.3s ease forwards; }
.animate-pulse { animation: pulse 2s ease infinite; }
.animate-glitch { animation: glitch 0.3s ease infinite; }
.animate-blink { animation: blink 1s step-end infinite; }

/* ─────────────────────────────────────────────────────────────────
   18 // COMPONENT CELL STYLING
   ───────────────────────────────────────────────────────────────── */

.component-cell {
  position: relative;
  border: 1px solid var(--grid-line);
  padding: var(--space-xl);
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.component-cell::before {
  content: attr(data-coords);
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-mute);
  opacity: 0.5;
}

.component-cell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--grid-line);
}

.component-cell-index {
  font-family: var(--font-primary);
  font-size: 24px;
  color: var(--text-mute);
}

.component-cell-title {
  font-family: var(--font-primary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.component-cell-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ─────────────────────────────────────────────────────────────────
   19 // RESPONSIVE BREAKPOINTS
   ───────────────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  h3 { font-size: 18px; }
  
  .tabs { flex-wrap: wrap; gap: var(--space-sm); }
}

/* ─────────────────────────────────────────────────────────────────
   20 // INTERACTIVE COMPONENT FRAME
   ───────────────────────────────────────────────────────────────── */

.interactive-frame {
  position: relative;
  width: 100%;
  height: 500px;
  border: 1px solid var(--grid-line);
  overflow: hidden;
  background: var(--bg-void);
}

.interactive-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.interactive-controls {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  right: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  z-index: 10;
}

.interactive-stats {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-mute);
  text-align: right;
  z-index: 10;
}

.interactive-stats div {
  margin-bottom: 2px;
}

.interactive-title {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  font-family: var(--font-primary);
  font-size: 14px;
  text-transform: uppercase;
  z-index: 10;
}

.interactive-index {
  font-family: var(--font-primary);
  font-size: 24px;
  color: var(--text-mute);
  margin-right: var(--space-sm);
}
