:root {
  --bg: #0e1116;
  --panel: #161a22;
  --text: #e6e8ec;
  --muted: #a7b0c0;
  --brand: #6aa3ff;
  --brand-2: #7cf1d1;
  --line: #2a3140;
  --line-active: #6aa3ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(
      1200px 600px at 15% 10%,
      rgba(106, 163, 255, 0.16),
      transparent 65%
    ),
    radial-gradient(
      900px 500px at 85% 15%,
      rgba(124, 241, 209, 0.14),
      transparent 60%
    ),
    radial-gradient(
      1000px 520px at 75% 80%,
      rgba(106, 163, 255, 0.1),
      transparent 60%
    ),
    radial-gradient(
      1100px 560px at 30% 70%,
      rgba(124, 241, 209, 0.09),
      transparent 60%
    ),
    radial-gradient(
      800px 420px at 10% 85%,
      rgba(106, 163, 255, 0.08),
      transparent 60%
    ),
    linear-gradient(180deg, #0d1015 0%, #10141b 100%);
}

/* Global floating gradient orbs for subtle motion */
.global-ornaments {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
      700px 340px at 12% 18%,
      rgba(106, 163, 255, 0.16),
      transparent 60%
    ),
    radial-gradient(
      820px 400px at 88% 22%,
      rgba(124, 241, 209, 0.14),
      transparent 60%
    ),
    radial-gradient(
      720px 360px at 22% 78%,
      rgba(106, 163, 255, 0.12),
      transparent 60%
    ),
    radial-gradient(
      900px 420px at 70% 85%,
      rgba(124, 241, 209, 0.08),
      transparent 60%
    );
  animation: drift 26s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    filter: hue-rotate(0deg);
  }
  100% {
    transform: translate3d(0, -2%, 0) scale(1.03);
    filter: hue-rotate(10deg);
  }
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top navigation */

.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 50px 0;
}

.title {
  font-size: 56px;
  line-height: 1.1;
  margin: 0 0 12px;
}

.subtitle {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 24px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  color: #0b1020;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 24px rgba(106, 163, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn.small {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 8px;
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid #2a3346;
  box-shadow: none;
}
.btn.ghost:hover {
  border-color: #34425b;
  box-shadow: 0 0 0 4px rgba(106, 163, 255, 0.12) inset;
}
.btn.primary {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: light) {
  .btn.primary {
    color: #02060c;
  }
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(106, 163, 255, 0.45);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.video-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

#bg-video {
  position: absolute;
  min-width: 100%;
  min-height: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: brightness(0.5) saturate(1);
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      1200px 600px at 40% 30%,
      rgba(106, 163, 255, 0.12),
      transparent 60%
    ),
    radial-gradient(
      1200px 600px at 60% 70%,
      rgba(124, 241, 209, 0.1),
      transparent 60%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.55));
}

/* Hero grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
}
.hero-grid > * {
  height: 100%;
}

.play-card {
  position: relative;
  background: rgba(16, 20, 27, 0.7);
  border: 1px solid #1e2430;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  height: 100%;
}

.play-card-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 16px;
}

.play-card-video video {
  position: absolute;
  min-width: 100%;
  min-height: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: brightness(0.8) saturate(1.5);
}

.play-card-dim {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      800px 400px at 30% 20%,
      rgba(106, 163, 255, 0.18),
      transparent 55%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.6));
}

.play-card-inner {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}

/* Tighten text spacing inside play card */
.play-card-inner h2 {
  margin: 0 0 2px 0;
}
.play-card-inner p {
  margin: 10px 0 20px 0;
}
.play-card-inner .btn {
  margin-top: 6px;
}

.btn-lg {
  padding: 18px 28px;
  font-size: 18px;
  border-radius: 14px;
}

.leaderboard {
  margin-top: 0;
  background: rgba(16, 20, 27, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid #1e2430;
  border-radius: 16px;
  padding: 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.leaderboard .board {
  flex: 1;
}

.leaderboard h2 {
  margin: 0 0 12px;
}

.board-actions {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}

.board {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 8px 16px;
}

.board .row {
  display: contents;
}

.cell {
  padding: 10px 12px;
  background: #121721;
  border-radius: 10px;
  border: 1px solid #1a2130;
}

.cell.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rank.badge-1 {
  color: #ffd36a;
}
.rank.badge-2 {
  color: #c0d9ff;
}
.rank.badge-3 {
  color: #ffb199;
}

.sk {
  height: 38px;
  background: linear-gradient(90deg, #111623, #141a28, #111623);
  background-size: 300% 100%;
  animation: sk 1.2s ease-in-out infinite;
}
@keyframes sk {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.loading,
.error {
  color: var(--muted);
}

/* About */
.section-about .about-text {
  max-width: 820px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

/* (removed) Taubyte section adjustments */

.about-points {
  display: flex;
  flex-direction: column;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 14px 0 0;
  padding: 0 0 0 18px;
}
.about-points1 {
  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 14px 0 0;
  padding: 0 0 0 18px;
}

.player-wrapper {
  margin-top: 24px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #1f2836;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

.plyr--full-ui.plyr--video .plyr__control--overlaid {
  background: rgba(0, 0, 0, 0.65);
}

/* (removed) Links section styles */

/* Footer */
.footer {
  padding: 24px 0;
  border-top: 1px solid #1a2130;
  background: rgba(16, 20, 27, 0.65);
}

/* Floating action button */
.fab-container {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid #2a3346;
  background: linear-gradient(180deg, #151c28, #0f1420);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  font-size: 20px;
}
.fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}
.fab-menu {
  display: none;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.fab-menu.show {
  display: flex;
}
.fab-link {
  color: var(--text);
  text-decoration: none;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid #2a3346;
  background: rgba(16, 23, 33, 0.6);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.12s ease, border-color 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease;
  font-size: 1.2rem;
}
.fab-link:hover {
  transform: translateY(-1px);
  border-color: #4b7bd1;
  box-shadow: 0 10px 24px rgba(106, 163, 255, 0.22);
  background: rgba(23, 31, 45, 0.7);
}

@media (max-width: 920px) {
  .fab-container {
    right: 16px;
    bottom: 16px;
  }
}

/* (removed) Right-side ladder */

@media (prefers-reduced-motion: reduce) {
  .global-ornaments {
    animation: none;
  }
}

/* (removed) Taubyte CTA section */

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 20;
}
.modal.show {
  display: block;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
}
.modal-dialog {
  position: relative;
  margin: 8vh auto;
  max-width: 720px;
  background: #0f1420;
  border: 1px solid #1a2130;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #1a2130;
}
.modal-body {
  padding: 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}
.modal-close {
  background: transparent;
  color: var(--text);
  border: 1px solid #26324a;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
.board-modal {
  grid-template-columns: 1fr 120px;
}

/* Responsive */
@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-grid > * {
    height: auto;
  }
}

/* Responsive tweaks */
@media (max-width: 920px) {
  .title {
    font-size: 36px;
  }
}

/* Offset first section for fixed nav so content isn't overlapped */
.section:first-of-type {
  padding-top: 96px;
}

/* Play button micro-interactions */
.btn.primary {
  will-change: transform;
}
.btn.primary:hover {
  transform: translateY(-2px) scale(1.02);
}
.btn.primary:active {
  transform: translateY(0) scale(0.99);
}
.ripple-container {
  position: relative;
  overflow: hidden;
}
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}
@keyframes ripple {
  to {
    transform: scale(8);
    opacity: 0;
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px) scale(0.995);
  filter: saturate(0.9);
  transition: opacity 0.5s ease, transform 0.6s ease, filter 0.6s ease;
}
.reveal.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: saturate(1);
}

/* Gradient borders and separators */
.with-gradient-border {
  position: relative;
  border-radius: 16px;
}
.with-gradient-border::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.section:not(:last-of-type)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(106, 163, 255, 0.25),
    rgba(124, 241, 209, 0.2),
    transparent
  );
  opacity: 0.6;
}

/* Leaderboard rows hover + badges */
.board .cell {
  transition: border-color 0.2s ease, background 0.2s ease;
}
.board .cell:hover {
  border-color: #26324a;
  background: #171d2a;
}
.rank.badge-1 {
  text-shadow: 0 0 10px rgba(255, 211, 106, 0.35);
}
.rank.badge-2 {
  text-shadow: 0 0 10px rgba(192, 217, 255, 0.35);
}
.rank.badge-3 {
  text-shadow: 0 0 10px rgba(255, 177, 153, 0.35);
}

/* Video frame accent */
.player-wrapper {
  position: relative;
}
.player-wrapper::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(106, 163, 255, 0.5),
    rgba(124, 241, 209, 0.4)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* FAB glow + stagger */
.fab {
  animation: fabGlow 6s ease-in-out infinite;
}
@keyframes fabGlow {
  0% {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 rgba(106, 163, 255, 0);
  }
  50% {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45),
      0 0 24px rgba(106, 163, 255, 0.15);
  }
  100% {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 0 rgba(106, 163, 255, 0);
  }
}
.fab-link {
  opacity: 0;
  transform: translateY(6px) scale(0.98);
}
.fab-menu.show .fab-link {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: transform 0.2s ease, opacity 0.25s ease;
}
.fab-menu.show .fab-link:nth-child(1) {
  transition-delay: 0.04s;
}
.fab-menu.show .fab-link:nth-child(2) {
  transition-delay: 0.08s;
}
.fab-menu.show .fab-link:nth-child(3) {
  transition-delay: 0.12s;
}
.fab-menu.show .fab-link:nth-child(4) {
  transition-delay: 0.16s;
}

.about-panel {
  background: rgba(16, 20, 27, 0.6);
  border: 1px solid #1e2430;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 8px 0 14px;
}

.code-links {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  justify-content: space-around;
  gap: 8px;
}

.code-links a {
  color: #aeb8cc; /* softer gray-blue */
  text-decoration: none; /* cleaner look */
  font-weight: 500;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.code-links a:hover {
  color: #ffffff; /* brighten on hover */
  text-shadow: 0 0 6px #6aa3ff; /* subtle glow */
}

.tech-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 8px;
}
.tech-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #121721;
  border: 1px solid #1e2430;
  border-radius: 10px;
  padding: 10px 12px;
}
.tech-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
}
