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

html {
    overflow: hidden;
}

body {
    font-family: 'Bangers', cursive;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: url('../Memory Mayhem/neural.jpg') center/cover no-repeat fixed, #000;
}

/* Background Video */
#bgVideo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

#gameTitle {
    text-align: center;
    font-size: clamp(44px, 3.2vw, 52px);
    line-height: 1.1;
    margin: clamp(10px, 1.8vh, 18px) 0 clamp(16px, 2.5vh, 26px) 0;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    letter-spacing: 2px;
}

#gameContainer {
    display: flex;
    flex: 1;
    gap: 15px;
    padding: 0 15px clamp(10px, 1.8vh, 20px);
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Left Panel */
#leftPanel {
    width: 200px;
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 10001;
}

#leftPanel button {
    font-family: 'Bangers', cursive;
    font-size: 20px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: #ffd54a;
    color: #000;
    cursor: pointer;
    transition: all 0.2s;
}

#leftPanel button:hover {
    background-color: #ffca28;
    transform: scale(1.05);
}

#volumeControl {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#volumeControl label {
    font-size: 16px;
}

#volumeSlider {
    width: 100%;
    cursor: pointer;
}

/* Center Panel */
#centerPanel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.5vh, 16px);
    align-items: center;
}

#slideshowContainer {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    width: 680px;
    height: 480px;
    box-sizing: border-box;
    flex-shrink: 0;
}

#vocabDisplay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 500px;
    height: 450px;
    overflow: hidden;
    box-sizing: border-box;
    flex-shrink: 0;
}

#vocabImage {
    width: 500px;
    height: 375px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

#vocabImage img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

#vocabWordRow {
    width: 500px;
    height: 48px;
    min-height: 48px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

#vocabWordRow::before {
    content: '';
    display: block;
    grid-column: 1;
}

#vocabWord {
    grid-column: 2;
    font-size: 36px;
    color: #333;
    font-weight: bold;
    text-align: center;
    height: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    white-space: nowrap;
}

.tts-btn {
    grid-column: 3;
    justify-self: start;
    margin-left: 10px;
    font-size: 20px;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    flex-shrink: 0;
    line-height: 1;
}

.tts-btn:hover {
    background-color: #45a049;
    transform: scale(1.1);
}

.tts-btn:active {
    transform: scale(0.95);
}

.tts-btn.hidden {
    display: none;
}

.arrow-btn {
    font-size: 36px;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background-color: #667eea;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Bangers', cursive;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow-btn:hover {
    background-color: #764ba2;
    transform: scale(1.1);
}

.arrow-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Message Area */
#messageArea {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#instructionDiv {
    background: rgba(255,255,255,0.95);
    color: #333;
    padding: 12px;
    border-radius: 10px;
    font-size: 22px;
    line-height: 1.2;
    text-align: center;
    height: 54px;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#controlsDiv {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

#controlsDiv button {
    font-family: 'Bangers', cursive;
    font-size: 18px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background-color: #ffd54a;
    color: #000;
    cursor: pointer;
    transition: all 0.2s;
}

#controlsDiv button:hover {
    background-color: #ffca28;
    transform: scale(1.05);
}

#controlsDiv button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

#controlsDiv button.bomb-btn {
    font-size: 16px;
    padding: 8px 10px;
    white-space: nowrap;
}

/* Right Panel - Scoreboard */
#scorePanel {
    width: 250px;
    background: rgba(0,0,0,0.3);
    padding: 10px 8px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
    visibility: hidden;
}

#scorePanel h2 {
    font-size: 24px;
    margin-bottom: 8px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

#scores {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-height: 0;
    justify-content: flex-start;
}

#scores li {
    background: rgba(255,255,255,0.2);
    padding: 6px 8px;
    border-radius: 8px;
    font-size: clamp(15px, 1.8vh, 22px); /* Scale font with height */
    text-align: center;
    transition: all 0.3s;
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 75px;
    max-height: 85px;
    box-sizing: border-box;
}

#scores li.current-turn {
    background: rgba(255,255,255,0.4);
    border-color: #ffd54a;
    box-shadow: 0 0 15px rgba(255,213,74,0.5);
    transform: scale(1.02);
}

#scores li .team-name {
    display: inline-block;
    font-size: 1.05em;
    margin-bottom: 1px;
    padding-right: 4px;
    margin-right: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}

#scores li .team-score {
    display: block;
    font-size: 1.25em;
    color: #ffd54a;
    line-height: 1.1;
}

#scores li .streak-info {
    display: block;
    font-size: 0.7em;
    color: #ffeb3b;
    margin-top: 1px;
    line-height: 1;
    min-height: 1em;
}

/* Rules Panel */
#rulesPanel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10004;
}

#rulesPanel.show {
    display: flex;
}

#rulesContent {
    background: white;
    color: #333;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    font-family: Arial, sans-serif;
}

#rulesContent h2 {
    font-family: 'Bangers', cursive;
    color: #667eea;
    margin-top: 20px;
    margin-bottom: 10px;
}

#rulesContent h2:first-child {
    margin-top: 0;
}

#rulesContent ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

#rulesContent li {
    margin-bottom: 8px;
    line-height: 1.5;
}

#closeRulesBtn {
    font-family: 'Bangers', cursive;
    font-size: 24px;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    background-color: #667eea;
    color: white;
    cursor: pointer;
    margin-top: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#closeRulesBtn:hover {
    background-color: #764ba2;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    #gameContainer {
        flex-direction: column;
        align-items: center;
    }
    
    #leftPanel, #scorePanel {
        width: 100%;
        max-width: 600px;
    }
    
    #centerPanel {
        width: 100%;
    }
}
canvas[id^="victory"] {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 10000 !important;
  pointer-events: none !important;
}

/* Vocab List Selection Styles */
.vs-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 5px;
}

.vs-list-item {
    padding: 15px;
    background: #34495e;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    border: 2px solid transparent;
}

.vs-list-item:hover {
    background: #3d566e;
    transform: translateY(-2px);
    border-color: #f1c40f;
}

.vs-list-item .list-name {
    font-size: 1.5rem;
    color: #f1c40f;
    margin-bottom: 4px;
}

.vs-list-item .list-meta {
    font-size: 1rem;
    color: #bdc3c7;
}


/* Consolidated Game Setup Modal Styles */
.setup-modal-content {
  width: 800px !important;
  max-width: 92vw !important;
  max-height: 94vh;
  padding: 20px 24px;
  overflow-y: auto;
  color: #333;
  box-sizing: border-box;
}

.setup-modal-content h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 28px;
  color: #333;
}

.setup-grid-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: start;
  text-align: left;
}

.setup-col-left,
.setup-col-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.setup-section {
  margin-bottom: 0;
  padding: 10px 14px;
  background: rgba(0,0,0,0.03);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.1);
  text-align: left;
  box-sizing: border-box;
}

.setup-section h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.15em;
  color: #333;
  text-align: center;
}

.setup-teams-grid {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.setup-team-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  background: #f4f4f4;
  border: 2px solid #333;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Bangers', cursive;
  font-size: 19px;
}

.setup-team-btn.active {
  background: #ffd54a;
  transform: scale(1.08);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.setup-points-grid, .setup-mode-grid {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.setup-point-btn, .setup-mode-btn {
  flex: 1;
  padding: 8px;
  font-family: 'Bangers', cursive;
  font-size: 17px;
  background: #f4f4f4;
  border: 2px solid #333;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.setup-point-btn.active, .setup-mode-btn.active {
  background: #ffd54a;
}

.segmented-control {
  display: flex;
  background: #eee;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 12px;
}

.seg-btn {
  flex: 1;
  border: none;
  background: none;
  padding: 8px;
  font-family: 'Bangers', cursive;
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.seg-btn.active {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.setup-dropdown, .setup-player-input {
  width: 100%;
  padding: 8px 10px;
  font-family: 'Bangers', cursive;
  font-size: 17px;
  border: 2px solid #333;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.setup-dropdown.error {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.25);
}

.dropdown-validation-error {
  color: #e74c3c;
  font-family: Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: bold;
  margin-top: 6px;
  text-align: left;
  line-height: 1.2;
}

.setup-dropdown {
  cursor: pointer;
}

.setup-player-input {
  text-align: center;
}

.setup-students-config {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-height: none;
  overflow-y: visible;
}

.setup-student-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.06);
  box-sizing: border-box;
}

.setup-student-row label {
  font-size: 15px;
  font-weight: bold;
  color: #444;
}

.setup-student-row input {
  width: 48px;
  padding: 3px 4px;
  border: 1px solid #333;
  border-radius: 4px;
  text-align: center;
  font-family: 'Bangers', cursive;
  font-size: 16px;
}

.setup-modal-actions {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  margin-top: 12px;
}

.setup-modal-actions .vpBtn {
  justify-self: center;
  width: 150px !important;
  height: 50px !important;
  margin: 0 !important;
  font-size: 24px !important;
  letter-spacing: 1px;
}

.setup-options-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.customise-vocab-container {
  margin-top: 0;
  text-align: left;
  padding: 6px 10px;
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
}

.customise-vocab-label {
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
}

.customise-vocab-label input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.customise-count {
  font-size: 0.9rem;
  color: #27ae60;
  margin-left: 5px;
  font-weight: normal;
  font-family: Arial, sans-serif;
}

@media (max-width: 768px) {
  .setup-modal-content {
    width: 95% !important;
    max-height: 92vh;
    overflow-y: auto;
    padding: 16px;
  }

  .setup-grid-container {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .setup-students-config {
    grid-template-columns: 1fr;
  }
}

.mystery-box-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  position: relative;
  overflow: hidden;
}

.mystery-box-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 340px;
  position: relative;
  overflow: visible;
  box-sizing: border-box;
}

.mystery-box-team-label {
  font-family: 'Bangers', cursive;
  font-size: 22px;
  color: #ffd54a;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
  margin-bottom: 8px;
  text-align: center;
  width: 100%;
  max-width: 220px;
  padding: 0 10px;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.mystery-box-card {
  width: 180px;
  height: 250px;
  position: relative;
  perspective: 1000px;
  will-change: transform;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.mystery-box-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.mystery-box-inner.is-flipped {
  transform: rotateY(180deg);
}

.mystery-box-front, .mystery-box-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.mystery-box-front {
  background: rgba(255, 255, 255, 0.1);
  border: 3px solid #ffd54a;
  padding: 10px;
  box-sizing: border-box;
}

.mystery-box-front img {
  max-width: 150px;
  max-height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  animation: mysteryFloat 2s ease-in-out infinite alternate;
}

@keyframes mysteryFloat {
  0% { transform: translateY(-4px) scale(1); }
  100% { transform: translateY(4px) scale(1.03); }
}

.mystery-box-back {
  background: #ffffff;
  border: 4px solid #ffd54a;
  transform: rotateY(180deg);
  padding: 12px;
  box-sizing: border-box;
  text-align: center;
}

.mystery-outcome-icon {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.mystery-outcome-title {
  font-family: 'Bangers', cursive;
  font-size: 26px;
  color: #1a237e;
  margin-bottom: 4px;
  line-height: 1.1;
}

.mystery-outcome-desc {
  font-family: 'Bangers', cursive;
  font-size: 20px;
  color: #444;
  line-height: 1.1;
}

.team-status-icon {
  font-size: 1.1em;
  margin-left: 4px;
  margin-right: 2px;
  vertical-align: middle;
}

.fog-image-blur,
.fog-image-blur img,
.fog-image-blur div,
.cursed-image-blur,
.cursed-image-blur img,
.cursed-image-blur div {
  filter: blur(8px) !important;
}

.mushroom-image-zoom:not(.tornado-image-spin) img,
.mushroom-image-zoom:not(.tornado-image-spin) div {
  transform: scale(5.5);
  transition: transform 0.3s ease;
}

@keyframes tornadoSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.tornado-image-spin:not(.mushroom-image-zoom) img,
.tornado-image-spin:not(.mushroom-image-zoom) div {
  animation: tornadoSpin 0.7s linear infinite;
}

.mushroom-image-zoom.tornado-image-spin img,
.mushroom-image-zoom.tornado-image-spin div {
  animation: tornadoSpinZoom 0.7s linear infinite;
}

@keyframes tornadoSpinZoom {
  from {
    transform: scale(5.5) rotate(0deg);
  }
  to {
    transform: scale(5.5) rotate(360deg);
  }
}

.mystery-action-btn {
  font-family: 'Bangers', cursive;
  font-size: 24px;
  letter-spacing: 1px;
  padding: 10px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  color: white;
  margin: 0 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.2s, opacity 0.2s;
}

.mystery-action-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.mystery-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.mystery-keep-btn {
  background: linear-gradient(135deg, #10b981, #059669);
}

.mystery-switch-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

#landingScreen {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 28, 0.88);
  text-align: center;
}

#landingScreen[hidden] {
  display: none;
}

.landing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 900px;
  padding: 40px;
  text-shadow: 2px 3px 8px rgba(0, 0, 0, 0.65);
}

.landing-logo {
  width: 300px;
  height: auto;
  animation: landingLogoFloat 3.5s ease-in-out infinite;
}

.landing-content h1 {
  font-size: 54px;
  line-height: 1.1;
}

.landing-content p {
  font-size: 24px;
  line-height: 1.5;
}

#landingPlayBtn {
  margin-top: 12px;
  padding: 14px 64px;
  border: 3px solid #fff0a8;
  border-radius: 12px;
  background: #ffd54a;
  color: #17120a;
  font-family: 'Bangers', cursive;
  font-size: 38px;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s, background-color 0.2s;
}

#landingPlayBtn:hover {
  transform: scale(1.06);
  background: #ffca28;
}

@keyframes landingLogoFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

#postGameMarketing {
  position: fixed;
  inset: 0;
  z-index: 31002;
  display: grid;
  place-items: center;
  padding: 16px;
  background: linear-gradient(135deg, rgba(9, 14, 34, 0.94), rgba(28, 21, 57, 0.96));
  color: #211a38;
  font-family: 'Bangers', cursive;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 750ms ease, visibility 0s linear 750ms;
}

#postGameMarketing,
#postGameMarketing * {
  font-family: 'Bangers', cursive !important;
}

#postGameMarketing.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 750ms ease;
}

.post-game-card {
  width: min(1080px, 100%);
  padding: clamp(16px, 2.5vh, 28px) clamp(22px, 4vw, 46px);
  border: 5px solid #ffd54a;
  border-radius: 24px;
  background: linear-gradient(145deg, #fffdf5, #fff1c2);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.post-game-logo {
  display: block;
  width: 300px;
  max-height: 150px;
  object-fit: contain;
  margin: 0 auto 8px;
  animation: landingLogoFloat 3.5s ease-in-out infinite;
}

.post-game-card h2 {
  margin: 0;
  color: #251a49;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 0.98;
  letter-spacing: 1.5px;
  text-shadow: 2px 3px 0 #ffd54a;
}

.post-game-card h2:focus {
  outline: 3px solid #6954a3;
  outline-offset: 4px;
  border-radius: 3px;
}

.post-game-intro {
  max-width: 720px;
  margin: 8px auto 16px;
  font-size: 21px;
  line-height: 1.15;
}

.post-game-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  text-align: center;
}

.post-game-signup,
.post-game-share {
  width: 100%;
  min-width: 0;
  padding: 18px;
  border: 2px solid rgba(105, 84, 163, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.post-game-actions h3 {
  margin: 0 0 6px;
  color: #39276e;
  font-size: 25px;
  line-height: 1.05;
}

.post-game-actions p {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.15;
}

.post-game-signup .ml-embedded {
  text-align: center;
}

#postGameMarketing .ml-embedded input {
  text-align: left !important;
}

#postGameMarketing .ml-embedded {
  min-height: 50px;
  color: #211a38;
}

#postGameMarketing .ml-form-embedContent {
  display: none;
}

#postGameMarketing .ml-embedded input,
#postGameMarketing .ml-embedded button,
#postGameMarketing .ml-embedded select,
#postGameMarketing .ml-embedded textarea {
  font-family: 'Bangers', cursive !important;
  font-size: 19px !important;
}

#postGameMarketing .ml-embedded input,
#postGameMarketing .ml-embedded select,
#postGameMarketing .ml-embedded textarea {
  min-height: 46px;
  border: 2px solid #b9add9 !important;
  border-radius: 8px !important;
}

#postGameMarketing .ml-embedded button,
#copyLinkBtn,
#donateBtn {
  min-height: 48px;
  padding: 9px 22px;
  border: 2px solid #251a49 !important;
  border-radius: 10px;
  background: #ffd54a !important;
  color: #211a38 !important;
  font-size: 23px !important;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 0 #d69b16;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

#postGameMarketing .ml-embedded .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-horizontalRow button,
#postGameMarketing .ml-embedded .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button {
  border: 2px solid #251a49 !important;
  border-radius: 10px !important;
  background: #ffd54a !important;
  box-shadow: 0 4px 0 #d69b16 !important;
  color: #211a38 !important;
  font-family: 'Bangers', cursive !important;
  font-size: 23px !important;
  font-weight: normal !important;
  cursor: pointer !important;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease !important;
}

#postGameMarketing .ml-embedded .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-horizontalRow button:hover,
#postGameMarketing .ml-embedded .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button:hover {
  border: 2px solid #251a49 !important;
  background: #ffca28 !important;
  color: #211a38 !important;
  box-shadow: 0 6px 0 #d69b16 !important;
  transform: translateY(-2px) !important;
}

#postGameMarketing .ml-embedded button:hover,
#copyLinkBtn:hover,
#donateBtn:hover {
  transform: translateY(-2px);
  background: #ffca28 !important;
  box-shadow: 0 6px 0 #d69b16;
}

#copyLinkBtn {
  display: block;
  margin: 4px auto 10px;
  font-family: 'Bangers', cursive !important;
}

@media (min-width: 900px) {
  #copyLinkBtn ~ p,
  #copyLinkBtn ~ a {
    position: relative;
    top: 20px;
  }
}

#donateBtn {
  display: flex;
  width: 128px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-family: 'Bangers', cursive !important;
  text-decoration: none;
}

#postGameMarketing #copyLinkStatus {
  min-height: 1.2em;
  margin: 0;
  color: #39276e;
  font-size: 17px;
}

@media (min-width: 900px) and (max-height: 700px) {
  #postGameMarketing {
    padding: 10px;
  }

  .post-game-card {
    padding: 12px 30px;
  }

  .post-game-logo {
    width: 210px;
    max-height: 76px;
    margin-bottom: 4px;
  }

  .post-game-card h2 {
    font-size: clamp(30px, 3.8vw, 42px);
  }

  .post-game-intro {
    margin: 4px auto 8px;
    font-size: 17px;
  }

  .post-game-actions {
    gap: 10px;
  }

  .post-game-signup,
  .post-game-share {
    padding: 12px;
  }

  .post-game-actions h3 {
    font-size: 22px;
  }

  .post-game-actions p {
    margin-bottom: 6px;
    font-size: 16px;
  }

  #postGameMarketing .ml-embedded input,
  #postGameMarketing .ml-embedded select,
  #postGameMarketing .ml-embedded textarea {
    min-height: 34px;
  }

  #postGameMarketing .ml-embedded button,
  #copyLinkBtn,
  #donateBtn {
    min-height: 38px;
    padding: 6px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #postGameMarketing,
  #postGameMarketing.is-visible {
    transition-duration: 0.01ms;
  }
}

