/* =========================================================
   LIVE YOUTUBE STUDIO - OFFICIAL PLAYABLES SHOWCASE
   Exact Design Match to https://www.youtube.com/playablesbuilder/
   Dark Modern YouTube Design System with Red Accents
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&family=Outfit:wght@600;700;800;900&display=swap');

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

:root {
  --color-red: #dc2626;
  --color-red-hover: #b91c1c;
  --color-red-dark: #991b1b;
  --color-neutral-950: #0a0a0a;
  --color-neutral-900: #171717;
  --color-neutral-800: #262626;
  --color-neutral-700: #404040;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  --max-width: 1280px;

  --font-sans: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Outfit', 'Roboto', sans-serif;
  --font-display: 'Outfit', 'Roboto', sans-serif;
}

html {
  scroll-behavior: smooth;
  background-color: #000;
  color: #fff;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: #000;
  color: #fff;
  overflow-x: hidden;
  line-height: 1.5;
  font-family: var(--font-sans);
}

::selection {
  background-color: var(--color-red);
  color: #fff;
}

h1, h2, h3 {
  font-family: var(--font-heading);
}

.landing-page-header,
.hero-title,
.section-title,
.sub-header {
  font-family: var(--font-display);
}

.highlight-red {
  color: var(--color-red);
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Button Base Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-red);
  color: #fff;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
}

.btn-primary:hover {
  background-color: var(--color-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.6);
}

.btn-outline {
  background-color: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  padding: 12px 28px;
  font-size: 0.95rem;
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--color-neutral-800);
  color: #fff;
  border-color: var(--color-neutral-700);
}

.btn-secondary:hover {
  background-color: var(--color-neutral-700);
}

/* Sticky Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.header.scrolled {
  background-color: rgba(0, 0, 0, 0.92);
  padding: 10px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.logo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.yt-play-icon {
  width: 38px;
  height: 26px;
  background-color: var(--color-red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.6);
}

.yt-play-icon svg {
  fill: #fff;
  width: 14px;
  height: 14px;
  margin-left: 2px;
}

.logo-text-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
}

.logo-text-sub {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-red);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--color-gray-300);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

/* Hero Section */
.hero-section {
  padding-top: 140px;
  padding-bottom: 80px;
  padding-left: 24px;
  padding-right: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
}

@media (min-width: 1024px) {
  .hero-container {
    flex-direction: row;
    align-items: center;
  }
}

.hero-content {
  flex: 1.1;
  z-index: 10;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 6px 16px;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #f87171;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 24px;
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-red);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.hero-title {
  font-size: 3.2rem;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4.8rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 5.6rem;
  }
}

.hero-subtitle {
  color: var(--color-gray-300);
  font-size: 1.15rem;
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Hero Visual Card with Red Accent Layer */
.hero-visual {
  flex: 0.9;
  width: 100%;
  max-width: 480px;
}

.hero-visual-card {
  position: relative;
  aspect-ratio: 9 / 14;
  width: 100%;
}

.hero-card-accent {
  position: absolute;
  top: 24px;
  left: 20px;
  right: -16px;
  bottom: -16px;
  background: linear-gradient(135deg, var(--color-red) 0%, #7f1d1d 100%);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(220, 38, 38, 0.4);
}

.hero-card-inner {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #181824 0%, #0a0a0f 100%);
  border-radius: 32px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.preview-header-bar {
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: rgba(220, 38, 38, 0.85);
  padding: 4px 10px;
  border-radius: 20px;
}

.preview-device-screen {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
}

.preview-device-screen iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Marquee Ribbon Banner */
.marquee-banner {
  background-color: var(--color-red);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--color-red-dark);
  border-bottom: 1px solid var(--color-red-dark);
  box-shadow: 0 0 40px rgba(220, 38, 38, 0.35);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 45s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 48px;
  padding-right: 48px;
}

.marquee-item {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.75rem;
  text-transform: uppercase;
  font-style: italic;
  letter-spacing: -0.03em;
  color: #fff;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Games Section */
.games-section {
  padding: 96px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px auto;
}

.section-title {
  font-size: 2.8rem;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 4.2rem;
  }
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--color-gray-300);
  line-height: 1.6;
}

/* 9:16 Game Showcase Grid */
.games-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 900px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.game-showcase-card {
  background: var(--color-neutral-900);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.game-showcase-card:hover {
  transform: translateY(-8px);
  border-color: rgba(220, 38, 38, 0.6);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(220, 38, 38, 0.2);
}

.card-stage-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #09090b;
}

.card-stage-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.game-showcase-card:hover .card-stage-preview img {
  transform: scale(1.05);
}

.card-badge-floating {
  position: absolute;
  top: 18px;
  left: 18px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-game-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: #fff;
}

.card-game-desc {
  color: var(--color-gray-400);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 24px;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.tag-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-gray-300);
}

.card-actions-row {
  display: flex;
  gap: 12px;
}

.card-actions-row .btn {
  flex: 1;
}

/* Technical Architecture Grid */
.tech-section {
  padding: 96px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.methods-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 768px) {
  .methods-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.method-card {
  background-color: rgba(23, 23, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 32px 28px;
  transition: all 0.3s ease;
}

.method-card:hover {
  background-color: var(--color-neutral-900);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}

.method-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 24px;
}

.method-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: #fff;
  line-height: 1.25;
}

.method-description {
  color: var(--color-gray-400);
  font-size: 1rem;
  line-height: 1.6;
}

/* Play Modal / 9:16 Device Mockup */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-phone-frame {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: min(850px, 92vh);
  aspect-ratio: 9 / 16;
  background: #0f172a;
  border-radius: 36px;
  border: 4px solid #334155;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 50px rgba(220, 38, 38, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-phone-bar {
  height: 48px;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 20;
}

.modal-phone-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.03em;
}

.modal-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseLive 1.8s infinite;
}

@keyframes pulseLive {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

.modal-phone-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-action-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.modal-action-link:hover {
  color: #fff;
  background: rgba(220, 38, 38, 0.4);
  border-color: #dc2626;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.modal-close-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.modal-phone-frame iframe {
  flex: 1;
  width: 100%;
  height: calc(100% - 48px);
  border: none;
  padding: 0;
  margin: 0;
  background: #000;
  display: block;
}

.modal-loading-overlay {
  position: absolute;
  inset: 48px 0 0 0;
  background: #09090b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 15;
  transition: opacity 0.3s ease;
}

.modal-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #dc2626;
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

.modal-loading-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Footer */
.footer {
  padding: 64px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background-color: var(--color-neutral-950);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-copy {
  color: var(--color-gray-400);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  color: var(--color-gray-400);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #fff;
}
