* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: #e6edff;
  background:
    radial-gradient(circle at 14% 20%, #3b82f660 0, transparent 34%),
    radial-gradient(circle at 86% 14%, #14b8a655 0, transparent 30%),
    linear-gradient(160deg, #0a1020 0%, #101933 48%, #0b1224 100%);
}
.app {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px;
}
.topbar {
  margin-bottom: 18px;
}
h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.01em;
}
.subtitle {
  margin: 6px 0 10px;
  color: #a8b7dc;
}
.status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 700;
  border: 1px solid #334155;
  background: #0f172ad1;
  color: #dbe8ff;
}
.status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
}
.status[data-state="waiting"]::before { background: #f59e0b; }
.status[data-state="matched"]::before { background: #22c55e; }
.status[data-state="error"]::before { background: #ef4444; }

.videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.video-card {
  position: relative;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid #344256;
  background: linear-gradient(180deg, #101a30f2 0%, #0b1327f2 100%);
  box-shadow: 0 20px 36px #02081788;
  min-height: 392px;
}
.video-card h2 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: #c9d5f2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
video {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  background: #020617;
  border: 1px solid #1e293b;
  object-fit: cover;
}
#localVideo {
  transform: scaleX(-1);
}
.local-fx {
  position: absolute;
  left: 13px;
  right: 13px;
  top: 41px;
  height: 320px;
  border-radius: 12px;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.local-fx::before,
.local-fx::after {
  content: "";
  position: absolute;
  opacity: 0;
}
.local-fx[data-fx="comic"] {
  background:
    radial-gradient(circle at 22% 22%, #ffffff22 0 15px, transparent 16px),
    radial-gradient(circle at 75% 60%, #ffffff22 0 11px, transparent 12px),
    linear-gradient(145deg, #ff2d5544 0%, #ffde5944 48%, #4d9fff44 100%);
}
.local-fx[data-fx="comic"]::before {
  opacity: 1;
  content: "POW!";
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  right: 14px;
  top: 12px;
  text-shadow: 0 2px 0 #020617, 0 0 12px #000;
}
.local-fx[data-fx="doggo"]::before,
.local-fx[data-fx="doggo"]::after {
  opacity: 1;
  width: 88px;
  height: 112px;
  background: #7f4b2aee;
  top: -10px;
}
.local-fx[data-fx="doggo"]::before {
  left: 18%;
  border-radius: 80% 20% 70% 30%;
  transform: rotate(-18deg);
}
.local-fx[data-fx="doggo"]::after {
  right: 18%;
  border-radius: 20% 80% 30% 70%;
  transform: rotate(18deg);
}
.local-fx[data-fx="doggo"] .fx-nose {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 84px;
  height: 56px;
  transform: translate(-50%, -50%);
  border-radius: 48% 48% 60% 60%;
  background: #000000cc;
  box-shadow: 0 0 0 5px #623f2aca;
}
.local-fx[data-fx="party"] {
  background: linear-gradient(180deg, #0000 0, #0000 65%, #7c3aed55 100%);
}
.local-fx[data-fx="party"] .fx-burst,
.local-fx[data-fx="hearts"] .fx-burst {
  position: absolute;
  bottom: -28px;
  font-size: 1.35rem;
  animation: fxRise linear infinite;
  text-shadow: 0 0 10px #0008;
}
.local-fx[data-fx="party"] .fx-burst {
  color: #fde047;
}
.local-fx[data-fx="hearts"] .fx-burst {
  color: #fb7185;
}
.local-fx[data-fx="pixel"] {
  image-rendering: pixelated;
  background:
    linear-gradient(0deg, #00000022 1px, transparent 1px) 0 0/10px 10px,
    linear-gradient(90deg, #00000022 1px, transparent 1px) 0 0/10px 10px;
}
@keyframes fxRise {
  from { transform: translateY(0) scale(0.9); opacity: 0; }
  10% { opacity: 1; }
  to { transform: translateY(-360px) scale(1.25); opacity: 0; }
}
.video-tools {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid #334155;
  background: #0b1224bf;
  backdrop-filter: blur(4px);
  width: fit-content;
  max-width: calc(100% - 32px);
}
.video-tools .btn {
  padding: 0;
  font-size: 0.83rem;
  border-radius: 999px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #334155;
  box-shadow: inset 0 0 0 1px #ffffff0d;
}
.icon-btn .ico {
  font-size: 1.08rem;
  line-height: 1;
}
.icon-btn.is-off {
  filter: grayscale(0.4);
  background: #1f2937;
  border-color: #475569;
  opacity: 0.86;
}
.icon-btn.is-active {
  background: #11314d;
  border-color: #38bdf8;
}
.tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 5px 8px;
  border-radius: 999px;
  background: #22c55e;
  color: #072c17;
}
.tag.alt {
  background: #38bdf8;
  color: #04263b;
}
.actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.support-row {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-support {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #101b31;
  color: #cfe0ff;
  border: 1px solid #31415e;
  box-shadow: 0 10px 22px #02081766;
}
.btn-support:hover {
  background: #13223d;
}
.ads-card {
  margin-top: 16px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #334155;
  background: #0f172acc;
}
.ads-card h2 {
  margin: 0 0 8px;
  font-size: .84rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #a9bce4;
}
.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .14s ease, opacity .14s ease, box-shadow .14s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #072f1a;
  box-shadow: 0 12px 24px #16653466;
}
.btn-ghost {
  background: #172036;
  color: #d4e3ff;
  border: 1px solid #334155;
}
.consent-area {
  margin-top: 10px;
}
.report-modal {
  position: fixed;
  inset: 0;
  background: #020617aa;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 12px;
}
.report-modal.open { display: flex; }
.report-card {
  width: min(520px, 100%);
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 24px 38px #02081799;
}
.report-card h3 {
  margin: 0 0 10px;
  color: #dbe7ff;
}
.report-card label {
  display: block;
  margin: 10px 0 6px;
  color: #9fb5e3;
  font-size: .9rem;
}
.report-card select,
.report-card textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0b1224;
  color: #dbe8ff;
  padding: 10px;
  font-family: inherit;
}
.report-card textarea {
  resize: vertical;
  min-height: 100px;
}
.report-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.ban-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: #020617cc;
}
.ban-overlay.open {
  display: flex;
}
.ban-card {
  width: min(560px, 100%);
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #7f1d1d;
  background: #1f1124;
  color: #fecdd3;
  box-shadow: 0 24px 38px #02081799;
}
.ban-card h3 {
  margin: 0 0 8px;
  color: #ffe4e6;
}
.ban-card p {
  margin: 8px 0;
}
@media (max-width: 900px) {
  .videos { grid-template-columns: 1fr; }
  .video-card { min-height: 312px; }
  video { height: 240px; }
  .local-fx {
    top: 41px;
    height: 240px;
  }
  .video-tools {
    left: 10px;
    right: 10px;
    bottom: 10px;
    gap: 6px;
    padding: 5px;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }
  .icon-btn .ico {
    font-size: 0.98rem;
  }
  .support-row .btn { flex: 1; min-width: 0; }
}
