:root {
  --bg: #07090d;
  --panel: rgba(13, 18, 26, 0.88);
  --panel-2: rgba(20, 27, 38, 0.92);
  --line: rgba(115, 239, 255, 0.18);
  --line-hot: rgba(255, 76, 48, 0.52);
  --text: #e8f3f6;
  --muted: #81929c;
  --teal: #50f6ff;
  --orange: #ff5b32;
  --purple: #8b5cf6;
  --yellow: #ffd166;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 91, 50, 0.22), transparent 36rem),
    radial-gradient(circle at 80% 10%, rgba(80, 246, 255, 0.16), transparent 34rem),
    linear-gradient(135deg, #07090d 0%, #0b111a 52%, #06070a 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(80, 246, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 246, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(7, 9, 13, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: 0.9rem; }
.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--bg);
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  font-weight: 1000;
  clip-path: polygon(50% 0, 100% 85%, 0 85%);
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; }
.brand p { color: var(--muted); font-size: 0.85rem; margin-top: 0.15rem; }

.stats { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: flex-end; }
.stats span {
  border: 1px solid var(--line);
  background: rgba(80, 246, 255, 0.06);
  color: var(--teal);
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

main { position: relative; z-index: 1; padding: 2rem clamp(1rem, 4vw, 3rem) 4rem; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  align-items: end;
  margin: 1rem 0 2rem;
}

.eyebrow { color: var(--orange); letter-spacing: 0.22em; font-size: 0.78rem; font-weight: 800; }
.hero h2 { font-size: clamp(2rem, 5vw, 4.8rem); line-height: 0.95; max-width: 900px; margin-top: 0.5rem; }
.hero p { color: var(--muted); margin-top: 1rem; max-width: 680px; }

.search-panel {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(80, 246, 255, 0.08), rgba(255, 91, 50, 0.07));
  border-radius: 1rem;
  box-shadow: 0 0 42px rgba(80, 246, 255, 0.08);
}

input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 0.75rem;
  background: rgba(1, 3, 6, 0.72);
  color: var(--text);
  padding: 0.95rem 1rem;
  font-size: 1rem;
}

button, .open-link {
  border: 1px solid var(--line-hot);
  background: rgba(255, 91, 50, 0.14);
  color: var(--text);
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

button:hover, .open-link:hover { box-shadow: 0 0 22px rgba(255, 91, 50, 0.22); }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1rem;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), rgba(8, 11, 16, 0.9));
  border-radius: 1.2rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 2px solid rgba(80, 246, 255, 0.42);
  background: linear-gradient(135deg, rgba(80, 246, 255, 0.08), transparent 35%);
}

.card-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
}

.label { color: var(--teal); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; }
.card h3 { margin-top: 0.2rem; font-size: 1.15rem; }

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020305;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.twitch-frame { width: 100%; height: 100%; border: 0; display: block; }

.play-embed {
  width: 100%;
  height: 100%;
  border: 0;
  cursor: pointer;
  color: var(--teal);
  background:
    radial-gradient(circle at 50% 40%, rgba(80, 246, 255, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 91, 50, 0.12), rgba(80, 246, 255, 0.08));
  display: grid;
  place-content: center;
  gap: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.play-embed:hover {
  color: #fff;
  background:
    radial-gradient(circle at 50% 40%, rgba(80, 246, 255, 0.32), transparent 34%),
    linear-gradient(135deg, rgba(255, 91, 50, 0.20), rgba(80, 246, 255, 0.16));
}

.play-icon {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  border: 1px solid rgba(80, 246, 255, 0.55);
  display: grid;
  place-items: center;
  margin: 0 auto;
  box-shadow: 0 0 24px rgba(80, 246, 255, 0.22);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0;
}

.pill {
  border: 1px solid var(--line);
  color: var(--teal);
  background: rgba(80, 246, 255, 0.07);
  padding: 0.42rem 0.6rem;
  border-radius: 999px;
  font-size: 0.82rem;
}

.username-pill { color: var(--yellow); border-color: rgba(255, 209, 102, 0.26); }

.killfeed { padding: 0.85rem 1rem 1rem; }
.kill-line {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.6rem;
  align-items: start;
  margin-top: 0.45rem;
  padding: 0.55rem;
  border-left: 2px solid var(--orange);
  background: rgba(255, 91, 50, 0.06);
  border-radius: 0.5rem;
  color: #d7e7eb;
}

.line-num { color: var(--orange); font-weight: 900; font-size: 0.8rem; }
.load-wrap { display: flex; justify-content: center; margin-top: 2rem; }
.load-more { min-width: 180px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .search-panel { flex-direction: column; }
}

.event-tag-pill {
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.streamer-event {
  color: #061014;
  border-color: rgba(80, 246, 255, 0.75);
  background: linear-gradient(135deg, var(--teal), #a7fbff);
  box-shadow: 0 0 18px rgba(80, 246, 255, 0.22);
}

.assist-event {
  color: var(--orange);
  border-color: rgba(255, 91, 50, 0.42);
  background: rgba(255, 91, 50, 0.09);
}


.matched-kill-line {
  border-color: rgba(0, 245, 255, 0.92);
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.18), rgba(255, 70, 85, 0.16));
  box-shadow: 0 0 18px rgba(0, 245, 255, 0.38);
}

.matched-kill-line .line-num {
  color: #00f5ff;
}

.how-btn {
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #0b0f14;
  border: 1px solid rgba(0,255,255,0.2);
  padding: 24px;
  border-radius: 12px;
  max-width: 600px;
  color: #ddd;
}

.modal-content h2 {
  margin-bottom: 12px;
}

.modal-content ol {
  padding-left: 18px;
  line-height: 1.6;
}

.close-btn {
  position: absolute;
  right: 20px;
  top: 20px;
  background: none;
  border: none;
  color: #aaa;
  font-size: 18px;
  cursor: pointer;
}
.disclaimer {
  margin-top: 16px;
  font-size: 0.9rem;
  opacity: 0.7;
  line-height: 1.4;
}

.feedback-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.feedback-form label {
  display: grid;
  gap: 6px;
  color: rgba(255,255,255,0.82);
  font-size: 0.9rem;
}

.feedback-form select,
.feedback-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(5, 9, 14, 0.92);
  color: white;
  padding: 10px 12px;
  outline: none;
}

.feedback-form textarea {
  resize: vertical;
}

.submit-feedback {
  justify-self: start;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,245,255,0.35);
  background: rgba(0,245,255,0.12);
  color: white;
  cursor: pointer;
}

.feedback-status {
  font-size: 0.9rem;
  opacity: 0.75;
}