@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@700;900&family=Zilla+Slab:wght@400;600;700&family=Open+Sans:wght@400;600;700&display=swap');

:root {
  --cb-orange: #ff6600;
  --cb-blue-fact: #285dab;
  --cb-blue-main: #0090e3;
  --cb-blue-light: #cce9f9;
  --cb-blue-silver: #F2F7FC;
  --cb-white: #FFFFFF;
  --cb-green: #00B900;
  --cb-red: #E50000;
  --cb-purple: #68007A;
  --cb-black: #111111;
  --cb-grey-dark: #333333;
  --cb-grey: #999999;
  --cb-grey-gandalf: #DDDDDD;
  --cb-grey-light: #F3F3F3;

  --bg-color: var(--cb-blue-silver);
  --bg-dark-color: var(--cb-black);
  --text-color: var(--cb-grey-dark);
  --text-dark-color: var(--cb-grey-light);
  --card-bg: var(--cb-white);
  --card-dark-bg: var(--cb-grey-dark);
}

/* Dark mode support - disabled automatic background switch for brand consistency */
/* @media (prefers-color-scheme: dark) {
  :root {
    --bg-color: var(--bg-dark-color);
    --text-color: var(--text-dark-color);
    --card-bg: var(--card-dark-bg);
  }
} */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  /* Default to Open Sans for online body copy */
  font-family: 'Open Sans', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'League Spartan', sans-serif;
  /* Unified geometric feel */
  color: var(--text-color);
  letter-spacing: -1px;
}

.title-avenir {
  font-family: 'League Spartan', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
}

body {
  background: var(--bg-color);
  background-image:
    radial-gradient(circle at top right, rgba(255, 102, 0, 0.08) 0%, rgba(255, 102, 0, 0) 50%),
    radial-gradient(circle at bottom left, rgba(0, 144, 227, 0.05) 0%, rgba(0, 144, 227, 0) 50%);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* The Big Orange Dot decorative element removed per user request */

/* Common Components */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background-color: var(--cb-blue-main);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  /* Softer, broader shadow */
  padding: 20px 0;
  /* More breathing room */
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (prefers-color-scheme: dark) {
  header {
    background-color: var(--cb-blue-main);
  }
}

.logo {
  font-family: 'League Spartan', sans-serif;
  text-transform: uppercase;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--cb-blue-main);
  letter-spacing: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.logo-img {
  height: 60px;
  width: auto;
}

/* removed white logo override for readability */

.btn {
  font-family: 'Open Sans', sans-serif;
  border: none;
  border-radius: 8px;
  /* Slightly rounder for modern feel */
  padding: 18px 36px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.15), 0 15px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(6px);
  box-shadow: 0 0px 0 rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background-color: var(--cb-orange);
  box-shadow: 0 6px 0 #cc5200, 0 10px 20px rgba(255, 102, 0, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 8px 0 #cc5200, 0 15px 25px rgba(255, 102, 0, 0.4);
}

.btn-primary:active {
  box-shadow: 0 0px 0 #cc5200, 0 4px 8px rgba(255, 102, 0, 0.2);
}

/* Main Game Views */
.setup-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  min-height: 80vh;
}

.lobby-container {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 32px;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 40px 60px -15px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 100%;
  max-width: 800px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.pin-display {
  font-family: 'Avenir', sans-serif;
  font-size: 6rem;
  font-weight: 900;
  color: var(--cb-blue-main);
  background: var(--cb-blue-silver);
  padding: 20px 40px;
  border-radius: 20px;
  margin: 30px 0;
  display: inline-block;
  border: 4px solid var(--cb-blue-light);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.player-badge {
  background: var(--cb-white);
  padding: 12px 24px;
  border-radius: 50px;
  margin: 8px;
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 2px solid var(--cb-blue-light);
  display: inline-block;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.320, 1.275) both;
}

@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.choice-icon {
  width: 50px;
  height: 50px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.choice-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.question-screen-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1000px;
  gap: 0;
}

.question-card {
  background: transparent;
  padding: 20px 40px 24px;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  text-align: center;
  border: none;
}

.question-text {
  font-family: 'League Spartan', sans-serif;
  font-size: 3.6rem;
  font-weight: 900;
  color: var(--cb-blue-main);
  margin-bottom: 20px;
  line-height: 1.15;
  letter-spacing: -1.5px;
}

.timer-container {
  width: 100%;
  height: 14px;
  background: var(--cb-blue-silver);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.timer-bar {
  width: 100%;
  height: 100%;
  background: var(--cb-orange);
  border-radius: 7px;
}

.choices-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 900px;
  padding: 32px 40px 40px;
}

.choice-btn {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px;
  border-radius: 16px;
  color: white;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 72px;
  font-size: 1.6rem;
  font-weight: 700;
  border: none;
  width: 100%;
  text-align: left;
}

.choice-btn:hover {
  transform: translateX(6px);
  filter: brightness(1.08);
}

.choice-0 {
  background: linear-gradient(135deg, var(--cb-orange) 0%, #cc5200 100%);
  box-shadow: 0 8px 0 #993d00;
}

.choice-1 {
  background: linear-gradient(135deg, var(--cb-blue-fact) 0%, #1b417a 100%);
  box-shadow: 0 8px 0 #122c54;
}

.choice-2 {
  background: linear-gradient(135deg, #00B900 0%, #008f00 100%);
  box-shadow: 0 8px 0 #006600;
}

.choice-3 {
  background: linear-gradient(135deg, #68007A 0%, #4d005a 100%);
  box-shadow: 0 8px 0 #32003b;
}

/* Specific Page Styles */
.lobby-container {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 100px;
  /* More breathing room */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 40px;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 40px 60px -15px rgba(0, 0, 0, 0.1);
  /* Layered shadows for depth */
  margin: 40px auto;
  max-width: 1100px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.pin-display {
  font-size: 8.5rem;
  font-weight: 900;
  font-family: 'League Spartan', sans-serif;
  color: var(--cb-blue-main);
  padding: 20px 60px;
  margin-bottom: 40px;
  letter-spacing: -2px;
  position: relative;
}

.pin-display::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 8px;
  background: var(--cb-orange);
  border-radius: 4px;
}

.qr-code-container {
  background: white;
  padding: 25px;
  border-radius: 20px;
  margin-bottom: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), inset 0 2px 0 rgba(255, 255, 255, 1);
  border: 1px solid var(--cb-blue-light);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.qr-code-container:hover {
  transform: scale(1.05);
}

.players-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
  width: 100%;
  max-width: 1000px;
}

.player-badge {
  background-color: var(--card-bg);
  padding: 12px 24px;
  border-radius: 50px;
  /* Fully rounded pill shape */
  font-weight: 700;
  font-size: 1.2rem;
  /* slightly smaller to fit nicely in lists */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  /* softer shadow */
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  color: var(--text-color);
  border: 1px solid var(--cb-grey-gandalf);
  /* subtle border */
}

@keyframes popIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Question Header on Host */
.question-header {
  background: linear-gradient(180deg, var(--cb-white) 0%, var(--cb-blue-silver) 100%);
  padding: 40px;
  border-radius: 20px;
  margin: 40px auto;
  max-width: 1000px;
  text-align: center;
  font-size: 3.5rem;
  font-weight: 900;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08), inset 0 2px 0 rgba(255, 255, 255, 1);
  border: 1px solid var(--cb-blue-light);
}

/* Dark mode override removed for brand consistency */

/* Timer bar */
.timer-container {
  width: 100%;
  height: 10px;
  background: #ccc;
  position: fixed;
  bottom: 0;
  left: 0;
}

.timer-bar {
  height: 100%;
  background: var(--cb-orange);
  width: 100%;
  transition: width 1s linear;
}

/* Animations */
.fade-out {
  animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
  }
}

.fade-in {
  animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Player Join UI */
.join-form {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 450px;
  margin: 50px auto;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transform: translateY(0);
  animation: floatUp 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes floatUp {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.input-field {
  padding: 18px 24px;
  border: 2px solid var(--cb-grey-gandalf);
  border-radius: 12px;
  font-size: 1.4rem;
  text-align: center;
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--cb-blue-silver);
}

.input-field:focus {
  border-color: var(--cb-orange);
  background: var(--cb-white);
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.15);
  transform: translateY(-2px);
}

/* Dark mode override removed for brand consistency */