:root {
  --bg-color: #050505;
  --surface-color: #0d0d0d;
  --surface-border: #222222;
  --text-main: #f0f0f0;
  --text-muted: #888888;
  --accent: #ffffff;
  --highlight: #e63946;
  --font-mono: "Consolas", "Courier New", monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-mono);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding: 2rem 1rem;
}

/* Subtle CRT / Scanline effect */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  background: repeating-linear-gradient(
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.25) 3px
  );
  z-index: 999;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header */
.header {
  border-bottom: 2px solid var(--text-main);
  padding-bottom: 1.5rem;
}

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

.status-badge {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  transition: color 0.15s, background 0.15s;
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  color: var(--bg-color);
  background: var(--text-main);
}

.lang-divider {
  color: #444;
}

.glitch-title {
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--text-main);
  position: relative;
  display: inline-block;
}

.glitch-title::before,
.glitch-title::after {
  content: "RIDER_N_SWORD";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip: rect(0, 0, 0, 0);
}

.glitch-title:hover::before {
  left: -2px;
  text-shadow: 2px 0 #ff4d5e;
  animation: glitch-anim-1 1.5s infinite linear alternate-reverse;
}

.glitch-title:hover::after {
  left: 2px;
  text-shadow: -2px 0 #00ff88;
  animation: glitch-anim-2 1.8s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { clip: rect(12px, 9999px, 24px, 0); transform: skew(0.3deg); }
  20% { clip: rect(45px, 9999px, 60px, 0); transform: skew(-0.5deg); }
  40% { clip: rect(10px, 9999px, 28px, 0); transform: skew(0.8deg); }
  60% { clip: rect(70px, 9999px, 85px, 0); transform: skew(-0.2deg); }
  80% { clip: rect(30px, 9999px, 42px, 0); transform: skew(0.5deg); }
  100% { clip: rect(55px, 9999px, 75px, 0); transform: skew(0deg); }
}

@keyframes glitch-anim-2 {
  0% { clip: rect(35px, 9999px, 50px, 0); transform: skew(-0.4deg); }
  25% { clip: rect(5px, 9999px, 18px, 0); transform: skew(0.6deg); }
  50% { clip: rect(65px, 9999px, 80px, 0); transform: skew(-0.7deg); }
  75% { clip: rect(20px, 9999px, 35px, 0); transform: skew(0.3deg); }
  100% { clip: rect(80px, 9999px, 95px, 0); transform: skew(0deg); }
}

/* Subtle periodic glitch twitch on title */
.glitch-title {
  animation: glitch-twitch 6s infinite;
}

@keyframes glitch-twitch {
  0%, 94%, 100% { transform: none; filter: none; }
  95% { transform: skew(-0.8deg, 0.2deg); filter: drop-shadow(2px 0 #ff4d5e); }
  96% { transform: skew(0.6deg, -0.3deg); filter: drop-shadow(-2px 0 #00ff88); }
  97% { transform: none; filter: none; }
}

.subtitle {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Mission Clock Banner */
.mission-clock-banner {
  background: #0d0d0d;
  border: 1px solid #333;
  border-left: 4px solid #e63946;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.clock-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: #e63946;
  font-weight: 700;
}

.clock-display {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffffff;
  font-family: var(--font-mono);
}

.clock-sub {
  font-size: 0.72rem;
  color: #777;
  letter-spacing: 0.05em;
}

/* Cards & Brutalist Boxes */
.release-card,
.manifesto-card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
}

.card-meta-bar {
  background: #141414;
  border-bottom: 1px solid var(--surface-border);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.card-body {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .card-body {
    grid-template-columns: 320px 1fr;
    gap: 2rem;
  }
}

/* Artwork */
.artwork-frame {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.artwork-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid #333;
  background: #000;
}

.artwork-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(110%);
  transition: filter 0.8s ease, transform 0.8s ease;
}

.artwork-img.encrypted-art {
  filter: blur(14px) brightness(0.25) grayscale(90%);
  transform: scale(1.06);
}

.classified-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    rgba(15, 15, 15, 0.75),
    rgba(15, 15, 15, 0.75) 12px,
    rgba(5, 5, 5, 0.9) 12px,
    rgba(5, 5, 5, 0.9) 24px
  );
  gap: 0.5rem;
  transition: opacity 0.6s ease;
}

.classified-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.classified-stamp {
  border: 3px solid #ff4d5e;
  color: #ff4d5e;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.25em;
  padding: 0.35rem 0.9rem;
  text-transform: uppercase;
  transform: rotate(-7deg);
  background: rgba(0, 0, 0, 0.85);
}

.classified-timer {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #aaa;
  background: #000;
  padding: 0.2rem 0.6rem;
  border: 1px solid #444;
}

.artwork-caption {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* Release Details */
.release-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: #1c1c1c;
  border: 1px solid #333;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.tag.accent {
  background: var(--text-main);
  color: var(--bg-color);
  border-color: var(--text-main);
  position: relative;
  transition: transform 0.1s;
}

#trackHeaderTag:hover {
  background: #ff4d5e;
  border-color: #ff4d5e;
  color: #000;
  animation: signal-glitch 0.25s infinite;
  box-shadow: 0 0 8px rgba(255, 77, 94, 0.6);
}

@keyframes signal-glitch {
  0% { transform: translate(0, 0) skew(0deg); }
  25% { transform: translate(-2px, 1px) skew(-2deg); }
  50% { transform: translate(2px, -1px) skew(3deg); }
  75% { transform: translate(-1px, -1px) skew(-1deg); }
  100% { transform: translate(1px, 2px) skew(1deg); }
}

.tag.alert-tag {
  background: #2b0c10;
  color: #ff4d5e;
  border-color: #ff4d5e;
}

.tag.alert-tag.active {
  background: #0d2b15;
  color: #00ff88;
  border-color: #00ff88;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  background: #111;
  padding: 0.75rem 1rem;
  border: 1px dashed #333;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.spec-val {
  font-size: 0.95rem;
  font-weight: 700;
}

/* Audio Player */
.audio-controller {
  background: #000;
  border: 1px solid #333;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.4s ease, background 0.4s ease;
}

.audio-controller.locked-controller {
  background: #080808;
  border-color: #222;
}

.player-title {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.custom-player {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.play-btn {
  min-width: 80px;
  padding: 0.5rem 1rem;
}

.play-btn.locked-play {
  background: #151515;
  color: #666;
  border-color: #2a2a2a;
  cursor: not-allowed;
}

.play-btn.locked-play:hover {
  background: #151515;
  color: #666;
  border-color: #ff4d5e;
}

.progress-wrap {
  flex-grow: 1;
  height: 12px;
  background: #222;
  cursor: pointer;
  position: relative;
  border: 1px solid #444;
}

.progress-wrap.locked-wrap {
  cursor: not-allowed;
  opacity: 0.4;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--text-main);
  transition: width 0.1s linear;
}

.time-display {
  font-size: 0.75rem;
  min-width: 90px;
  text-align: right;
  color: var(--text-muted);
}

/* Action Buttons */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 500px) {
  .action-buttons {
    grid-template-columns: 1fr 1fr;
  }
  .action-buttons .primary {
    grid-column: span 2;
  }
}

.brutal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #111;
  color: var(--text-main);
  border: 1px solid #444;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.08em;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

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

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

.brutal-btn.primary:hover {
  background: #cccccc;
}

.brutal-btn.primary.locked-state {
  background: #1a1a1a;
  color: #888;
  border-color: #444;
  cursor: not-allowed;
}

.brutal-btn.primary.locked-state:hover {
  background: #1a1a1a;
  color: #888;
  border-color: #ff4d5e;
}

.brutal-btn.accent-action {
  background: #181818;
  border-color: #555;
}

.brutal-btn.accent-action:hover {
  background: #252525;
  border-color: #888;
  color: #fff;
}

/* Creator Clearance Box */
.clearance-box {
  background: #0a0a0a;
  border: 1px dashed #333;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.clearance-header {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.clearance-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.c-tag {
  background: #141414;
  border: 1px solid #2a2a2a;
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
  color: #00ff88;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.copy-field {
  position: relative;
  display: flex;
  align-items: center;
}

.attr-input {
  width: 100%;
  background: #111;
  border: 1px solid #333;
  color: #aaa;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  outline: none;
}

.copy-toast {
  position: absolute;
  right: 8px;
  background: #00ff88;
  color: #000;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

.copy-toast.show {
  opacity: 1;
}

/* Pipeline Matrix Section */
.pipeline-section {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
}

.pipeline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: #1c1c1c;
  padding: 1px;
}

@media (min-width: 600px) {
  .pipeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.slot-card {
  background: #090909;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: background 0.15s;
}

.slot-card:hover {
  background: #111111;
}

.slot-card.current {
  background: #121212;
  border-left: 3px solid #ff4d5e;
}

.slot-card.locked {
  opacity: 0.65;
}

.slot-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

.slot-num {
  font-weight: 700;
  color: var(--text-muted);
}

.slot-status {
  color: #666;
  font-weight: 700;
}

.slot-status.active-pulse {
  color: #ff4d5e;
}

.slot-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-main);
  word-break: break-all;
}

.slot-meta {
  font-size: 0.65rem;
  color: #777;
  letter-spacing: 0.05em;
}

/* Manifesto Section */
.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.9rem;
  color: #ccc;
}

.license-notice {
  background: #121212;
  border-left: 3px solid var(--text-main);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
}

.license-notice code {
  background: #222;
  padding: 0.1rem 0.4rem;
  color: #fff;
}

/* Footer */
.footer {
  border-top: 1px solid #222;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer a {
  color: var(--text-main);
  text-decoration: underline;
}

.footer-rights {
  color: #555;
  font-size: 0.7rem;
}

.legal-trigger-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.15s;
}

.legal-trigger-btn:hover {
  color: #fff;
}

/* Legal Drawer Modal */
.legal-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.25s ease;
}

.legal-drawer.hidden {
  opacity: 0;
  pointer-events: none;
}

.legal-drawer-content {
  background: #0d0d0d;
  border: 1px solid #444;
  max-width: 780px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.legal-header {
  background: #141414;
  border-bottom: 1px solid #333;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.legal-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.legal-close-btn {
  background: #222;
  border: 1px solid #444;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

.legal-close-btn:hover {
  background: #ff4d5e;
  border-color: #ff4d5e;
}

.legal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: #ccc;
}

.legal-subhead {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  border-bottom: 1px dashed #333;
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
}

.crawler-notice {
  font-size: 0.72rem;
  color: #888;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

/* Obfuscated / Redacted Impressum Card */
.obfuscated-card {
  background: #050505;
  border: 1px solid #2a2a2a;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.obfuscated-card:hover {
  border-color: #555;
}

.obfuscated-text {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.c-tag.alert {
  color: #ff4d5e;
  border-color: #ff4d5e;
  background: #1c0a0c;
  display: inline-block;
  cursor: pointer;
}

.c-tag.success {
  color: #00ff88;
  border-color: #00ff88;
  background: #0a1c10;
  display: inline-block;
}

.revealed-field {
  color: #fff;
  letter-spacing: 0.03em;
}

.privacy-text p {
  margin-bottom: 0.75rem;
  line-height: 1.5;
  font-size: 0.8rem;
  color: #aaa;
}

.privacy-text p strong {
  color: #fff;
}
