/* Pandina – clean, dark, readable */
:root {
  --bg: #0f1115;
  --bg-elev: #171a21;
  --bg-card: #1c2029;
  --border: #2a3040;
  --text: #e8eaef;
  --muted: #9aa3b5;
  --accent: #7eb8ff;
  --accent-soft: rgba(126, 184, 255, 0.14);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1100px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, #1a2740 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #1a2233 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  padding: 1.75rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 17, 21, 0.72);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo:hover,
.logo:focus-visible {
  color: var(--accent);
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Main */
main.wrap {
  padding: 2rem 0 3.5rem;
}

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

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.video-card:hover,
.video-card:focus-within {
  transform: translateY(-2px);
  border-color: #3a4660;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.card-hit {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0 0 1rem;
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0c10;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background:
    linear-gradient(135deg, #1a2030, #12151c 60%);
  font-size: 0.9rem;
}

.play-badge {
  position: absolute;
  inset: auto auto 0.75rem 0.75rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(126, 184, 255, 0.35);
  color: var(--accent);
  font-size: 0.85rem;
  backdrop-filter: blur(4px);
}

.card-title {
  margin: 0.9rem 1rem 0.35rem;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.3;
}

.card-desc {
  margin: 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty-state {
  margin: 2rem 0 0;
  padding: 1.25rem 1.4rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--bg-elev);
}

/* Player overlay */
.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 8, 12, 0.78);
  backdrop-filter: blur(8px);
}

.player-overlay[hidden] {
  display: none !important;
}

.player-dialog {
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  padding: 1.25rem 1.25rem 1.4rem;
  position: relative;
}

.player-close {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
}

.player-close:hover,
.player-close:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.player-title {
  margin: 0 2rem 0.35rem 0;
  font-size: 1.25rem;
}

.player-desc {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.player-frame {
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.player-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Mobile */
@media (max-width: 520px) {
  .wrap {
    width: min(100% - 1.25rem, var(--max));
  }

  .site-header {
    padding: 1.2rem 0 1rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  main.wrap {
    padding-top: 1.35rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .player-dialog {
    padding: 1rem 0.9rem 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .video-card {
    transition: none;
  }
}
