:root {
  --bg: #06080d;
  --bg-soft: #14101c;
  --text: #8c8698;
  --text-bright: #ebe7f6;
  --muted: #6f697b;
  --accent: #c88cff;
  --line: rgba(235, 231, 246, 0.08);
  --line-strong: rgba(235, 231, 246, 0.14);
  --panel: rgba(15, 12, 21, 0.94);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at center, rgba(63, 33, 98, 0.18) 0%, transparent 24%),
    radial-gradient(circle at top, rgba(42, 22, 70, 0.18), transparent 36%),
    linear-gradient(180deg, #080b10 0%, #090c11 100%);
  min-height: 100vh;
  color: var(--text);
  font-family: "Fondamento", cursive;
  overflow-x: hidden;
  transition: color 0.45s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at center, rgba(159, 104, 224, 0.05), transparent 26%);
  mix-blend-mode: screen;
}

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

button {
  font: inherit;
  color: inherit;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 12vh;
}

.frame {
  width: min(980px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-header {
  position: relative;
  z-index: 10;
  pointer-events: none;
  will-change: transform;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-header.minimized {
  transform: translateY(-42px);
}

.hero-banner {
  line-height: 0;
  pointer-events: none;
}

.hero-logo {
  display: block;
  margin: 0 auto;
  width: min(26vw, 320px);
  min-width: 180px;
  height: auto;
  pointer-events: auto;
  filter: brightness(0.68) saturate(0.95);
  transition: filter 0.5s ease, transform 0.35s ease;
}

.hero-logo:hover {
  filter: brightness(1) saturate(1.08);
}

.hero-header.revealed .hero-logo {
  filter: brightness(0.96) saturate(1.03);
}

.main-group {
  width: 100%;
  max-width: 820px;
  position: relative;
  z-index: 20;
  margin-top: -34px;
}

.splash-text {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  color: var(--muted);
  margin-top: 40px;
  font-size: 1.08rem;
  letter-spacing: 0.08em;
  user-select: none;
  transition: color 0.45s ease, opacity 0.3s ease;
}

.splash-text:hover {
  color: var(--text-bright) !important;
  opacity: 1 !important;
}

.hidden {
  display: none !important;
}

#main-content {
  width: 100%;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
  transition-delay: 0.8s;
}

#main-content.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 12px;
}

.menu-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 10px 0 0;
}

.menu-item,
.panel-title,
.splash-text,
.panel-link,
.panel-close {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
}

.menu-item {
  background: none;
  border: none;
  padding: 4px 0;
  color: var(--text);
  font-size: clamp(1.55rem, 2vw, 1.95rem);
  line-height: 1;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: color 0.16s ease, text-shadow 0.16s ease, transform 0.1s ease;
}

.panel-close {
  background: none;
  border: none;
  cursor: pointer;
}

.menu-item:hover,
.panel-title:hover,
.panel-link:hover,
.panel-close:hover {
  color: var(--text-bright);
  text-shadow: 0 0 10px rgba(200, 140, 255, 0.18);
  transform: translateY(-1px);
}

.stats-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 34px;
  opacity: 0.36;
  transition: opacity 0.2s ease;
}

.stats-strip:hover {
  opacity: 0.62;
}

.menu-items.hidden,
.stats-strip.hidden {
  display: none !important;
}

.strip-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.strip-item + .strip-item::before {
  content: "/";
  margin-right: 8px;
  color: rgba(235, 231, 246, 0.18);
}

.strip-item small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.strip-item span {
  display: block;
  color: var(--text-bright);
  font-size: 1rem;
  line-height: 1;
}

.content {
  margin-top: 10px;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.6s ease-out;
}

.content-section.fade-out {
  display: block !important;
  animation: fadeOut 0.3s ease-in forwards;
}

.section-shell {
  width: min(820px, 100%);
  padding: 30px 30px 20px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(31, 20, 45, 0.94), rgba(14, 12, 21, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.section-kicker {
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #ff3b30;
  flex-shrink: 0;
}

.section-icon svg {
  width: 100%;
  height: 100%;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.panel-title {
  color: var(--text-bright);
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 0.95;
}

.panel-link,
.panel-close {
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.panel-link {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
}

.panel-close {
  border: none;
  background: none;
}

.panel-video-grid {
  display: grid;
  gap: 14px;
  counter-reset: upload-rank;
}

.panel-video-grid.is-empty {
  display: block;
}

.video-card,
.video-skeleton {
  position: relative;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.008));
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.video-card.empty {
  display: block;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.video-skeleton {
  min-height: 112px;
}

.video-skeleton::before,
.video-skeleton::after {
  content: "";
  display: block;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  background-size: 220% 100%;
  animation: shimmer 1.35s linear infinite;
}

.video-skeleton::before {
  aspect-ratio: 16 / 9;
}

.video-skeleton::after {
  height: 54px;
  align-self: center;
}

.video-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.2);
}

.video-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
}

.video-card::before {
  counter-increment: upload-rank;
  content: counter(upload-rank, decimal-leading-zero);
  position: absolute;
  top: 16px;
  right: 18px;
  color: rgba(235, 231, 246, 0.16);
  font-size: 0.86rem;
  letter-spacing: 0.2em;
}

.video-title {
  color: var(--text-bright);
  font-size: 1.05rem;
  line-height: 1.15;
}

.video-card:hover .video-title {
  color: #fff;
}

.video-card:hover {
  border-color: rgba(200, 140, 255, 0.16);
  background: linear-gradient(180deg, rgba(200, 140, 255, 0.06), rgba(255, 255, 255, 0.01));
  transform: translateY(-1px);
}

.video-meta {
  margin-top: 8px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.video-card:first-child {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border: 1px solid rgba(200, 140, 255, 0.12);
  background: linear-gradient(180deg, rgba(200, 140, 255, 0.055), rgba(255, 255, 255, 0.012));
  align-items: start;
}

.video-card:first-child::before {
  position: absolute;
  content: "Featured";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0 10px;
  min-height: 28px;
  margin-bottom: 12px;
  color: var(--text-bright);
  border: 1px solid rgba(200, 140, 255, 0.18);
  background: rgba(200, 140, 255, 0.08);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  top: 14px;
  left: 14px;
  z-index: 2;
}

.video-card:first-child .video-thumb {
  grid-column: 1;
  grid-row: 1;
}

.video-card:first-child .video-body {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  max-width: none;
  padding-top: 6px;
}

.video-card:first-child .video-title {
  font-size: clamp(1.35rem, 1.9vw, 1.7rem);
  line-height: 1.05;
}

.video-card:first-child .video-meta {
  font-size: 0.95rem;
}

.video-card:first-child:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 140, 255, 0.2);
  background: linear-gradient(180deg, rgba(200, 140, 255, 0.08), rgba(255, 255, 255, 0.018));
}

.section-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-start;
}

.menu-item::before,
.menu-item::after,
.panel-title::before,
.panel-title::after,
.splash-text::before,
.splash-text::after {
  content: "";
  width: 0.8em;
  height: 0.8em;
  background-image: url("./sideicon.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
  flex-shrink: 0;
  pointer-events: none;
}

.menu-item::before,
.panel-title::before,
.splash-text::before {
  transform: translateX(10px);
}

.menu-item::after,
.panel-title::after,
.splash-text::after {
  transform: translateX(-10px) scaleX(-1);
}

.menu-item:hover::before,
.panel-title:hover::before,
.splash-text:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.menu-item:hover::after,
.panel-title:hover::after,
.splash-text:hover::after {
  opacity: 1;
  transform: translateX(0) scaleX(-1);
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -20% 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 18px 18px 44px;
    align-items: flex-start;
  }

  .main-group {
    margin-top: -18px;
  }

  .hero-logo {
    width: min(52vw, 260px);
    min-width: 0;
  }

  .stats-strip {
    flex-direction: column;
    gap: 10px;
  }

  .strip-item + .strip-item::before {
    display: none;
  }

  .section-shell {
    padding: 20px 18px 14px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-actions {
    flex-wrap: wrap;
  }

  .video-card,
  .video-skeleton {
    grid-template-columns: 1fr;
  }

  .video-card:first-child {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }

  .video-card:first-child::before,
  .video-card:first-child .video-thumb,
  .video-card:first-child .video-body {
    grid-column: auto;
    grid-row: auto;
  }

  .video-card:first-child .video-body {
    max-width: none;
    padding-top: 0;
  }
}
