@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow+Condensed:wght@400;500;600;700&display=swap');

:root {
  --bg: #090909;
  --bg-soft: #131313;
  --panel: #171717;
  --ink: #f5f5f5;
  --muted: #a6a6a6;
  --accent: #df1d2f;
  --accent-soft: #ff6b6b;
  --line: #2e2e2e;
  --success: #1fbf75;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Barlow Condensed', sans-serif;
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(223, 29, 47, 0.32), transparent 60%),
    radial-gradient(900px 500px at -10% -20%, rgba(255, 255, 255, 0.08), transparent 55%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.brand-title {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.08em;
}

.app-brand {
  color: var(--ink);
  min-width: 0;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(223, 29, 47, 0.28));
}

.card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(6px);
}

.badge {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.04em;
}

.hero-glow {
  position: relative;
}

.hero-glow::after {
  content: "";
  position: absolute;
  inset: auto -20% -30% -20%;
  height: 160px;
  background: radial-gradient(circle at center, rgba(223, 29, 47, 0.35), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.sword-card {
  animation: rise 480ms ease both;
}

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

.metric-tile {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.sword-definition {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-block: 1px solid rgba(255, 255, 255, 0.11);
  padding-block: 1.2rem;
}

@media (min-width: 768px) {
  .sword-definition {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.pitch-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.stat-tile {
  min-width: 0;
  min-height: 4rem;
  border-radius: 8px;
  background: rgba(24, 24, 27, 0.8);
  padding: 0.5rem;
}

.stat-value {
  overflow-wrap: anywhere;
  font-size: 1.125rem;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .pitch-stat-grid {
    grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr));
  }
}

.x-draft-panel {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(223, 29, 47, 0.12), transparent 38%),
    rgba(255, 255, 255, 0.025);
  padding: 1rem;
}

.x-draft-textarea {
  width: 100%;
  min-height: 7rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--ink);
  padding: 0.75rem;
  line-height: 1.35;
}

.x-draft-textarea:focus {
  outline: 2px solid rgba(255, 107, 107, 0.35);
  outline-offset: 2px;
}

.x-pin-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  padding: 0.75rem;
}

.x-pin-input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--ink);
  padding: 0.5rem 0.65rem;
}

.x-pin-input:focus {
  outline: 2px solid rgba(255, 107, 107, 0.35);
  outline-offset: 2px;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill.is-good {
  border-color: rgba(31, 191, 117, 0.55);
  color: #7df3b4;
  background: rgba(31, 191, 117, 0.12);
}

.status-pill.is-bad {
  border-color: rgba(223, 29, 47, 0.65);
  color: #ff9aa3;
  background: rgba(223, 29, 47, 0.12);
}

.ops-date-input {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--ink);
  padding: 0.5rem 0.65rem;
  color-scheme: dark;
}

.ops-date-input:focus {
  outline: 2px solid rgba(255, 107, 107, 0.35);
  outline-offset: 2px;
}

.video-shell {
  border: 1px solid #2b2b2b;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-shell video,
.video-placeholder {
  width: 100%;
  height: 100%;
  display: block;
}

.video-shell video {
  object-fit: contain;
}

.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-link {
  color: var(--ink);
  transition: color 180ms ease;
}

.app-link:hover,
.app-link.active {
  color: var(--accent-soft);
}

button.primary {
  border: 0;
  background: linear-gradient(130deg, var(--accent), #b50b1f);
  color: white;
}

button.primary:hover {
  filter: brightness(1.08);
}

button.primary:disabled {
  cursor: wait;
  opacity: 0.72;
}

button.secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}

button.secondary:hover {
  border-color: #575757;
}

.loading-dots::after {
  content: '...';
  animation: dots 1.2s steps(4, end) infinite;
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}
