/* Stylesheet for SRCDVD (speedrun.com Deleted Video Detector) */

:root {
  --bg-primary: #07080b;
  --bg-secondary: rgba(18, 20, 28, 0.75);
  --bg-card: rgba(20, 23, 32, 0.85);
  --bg-card-hover: rgba(28, 33, 46, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #cfa736;
  --sand: #cfa736;
  --sand-bright: #f5d47a;
  --sand-dim: #8b6e22;
  --sand-glow: rgba(207, 167, 54, 0.2);
  --parchment: #e9e4d3;
  --text-muted: #9da1b5;
  --text-dim: #65697d;

  --font-display: "Cinzel", "Georgia", serif;
  --font-body: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  min-height: 100vh;
  background-color: #06070a;
  background-image:
    linear-gradient(to bottom, rgba(6, 7, 10, 0.8) 0%, rgba(6, 7, 10, 0.92) 100%),
    url("../static/images/background.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  color: var(--parchment);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding: 0 1.25rem 4rem;
  position: relative;
  overflow-x: hidden;
}

.ambient-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-dot-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(207, 167, 54, 0.16) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 38px 38px, 19px 19px;
  background-position: 0 0, 19px 19px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, black 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, black 20%, transparent 85%);
  opacity: 0.75;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.ambient-orb-1 {
  width: 450px;
  height: 450px;
  top: -80px;
  right: 15%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.1) 0%, transparent 70%);
}

.ambient-orb-2 {
  width: 500px;
  height: 500px;
  bottom: 10%;
  left: 10%;
  background: radial-gradient(circle, rgba(207, 167, 54, 0.1) 0%, transparent 70%);
}

.page-container {
  max-width: 1040px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Nav */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0 2.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
}

.back-link svg {
  width: 18px;
  height: 18px;
}

.back-link:hover {
  color: var(--sand-bright);
  transform: translateX(-3px);
}

.nav-actions .btn-github {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--parchment);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-actions .btn-github svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.nav-actions .btn-github:hover {
  background: rgba(207, 167, 54, 0.15);
  border-color: var(--sand);
  color: var(--sand-bright);
}

/* Hero */
.project-hero {
  text-align: center;
  padding: 1rem 0 3.5rem;
}

.hero-tag-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 0.4rem;
}

.highlight {
  color: var(--sand-bright);
  text-shadow: 0 0 25px var(--sand-glow);
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}

.hero-tagline strong {
  color: var(--sand-bright);
}

.hero-summary {
  max-width: 780px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-summary strong {
  color: var(--parchment);
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #cfa736 0%, #aa8422 100%);
  color: #08080a;
  border: none;
  box-shadow: 0 4px 18px var(--sand-glow);
}

.btn-primary svg {
  width: 18px;
  height: 18px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f5d47a 0%, #cfa736 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(207, 167, 54, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--parchment);
  border: 1px solid var(--border-subtle);
}

.btn-secondary svg {
  width: 18px;
  height: 18px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-2px);
}

/* Sections */
.section {
  margin-bottom: 4rem;
}

.section-header {
  margin-bottom: 1.8rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sand);
  margin-bottom: 0.35rem;
}

.section-title {
  font-family: var(--font-body);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
}

/* Problem Grid */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem;
}

.p-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.problem-card h4 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.problem-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Pipeline */
.pipeline-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}

.pipeline-step {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  position: relative;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(207, 167, 54, 0.15);
  border: 1px solid var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--sand-bright);
  margin-bottom: 1rem;
}

.pipeline-step h4 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.pipeline-step p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.pipeline-step code {
  font-family: var(--font-mono);
  color: var(--sand-bright);
}

/* Inspector */
.inspector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.inspector-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.input-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--parchment);
  margin-bottom: 0.4rem;
}

.url-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--parchment);
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
}

.url-textarea:focus {
  border-color: var(--sand);
}

.inspector-actions {
  display: flex;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
  flex-wrap: wrap;
}

.results-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  animation: fadeIn 0.25s ease;
}

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

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

.results-header h4 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.results-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--sand-bright);
  background: rgba(207, 167, 54, 0.15);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
}

.table-wrap {
  overflow-x: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.results-table th, .results-table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
}

.results-table th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--sand);
  background: rgba(255, 255, 255, 0.03);
}

.platform-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.platform-tag.youtube {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.platform-tag.twitch {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.platform-tag.unknown {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.url-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}

.endpoint-code {
  font-size: 0.8rem;
  color: var(--sand-bright);
}

/* Setup Tabs */
.setup-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.4rem;
}

.setup-tab-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.8rem;
}

.platform-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.8rem;
}

.yt-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.twitch-badge {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.setup-tab-card h4 {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
}

.setup-steps {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.setup-steps a {
  color: var(--sand);
  text-decoration: underline;
}

.setup-steps strong {
  color: var(--parchment);
}

.setup-steps code {
  font-family: var(--font-mono);
  color: var(--sand-bright);
}

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

.file-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem;
}

.file-card.highlight-card {
  border-color: rgba(207, 167, 54, 0.35);
  box-shadow: 0 0 15px var(--sand-glow);
}

.file-name code {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--sand-bright);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.8rem;
}

.file-card h4 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.file-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Footer */
.project-footer {
  text-align: center;
  padding-top: 3rem;
  border-top: 1px solid var(--border-subtle);
}

.project-footer a {
  color: var(--sand);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.project-footer a:hover {
  text-decoration: underline;
  color: var(--sand-bright);
}

.footer-note {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.6rem;
}
