:root {
  --bg-main: #070707;
  --bg-surface: #121212;
  --text-strong: #f3f3f3;
  --text-muted: #b4b4b4;
  --accent: #d10f1f;
  --accent-2: #ff3b30;
  --ring: rgba(209, 15, 31, 0.28);
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.58);
  --shadow-card: 0 18px 28px rgba(0, 0, 0, 0.42);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  color: var(--text-strong);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 14% 0%, rgba(209, 15, 31, 0.34) 0%, rgba(209, 15, 31, 0) 34%),
    radial-gradient(circle at 88% 8%, rgba(155, 0, 20, 0.28) 0%, rgba(155, 0, 20, 0) 30%),
    linear-gradient(180deg, #090909 0%, #050505 58%, #000000 100%);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(14, 14, 14, 0.95) 0%, rgba(14, 14, 14, 0.58) 100%);
  border-bottom: 1px solid rgba(209, 15, 31, 0.2);
}

.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.logo-text {
  font-family: 'Bebas Neue', 'Segoe UI', sans-serif;
  font-size: 35px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  color: #f5f5f5;
  text-shadow: 0 8px 18px rgba(209, 15, 31, 0.34);
}

.main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 24px 58px;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 320px;
}

.spinner {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 5px solid rgba(209, 15, 31, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  text-align: center;
  padding: 90px 24px;
  background: var(--bg-surface);
  border: 1px solid rgba(209, 15, 31, 0.22);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.empty-emoji {
  font-size: 62px;
  margin-bottom: 14px;
}

.empty-state h2 {
  font-family: 'Bebas Neue', 'Segoe UI', sans-serif;
  font-size: 34px;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  color: #ffffff;
}

.empty-state p {
  font-size: 16px;
  color: var(--text-muted);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 0;
  padding: 3px;
  border: 0;
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
  animation: cardIn 0.45s ease both;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #ff004c, #00e5ff, #7dff00, #ffd500, #ff004c);
  background-size: 320% 100%;
  animation: rgbFrame 4.5s linear infinite;
  z-index: 0;
}

.card::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--bg-surface);
  z-index: 0;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card:nth-child(2n) { animation-delay: 0.05s; }
.card:nth-child(3n) { animation-delay: 0.1s; }
.card:nth-child(4n) { animation-delay: 0.15s; }

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 30px rgba(255, 18, 73, 0.58), 0 24px 40px rgba(0, 0, 0, 0.58);
}

.card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--ring), 0 0 22px rgba(255, 18, 73, 0.45), var(--shadow-card);
}

@keyframes rgbFrame {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 320% 50%;
  }
}

.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0;
  background: #161616;
}

.card-thumb::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(44, 24, 10, 0.34) 100%);
}

.card-thumb img,
.card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.card:hover .card-thumb img,
.card:hover .card-thumb video {
  transform: scale(1.08);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s ease;
  z-index: 2;
}

.card:hover .play-overlay {
  opacity: 1;
}

.play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 21px;
  padding-left: 3px;
  box-shadow: 0 10px 25px rgba(215, 59, 34, 0.4);
}

.card-info {
  padding: 14px 14px 16px;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(24, 24, 24, 0.75) 0%, rgba(14, 14, 14, 0.95) 100%);
}

.card-title {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #f7f7f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.modal-box {
  position: relative;
  width: min(980px, 100%);
  z-index: 1;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(209, 15, 31, 0.3);
  background: #0f0f0f;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(28, 28, 28, 0.9);
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: var(--accent);
}

#modal-video {
  width: 100%;
  max-height: 68vh;
  display: block;
  background: #120e0b;
}

.modal-meta {
  padding: 16px 20px 20px;
}

.modal-meta h2 {
  margin-bottom: 6px;
  font-size: 20px;
  font-family: 'Bebas Neue', 'Segoe UI', sans-serif;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.modal-meta p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 700px) {
  .logo-text {
    font-size: 28px;
  }

  .main {
    padding: 24px 14px 40px;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .empty-state {
    padding: 60px 16px;
  }

  .empty-state h2 {
    font-size: 27px;
  }

  .modal {
    padding: 12px;
  }
}
