:root {
  --bg: #0b1020;
  --panel: #121934;
  --panel-2: #1a2345;
  --text: #edf1ff;
  --muted: #b6c0dd;
  --border: rgba(255, 255, 255, 0.08);
  --brand: #5b8cff;
  --brand-2: #8ab4ff;
  --danger: #ff6b6b;
  --success: #2ecc71;
  --warning: #ffca54;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1a2454 0%, var(--bg) 40%);
  color: var(--text);
}

a {
  color: var(--brand-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(11, 16, 32, 0.82);
  border-bottom: 1px solid var(--border);
}

.nav-shell,
.nav-links,
.nav-auth,
.hero-actions,
.card-actions,
.clip-meta-row,
.table-actions,
.section-headline,
.admin-headline {
  display: flex;
  align-items: center;
}

.nav-shell {
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
}

.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.nav-links,
.nav-auth,
.hero-actions,
.card-actions,
.table-actions {
  gap: 12px;
}

.nav-links {
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
}

.main-shell {
  padding: 32px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 42px;
}

.hero h1,
.section-headline h1,
.form-card h1,
.detail-layout h1 {
  margin: 0 0 12px;
  line-height: 1.1;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.hero p,
.clip-card p,
.detail-description,
.form-card label span,
.form-card small {
  color: var(--muted);
}

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.admin-stats {
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
}

.stat-card strong {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.stat-card span,
.eyebrow,
.pill,
.status-positive,
.status-warning {
  font-size: 0.9rem;
}

.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-2);
}

.button {
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #061028;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 14px;
  text-decoration: none;
}

.button:hover {
  text-decoration: none;
  filter: brightness(1.05);
}

.button-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.button-danger {
  background: rgba(255, 107, 107, 0.14);
  color: #ffd0d0;
  border: 1px solid rgba(255, 107, 107, 0.35);
}

.button-small {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.clip-card,
.empty-state,
.form-card,
.side-panel,
.table-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.clip-video,
.detail-video,
.clip-poster {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #060a16;
}

.clip-video,
.clip-poster {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.detail-video {
  min-height: 320px;
  max-height: 560px;
  object-fit: contain;
}

.clip-placeholder {
  min-height: 220px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px dashed var(--border);
  color: var(--muted);
  background: rgba(255,255,255,0.025);
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(91, 140, 255, 0.18);
  border: 1px solid rgba(91, 140, 255, 0.3);
}

.pill.neutral,
.pill-success {
  background: rgba(255,255,255,0.06);
  border-color: var(--border);
}

.pill-success {
  background: rgba(46, 204, 113, 0.16);
  border-color: rgba(46, 204, 113, 0.3);
}

.status-positive {
  color: #b9f9d3;
}

.status-warning {
  color: #ffe3a3;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.flash {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.flash-success {
  background: rgba(46, 204, 113, 0.12);
}

.flash-danger {
  background: rgba(255, 107, 107, 0.12);
}

.flash-warning {
  background: rgba(255, 202, 84, 0.12);
}

.flash-info {
  background: rgba(91, 140, 255, 0.12);
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 210px);
}

.admin-form-shell {
  min-height: auto;
}

.form-card {
  width: min(540px, 100%);
}

.wide-form {
  width: min(760px, 100%);
}

.form-card label {
  display: grid;
  gap: 8px;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  font: inherit;
}

input::file-selector-button {
  margin-right: 12px;
}

.form-grid,
.detail-layout {
  display: grid;
  gap: 18px;
}

.form-grid {
  grid-template-columns: repeat(2, 1fr);
}

.detail-layout {
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
}

.side-panel {
  align-self: start;
  background: rgba(255,255,255,0.02);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid var(--border);
}

.section-headline,
.admin-headline {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-headline p {
  margin: 0;
  max-width: 760px;
}

.browser-section-gap {
  margin-top: 28px;
}

.browser-filter-row,
.browser-reaction-row,
.clip-actions-stack,
.browser-score-grid,
.browser-reaction-form-grid,
.browser-list,
.wrap-row {
  display: flex;
  gap: 12px;
}

.browser-filter-row,
.browser-reaction-row,
.wrap-row {
  flex-wrap: wrap;
}

.browser-filter-row {
  margin: 18px 0 6px;
}

.browser-filter-row .pill.active,
.pill.active {
  background: rgba(91, 140, 255, 0.28);
  border-color: rgba(138, 180, 255, 0.42);
  color: var(--text);
}

.compact-cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.clip-actions-stack,
.browser-score-grid,
.browser-reaction-form-grid,
.browser-list {
  flex-direction: column;
}

.full-width {
  width: 100%;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-inline input {
  width: auto;
}

.browser-score-grid {
  margin: 18px 0;
}

.browser-reaction-form-grid {
  margin: 4px 0 0;
}

.browser-profile-head,
.member-browser-card {
  display: flex;
  gap: 18px;
  align-items: center;
}

.member-browser-card {
  flex-direction: column;
  align-items: flex-start;
}

.browser-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.browser-avatar-large {
  width: 92px;
  height: 92px;
}

.browser-feature-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.taste-table {
  display: grid;
  gap: 14px;
}

.taste-table-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 12px;
  align-items: center;
}

.taste-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.taste-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.browser-list-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.browser-list-item:hover {
  text-decoration: none;
}

.single-line-stats {
  grid-template-columns: repeat(2, 1fr);
}

.podium-highlight {
  position: relative;
}

.podium-first-browser {
  border-color: rgba(255, 202, 84, 0.48);
  box-shadow: 0 24px 48px rgba(255, 202, 84, 0.12);
}

.duel-browser-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.duel-browser-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.site-footer {
  padding: 0 0 28px;
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

@media (max-width: 880px) {
  .hero,
  .detail-layout,
  .duel-browser-grid {
    grid-template-columns: 1fr;
  }

  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-links,
  .nav-auth {
    width: 100%;
    justify-content: space-between;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 20px, 1160px);
  }

  .section-headline,
  .admin-headline,
  .nav-links,
  .nav-auth,
  .hero-actions,
  .card-actions,
  .table-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }

  .browser-profile-head,
  .member-browser-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-shell {
    flex-direction: column;
  }
}
