  :root {
      --bg: #0f1225;
      --card: #1b1f3b;
      --accent: #7f5af0;
      --muted: #a1a1aa;
      --text: #ffffff;
      --win: #2cb67d;
      --glass: rgba(255, 255, 255, 0.03);
  }

  * {
      box-sizing: border-box;
      font-family:
          Inter,
          system-ui,
          Segoe UI,
          Roboto,
          "Helvetica Neue",
          Arial;
  }

  html,
  body {
      height: 100%;
      margin: 0;
      background: radial-gradient(circle at 10% 10%, #1b1f3b 0%, #0f1225 60%);
      color: var(--text);
      -webkit-font-smoothing: antialiased;
  }

  header {
      height: 64px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 18px;
      background: linear-gradient(90deg,
              rgba(255, 255, 255, 0.02),
              transparent);
      backdrop-filter: blur(4px);
      position: sticky;
      top: 0;
      z-index: 60;
  }

  .brand {
      font-weight: 700;
      letter-spacing: 0.4px;
      font-size: 18px;
  }

  .controls {
      display: flex;
      gap: 10px;
      align-items: center;
  }

  .iconBtn {
      background: transparent;
      border: 1px solid rgba(255, 255, 255, 0.06);
      padding: 8px 10px;
      border-radius: 10px;
      color: var(--text);
      cursor: pointer;
      font-weight: 600;
      position: relative;
  }

  .iconBtn input {
      display: none;
  }

  .containerApp {
      max-width: 1100px;
      margin: 28px auto;
      padding: 24px;
      border-radius: 16px;
      display: flex;
      gap: 28px;
      align-items: flex-start;
      justify-content: center;
      transition: transform 0.25s ease;
      position: relative;
      z-index: 10;
  }

  .card {
      background: linear-gradient(180deg,
              var(--glass),
              rgba(255, 255, 255, 0.01));
      padding: 22px;
      border-radius: 14px;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  }

  /* Game column */
  .left {
      width: 360px;
  }

  .title {
      font-size: 20px;
      margin: 0 0 8px;
  }

  .status {
      color: var(--muted);
      margin-bottom: 14px;
      font-weight: 600;
  }

  .board {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
  }

  .cell {
      background: #121636;
      height: 92px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2.6rem;
      cursor: pointer;
      transition:
          transform 0.12s ease,
          background 0.15s ease,
          box-shadow 0.12s ease;
      user-select: none;
      box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.25);
  }

  .cell:hover {
      transform: translateY(-4px);
      background: #1f2460;
  }

  .cell.x {
      color: #38bdf8;
  }

  .cell.o {
      color: #f472b6;
  }

  .cell.win {
      background: var(--win);
      color: #000;
      animation: glow 0.9s infinite alternate;
  }

  @keyframes glow {
      from {
          box-shadow: 0 0 10px rgba(44, 182, 125, 0.6);
      }

      to {
          box-shadow: 0 0 26px rgba(44, 182, 125, 0.9);
      }
  }

  .btnPrimary {
      display: block;
      margin-top: 18px;
      padding: 12px;
      border-radius: 10px;
      border: none;
      background: linear-gradient(135deg, var(--accent), #5a3df0);
      color: #fff;
      font-weight: 700;
      cursor: pointer;
  }

  /* Right column */
  .right {
      width: 460px;
      display: flex;
      flex-direction: column;
      gap: 12px;
  }

  .mediaBox {
      display: flex;
      flex-direction: column;
      gap: 10px;
  }

  .mediaBox label {
      font-size: 13px;
      color: var(--muted);
  }

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

  .smallBtn {
      padding: 8px 10px;
      border-radius: 8px;
      border: 1px solid rgba(255, 255, 255, 0.06);
      background: transparent;
      color: var(--text);
      cursor: pointer;
  }

  video {
      width: 100%;
      height: 260px;
      background: #000;
      border-radius: 10px;
      object-fit: cover;
      border: 1px solid rgba(255, 255, 255, 0.03);
  }

  .videoOverlay {
      position: absolute;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      pointer-events: none;
  }

  .videoPlayBtn {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      background: linear-gradient(135deg, var(--accent), #5a3df0);
      padding: 10px 16px;
      border-radius: 10px;
      border: none;
      color: #fff;
      cursor: pointer;
      z-index: 30;
      pointer-events: auto;
  }

  /* confetti canvas sits over everything */
  #confettiCanvas {
      position: fixed;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 70;
  }

  /* particle emoji (fallback) */
  .particle {
      position: fixed;
      left: 50%;
      top: 20%;
      transform: translateX(-50%);
      pointer-events: none;
      font-size: 26px;
      opacity: 0;
      animation: fly 1400ms ease-out forwards;
  }

  @keyframes fly {
      0% {
          opacity: 1;
          transform: translate(-50%, 0) scale(1) rotate(0deg);
      }

      100% {
          opacity: 0;
          transform: translate(calc(-50% + var(--dx)), var(--dy)) scale(0.8) rotate(var(--rot));
      }
  }

  /* responsive */
  @media (max-width: 900px) {
      .containerApp {
          flex-direction: column;
          align-items: center;
      }

      .left,
      .right {
          width: 100%;
      }
  }

  @media (max-width: 800px) {
      .footer-inner {
          grid-template-columns: 1fr;
          text-align: center;
      }

      .footer-right {
          text-align: center;
      }
  }