/* ============================================
   AWIP.RUN THEME v1.0
   Shadowrun Decker Terminal Design System
   
   Usage: <link rel="stylesheet" href="https://awip.run/theme.css">
   Then add your app-specific styles after this import.
   
   Requires in your HTML:
     <div class="scanlines"></div>
     <div class="grid-bg"></div>
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&display=swap');

/* ===== RESET ===== */

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

/* ===== DESIGN TOKENS ===== */

:root {
  /* Backgrounds */
  --bg-void: #08080a;
  --bg-panel: #0e0e12;
  --bg-elevated: #141418;
  --bg-card: #111115;
  --bg-card-hover: #161619;

  /* Borders */
  --border-dim: #252530;
  --border-active: #3a3a4a;
  --border-glow: #ff2a2a;

  /* Text hierarchy */
  --text-primary: #ff3333;
  --text-bright: #ffffff;
  --text-body: #d4d4dc;
  --text-secondary: #b0b0bc;
  --text-dim: #8a8a9a;
  --text-ghost: #6a6a7a;
  --text-noise: #555566;

  /* Accent palette */
  --red: #ff3333;
  --red-hot: #ff4444;
  --red-bright: #ff6666;
  --magenta: #ff44ff;
  --amber: #ffbb33;
  --green: #33ff88;
  --ice: #4488ff;

  /* Glows */
  --glow-red: 0 0 8px #ff333366, 0 0 24px #ff333322, 0 0 48px #ff333310;
  --glow-red-tight: 0 0 6px #ff333380;
  --glow-magenta: 0 0 8px #ff44ff55, 0 0 20px #ff44ff18;
  --glow-amber: 0 0 8px #ffbb3355, 0 0 20px #ffbb3318;
  --glow-green: 0 0 8px #33ff8855, 0 0 20px #33ff8818;
  --glow-ice: 0 0 8px #4488ff55, 0 0 20px #4488ff18;

  /* Corner cuts */
  --cut: 10px;
  --cut-sm: 6px;

  /* Fonts */
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Share Tech Mono', monospace;
}

/* ===== BASE ===== */

html { background: var(--bg-void); scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-body);
  background: var(--bg-void);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--red-bright);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--text-bright);
  text-shadow: var(--glow-red);
}

::selection {
  background: rgba(255, 51, 51, 0.25);
  color: #fff;
}

/* ===== SCROLLBAR ===== */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb {
  background: var(--border-active);
  border-left: 1px solid var(--red);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--red);
  box-shadow: var(--glow-red-tight);
}

/* ===== ATMOSPHERIC LAYERS ===== */

.scanlines {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.04),
    rgba(0, 0, 0, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 9999;
}

.grid-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: -1;
}

.grid-bg::before {
  content: '';
  position: absolute;
  bottom: 0; left: -50%;
  width: 200%; height: 60%;
  background-image:
    linear-gradient(rgba(255, 51, 51, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 51, 51, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(60deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.5), transparent 70%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.5), transparent 70%);
}

.grid-bg::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 51, 51, 0.012) 50%, transparent 100%) 120px 0 / 1px 100% no-repeat,
    linear-gradient(180deg, transparent 20%, rgba(255, 68, 255, 0.008) 60%, transparent 90%) 340px 0 / 1px 100% no-repeat,
    linear-gradient(180deg, transparent 10%, rgba(255, 51, 51, 0.010) 40%, transparent 80%) 580px 0 / 1px 100% no-repeat,
    linear-gradient(180deg, transparent 40%, rgba(255, 187, 51, 0.006) 70%, transparent 95%) 720px 0 / 1px 100% no-repeat,
    linear-gradient(180deg, transparent 5%, rgba(255, 51, 51, 0.008) 55%, transparent 85%) 890px 0 / 1px 100% no-repeat;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(8, 8, 10, 0.75) 100%);
  pointer-events: none;
  z-index: 9998;
}

/* ===== GLITCH TEXT ===== */

@keyframes glitch-shift {
  0%, 85%, 100% { transform: translate(0); }
  86% { transform: translate(-2px, 1px); }
  88% { transform: translate(2px, -1px); }
  90% { transform: translate(-1px, -1px); }
  92% { transform: translate(1px, 1px); }
  94% { transform: translate(0); }
}

@keyframes glitch-clip {
  0%, 85%, 100% { clip-path: inset(0 0 0 0); }
  86% { clip-path: inset(20% 0 60% 0); }
  88% { clip-path: inset(0 0 0 0); }
  90% { clip-path: inset(60% 0 10% 0); }
  92% { clip-path: inset(0 0 0 0); }
}

.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.glitch-text::before {
  color: var(--magenta);
  animation: glitch-shift 6s infinite linear, glitch-clip 6s infinite linear;
  opacity: 0.5;
  z-index: -1;
}

.glitch-text::after {
  color: var(--amber);
  animation: glitch-shift 6s infinite linear reverse, glitch-clip 6s infinite linear reverse;
  animation-delay: 0.05s;
  opacity: 0.3;
  z-index: -1;
}

/* ===== BLINKING CURSOR ===== */

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

.cursor {
  display: inline-block;
  width: 10px;
  height: 2px;
  background: var(--red);
  box-shadow: var(--glow-red-tight);
  animation: blink 1s step-end infinite;
  margin-left: 6px;
  vertical-align: middle;
}

/* ===== CORNER-CUT PANELS ===== */

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  padding: 28px 32px;
  position: relative;
}

.panel-sm {
  background: var(--bg-elevated);
  border: 1px solid var(--border-dim);
  clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm));
  padding: 14px 20px;
  position: relative;
}

/* ===== STATUS BADGES ===== */

.status {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid;
  clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm));
}

.status-live {
  color: var(--green);
  border-color: var(--green);
  box-shadow: var(--glow-green);
  background: rgba(51, 255, 136, 0.06);
}

.status-building {
  color: var(--amber);
  border-color: rgba(255, 187, 51, 0.35);
  background: rgba(255, 187, 51, 0.04);
}

.status-planned {
  color: var(--text-dim);
  border-color: var(--border-dim);
  background: rgba(255, 255, 255, 0.02);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.6; box-shadow: 0 0 4px currentColor; }
  50% { opacity: 1; box-shadow: 0 0 8px currentColor, 0 0 16px currentColor; }
}

.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse-dot 2.5s ease-in-out infinite;
}

.status-live .status-dot { color: var(--green); }
.status-building .status-dot { color: var(--amber); animation: none; opacity: 0.8; }
.status-planned .status-dot { color: var(--text-dim); animation: none; opacity: 0.5; }

/* ===== TAGS ===== */

.tag {
  font-family: var(--font-body);
  font-size: 12px;
  padding: 3px 12px;
  border: 1px solid rgba(255, 68, 255, 0.2);
  color: var(--magenta);
  letter-spacing: 0.05em;
  text-transform: lowercase;
  clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm));
  background: rgba(255, 68, 255, 0.04);
}

/* ===== BUTTONS / ACTIONS ===== */

.btn {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border-dim);
  background: transparent;
  clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm));
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  color: var(--text-bright);
  border-color: var(--red);
  background: rgba(255, 51, 51, 0.05);
  box-shadow: var(--glow-red-tight);
}

.btn-primary {
  color: var(--bg-void);
  background: var(--red);
  border-color: var(--red);
}

.btn-primary:hover {
  background: var(--red-hot);
  border-color: var(--red-hot);
  color: var(--text-bright);
  box-shadow: var(--glow-red);
}

/* ===== FORM INPUTS ===== */

.input {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-body);
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  padding: 10px 14px;
  clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm));
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.input::placeholder { color: var(--text-ghost); }

.input:focus {
  border-color: var(--red);
  box-shadow: var(--glow-red-tight);
}

.label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
}

/* ===== SECTION LABELS ===== */

.section-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
  padding-left: 2px;
}

.section-label::before {
  content: '> ';
  color: var(--red);
  opacity: 0.6;
}

/* ===== DIVIDERS ===== */

.divider {
  border: none;
  height: 1px;
  background: var(--border-dim);
  position: relative;
}

.divider::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 140px; height: 1px;
  background: linear-gradient(90deg, var(--red), transparent);
  box-shadow: var(--glow-red-tight);
}

.divider-right::after {
  left: auto; right: 0;
  background: linear-gradient(270deg, var(--magenta), transparent);
  box-shadow: var(--glow-magenta);
}

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

.site-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border-dim);
  text-align: center;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px; right: 0;
  width: 140px; height: 2px;
  background: linear-gradient(270deg, var(--magenta), transparent);
  box-shadow: var(--glow-magenta);
}

.site-footer p { font-size: 14px; color: var(--text-dim); }
.site-footer a { color: var(--text-secondary); transition: all 0.2s ease; }
.site-footer a:hover { color: var(--text-bright); text-shadow: var(--glow-red); }

/* ===== UTILITY ===== */

.text-red { color: var(--red); }
.text-red-hot { color: var(--red-hot); }
.text-red-bright { color: var(--red-bright); }
.text-magenta { color: var(--magenta); }
.text-amber { color: var(--amber); }
.text-green { color: var(--green); }
.text-ice { color: var(--ice); }
.text-bright { color: var(--text-bright); }
.text-body { color: var(--text-body); }
.text-secondary { color: var(--text-secondary); }
.text-dim { color: var(--text-dim); }

.glow-red { text-shadow: var(--glow-red); }
.glow-magenta { text-shadow: var(--glow-magenta); }
.glow-amber { text-shadow: var(--glow-amber); }
.glow-green { text-shadow: var(--glow-green); }

.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

.uppercase { text-transform: uppercase; }
.mono { font-family: var(--font-body); }
