@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Nunito:wght@500;700;800&family=Press+Start+2P&display=swap');

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

body {
  font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a5c2a 0%, #2d8a4e 30%, #3cb371 60%, #2d8a4e 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#app {
  width: 420px;
  max-width: 100vw;
  max-height: 100vh;
  height: 750px;
  background-image: url('../assets/crazy-golf-bg.png?v=2');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

#app::before,
#app::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

/* Dynamic decorative blobs over background scene */
#app::before {
  inset: -20% -10% auto -10%;
  height: 55%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.2), transparent 45%),
    radial-gradient(circle at 75% 20%, rgba(124, 77, 255, 0.18), transparent 42%),
    radial-gradient(circle at 55% 65%, rgba(0, 188, 212, 0.18), transparent 42%);
  animation: blobDrift 9s ease-in-out infinite;
}

/* Subtle floating lights */
#app::after {
  inset: 0;
  background-image:
    radial-gradient(circle at 8% 20%, rgba(255, 255, 255, 0.25) 0 2px, transparent 3px),
    radial-gradient(circle at 18% 78%, rgba(255, 255, 255, 0.22) 0 2px, transparent 3px),
    radial-gradient(circle at 42% 30%, rgba(255, 255, 255, 0.2) 0 1px, transparent 3px),
    radial-gradient(circle at 68% 15%, rgba(255, 255, 255, 0.24) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 64%, rgba(255, 255, 255, 0.22) 0 2px, transparent 3px),
    radial-gradient(circle at 92% 38%, rgba(255, 255, 255, 0.2) 0 1px, transparent 3px);
  animation: sparkleFloat 7s linear infinite;
}

@keyframes blobDrift {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(8px) translateX(-8px); }
}

@keyframes sparkleFloat {
  0% { transform: translateY(0); opacity: 0.7; }
  50% { opacity: 1; }
  100% { transform: translateY(-10px); opacity: 0.7; }
}

#bg-canvas {
  display: none;
}

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

.screen.active {
  display: flex;
}

/* ===== START SCREEN ===== */
#start-screen {
  justify-content: flex-start;
  padding: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.08) 45%, rgba(0, 0, 0, 0.22) 100%);
}

#logo-container {
  position: absolute;
  top: calc(10px - 3cm);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  margin: 0;
  width: auto;
}

#main-logo {
  width: 365px;
  max-width: none;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
  animation: logoPulse 2.2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

#logo-icon {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 4px;
  animation: bounce 2s infinite ease-in-out;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

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

#main-title {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-size: 46px;
  font-weight: 900;
  color: #FFD700;
  text-shadow:
    3px 3px 0 #1a5c2a,
    -1px -1px 0 #000,
    0 0 30px rgba(255, 215, 0, 0.4);
  letter-spacing: 4px;
  line-height: 1;
  margin-bottom: 2px;
  display: none;
}

.subtitle {
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  letter-spacing: 1px;
  display: none;
}

#menu-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: auto;
  position: absolute;
  right: 10px;
  transform: none;
  bottom: 16px;
  padding: 0 14px;
}

#version-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

#version-badge:hover {
  background: rgba(0, 0, 0, 0.55);
  transform: scale(1.05);
}

.menu-image-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  line-height: 0;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.menu-image-btn img {
  display: block;
  width: 198px;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
  border-radius: 0;
  animation: menuPulse 2.2s ease-in-out infinite;
}

.menu-image-btn:focus,
.menu-image-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.menu-image-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.menu-image-btn:active {
  transform: scale(0.98);
}

@keyframes menuPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.btn {
  font-family: 'Nunito', sans-serif;
  border: none;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 14px 28px;
  width: auto;
  text-align: center;
}

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

.btn-lg {
  padding: 16px 32px;
  font-size: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.96), rgba(255, 140, 0, 0.96));
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
  border: 2px solid rgba(255,255,255,0.2);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(255, 107, 53, 0.7);
  transform: translateY(-3px) scale(1.02);
}

.btn-primary,
.btn-secondary,
.btn-lang,
.theme-btn,
.btn-nav {
  position: relative;
  overflow: hidden;
}

/* Gentle sheen animation for joyful UI */
.btn-primary::after,
.btn-secondary::after,
.btn-lang::after,
.theme-btn::after,
.btn-nav::after {
  content: '';
  position: absolute;
  top: -120%;
  left: -40%;
  width: 30%;
  height: 300%;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(20deg);
  animation: sheenSweep 3.8s linear infinite;
}

@keyframes sheenSweep {
  0% { left: -50%; }
  100% { left: 130%; }
}

.btn-secondary {
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.94), rgba(224, 64, 251, 0.94));
  color: #fff;
  box-shadow: 0 6px 20px rgba(124, 77, 255, 0.4);
  border: 2px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
  box-shadow: 0 8px 30px rgba(124, 77, 255, 0.6);
  transform: translateY(-3px) scale(1.02);
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.18);
  color: #f2f2f2;
  border-radius: 10px;
}

.btn-small:hover {
  background: rgba(0, 0, 0, 0.24);
}

/* ===== LANGUAGE TOGGLE ===== */

/* ===== GAME SCREEN ===== */
#game-screen {
  padding: 0;
  background-image: url('../assets/crazy-golf-bg.png?v=3');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

#game-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 0;
}

#game-screen > * {
  position: relative;
  z-index: 1;
}

#game-header {
  width: 100%;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1a5c2a, #2d8a4e);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  min-height: calc(90px + 0.5cm);
}

#game-header-logo {
  width: 115px;
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  position: absolute;
  left: 18px;
  top: calc(14px - 0.9cm);
}

#game-title {
  font-size: 20px;
  font-weight: 800;
}

#hole-info {
  text-align: center;
  flex: 1;
}

#hole-number {
  font-size: 17px;
  font-weight: 700;
  display: block;
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

#round-label {
  font-size: 11px;
  opacity: 0.8;
}

#btn-restart {
  background: rgba(255, 255, 255, 0.26);
  color: #fff;
  font-size: 13px;
  min-width: 88px;
  height: 36px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  position: absolute;
  right: 12px;
  top: calc(27px + 0.5cm - 2mm);
}

#btn-restart.mulligan-used {
  background: rgba(220, 20, 60, 0.85);
  color: #fff;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: #ff8a8a;
  cursor: not-allowed;
  opacity: 0.95;
}

#btn-restart.mulligan-used::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 2px;
  background: #ff3b3b;
  transform: rotate(-22deg);
  box-shadow: 0 0 4px rgba(255,0,0,0.45);
}

#wheel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#wheel-overlay.hidden {
  display: none;
}

#card-shuffle-container {
  position: relative;
  width: 410px;
  height: 289px;
  perspective: 1200px;
}

.shuffle-card {
  position: absolute;
  width: 178px;
  height: 246px;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
  left: 116px;
  top: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  transform-style: preserve-3d;
  transform-origin: center center;
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  overflow: hidden;
  border: 3px solid #2e7d32;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.18),
    inset 0 0 0 6px rgba(46,125,50,0.22);
}

.card-front {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 8px, rgba(255,255,255,0.01) 8px 16px),
    linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05)),
    radial-gradient(circle at 30% 30%, #66bb6a, #14501f);
}

.card-front img {
  width: 86%;
  height: auto;
  display: block;
  margin: 18px auto 0;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
}

.card-back {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 8px, rgba(255,255,255,0.01) 8px 16px),
    linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04)),
    radial-gradient(circle at 25% 20%, #9be7a6, #1f7a35);
  transform: rotateY(180deg);
}

.card-back.prompt {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 8px, rgba(255,255,255,0.01) 8px 16px),
    linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.06)),
    radial-gradient(circle at 25% 20%, #7cd98a, #1f7a35);
}

.card-club-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 29px;
  line-height: 1.3;
  padding: 18px;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  font-family: 'Comic Sans MS', 'Comic Sans', cursive;
}

.card-club-label.prompt-label {
  font-size: 24px;
}

.card-a { z-index: 3; transform: rotate(-6deg) translateX(-18px); }
.card-b { z-index: 2; transform: rotate(2deg); }
.card-c { z-index: 1; transform: rotate(8deg) translateX(18px); }

.shuffle-active .card-a { animation: shuffleA 0.32s linear infinite; }
.shuffle-active .card-b { animation: shuffleB 0.32s linear infinite; }
.shuffle-active .card-c { animation: shuffleC 0.32s linear infinite; }

.shuffle-card.reveal {
  animation: revealCard 0.85s ease forwards;
  z-index: 10;
}

.shuffle-card.reveal .card-front {
  transform: rotateY(180deg);
}

.shuffle-card.reveal .card-back {
  transform: rotateY(360deg);
}

.shuffle-card .card-front,
.shuffle-card .card-back {
  transition: transform 0.75s ease;
}

@keyframes revealCard {
  0% { transform: scale(1) translateY(0); }
  45% { transform: scale(1.24) translateY(-8px); }
  100% { transform: scaleX(1.74) scaleY(1.72) translateY(0.55cm); }
}

@keyframes shuffleA {
  0% { transform: rotate(-8deg) translate(-25px, 0); }
  50% { transform: rotate(7deg) translate(25px, -8px); }
  100% { transform: rotate(-8deg) translate(-25px, 0); }
}
@keyframes shuffleB {
  0% { transform: rotate(2deg) translate(0, -8px); }
  50% { transform: rotate(-6deg) translate(-18px, 10px); }
  100% { transform: rotate(2deg) translate(0, -8px); }
}
@keyframes shuffleC {
  0% { transform: rotate(8deg) translate(25px, 0); }
  50% { transform: rotate(-7deg) translate(-25px, 10px); }
  100% { transform: rotate(8deg) translate(25px, 0); }
}

#wheel-text {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin-top: 16px;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

#rule-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 24px;
  width: 100%;
  pointer-events: none;
}

#rule-card .kept-card-host,
#rule-card .kept-card-host .shuffle-card {
  pointer-events: auto;
}

.rule-label {
  font-size: 13px;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  opacity: 0;
}

.rule-text {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  text-align: center;
  line-height: 1.4;
  max-width: 340px;
  opacity: 0;
  display: none;
}

.rule-text.spinning {
  animation: spinReveal 0.5s ease-out;
}

@keyframes spinReveal {
  0% { transform: scale(0.3) rotate(180deg); opacity: 0; }
  50% { transform: scale(1.15) rotate(-10deg); opacity: 0.7; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

#game-nav {
  display: flex;
  gap: calc(10px + 0.5cm);
  width: 100%;
  padding: 10px 8px;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  justify-content: center;
}

.btn-nav {
  flex: 0 0 calc(50% - 1.2cm);
  max-width: calc(50% - 1.2cm);
  padding: 12px 14px;
  font-size: 14px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  background: #9e9e9e;
  color: #fff;
}

.btn-nav:hover,
.btn-nav:focus-visible,
.btn-nav:active {
  transform: scale(1.1);
  background: #ff8c00;
  color: #fff;
  outline: none;
}

#btn-next:hover,
#btn-next:focus-visible,
#btn-next:active {
  background: #ff8c00 !important;
  color: #fff !important;
}

#btn-next.btn-nav.btn-primary {
  background: #9e9e9e;
  box-shadow: none;
}

.btn-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

#game-footer {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 8px 18px 14px;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#game-screen.result-ready #game-nav,
#game-screen.result-ready #game-footer,
#game-screen.result-ready .rule-label,
#game-screen.result-ready .rule-text {
  opacity: 1;
  pointer-events: auto;
}

.kept-card-host {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 8px;
  min-height: 460px;
}

.kept-card-host .shuffle-card.clickable {
  cursor: pointer;
}

.kept-card-host .shuffle-card.clickable:hover {
  transform: scale(1.02) !important;
}

#game-screen.dimmed #game-header,
#game-screen.dimmed #rule-card,
#game-screen.dimmed #game-nav,
#game-screen.dimmed #game-footer {
  filter: brightness(0.2);
}

.kept-card-host .shuffle-card {
  position: relative;
  left: auto;
  top: auto;
  width: 84%;
  max-width: 336px;
  aspect-ratio: 178 / 246;
  height: auto;
  margin-top: 0;
  transform: none !important;
  animation: none;
  box-shadow: 0 16px 28px rgba(0,0,0,0.35);
}

#game-screen.result-ready .kept-card-host .shuffle-card {
  animation: keepToScreen 0.45s ease-out, cardJitter 5s ease-in-out 0.45s infinite;
}

.kept-card-host .card-club-label {
  font-size: 29px;
  line-height: 1.35;
  padding: 18px;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.36s ease, transform 0.42s ease;
}

.card-club-label.cinematic-hidden {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
}

.card-club-label.cinematic-reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.card-club-label.trailer-heading {
  font-size: 36px;
  letter-spacing: 1.4px;
}

@keyframes cardJitter {
  0%, 88%, 100% { transform: translate(0, 0) rotate(0deg); }
  90% { transform: translate(-1px, 0) rotate(-0.4deg); }
  92% { transform: translate(1px, 0) rotate(0.4deg); }
  94% { transform: translate(-1px, 0) rotate(-0.3deg); }
  96% { transform: translate(1px, 0) rotate(0.3deg); }
  98% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes keepToScreen {
  0% { transform: scale(0.94) translateY(-10px); }
  100% { transform: scale(1) translateY(0); }
}

/* ===== RULES SCREEN ===== */
#rules-screen {
  background-image: url('../assets/crazy-golf-bg.png?v=2');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 24px 20px;
  overflow: hidden;
  position: absolute;
}

#rules-screen::before,
#rules-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#rules-screen::before {
  background: rgba(10, 35, 18, 0.62);
}

#rules-screen::after {
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.25) 100%);
}

@keyframes waveDrift {
  0% { transform: translateX(0); }
  50% { transform: translateX(-16px); }
  100% { transform: translateX(0); }
}

@keyframes firePulse {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.2); transform: scale(1.02); }
}

@keyframes sparksRise {
  0% { transform: translateY(0); opacity: 0.4; }
  100% { transform: translateY(-20px); opacity: 0; }
}

.rules-content {
  text-align: center;
  max-width: 360px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

#rules-logo {
  width: 252px;
  max-width: none;
  height: auto;
  display: block;
  margin: 0;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.35));
  animation: logoPulse 2.2s ease-in-out infinite;
}

#rules-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  transform: translateY(-2.7cm);
  margin-bottom: 0;
}

#rules-title {
  font-size: 22px;
  margin-bottom: 8px;
  flex-shrink: 0;
  display: none;
}

#rules-boxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: -4.5cm;
  margin-bottom: 10px;
  overflow: hidden;
  flex: 1;
}


.rule-box {
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 10px 12px;
  width: 100%;
  text-align: left;
  backdrop-filter: blur(4px);
}

.box-header {
  font-size: 14px;
  font-weight: 800;
  color: #FFD700;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}

.box-body {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
}

#btn-close-rules {
  background: #fff;
  color: #1a5c2a;
  border: none;
  border-radius: 14px;
  padding: 8px 26px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

#rules-bottombar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.social-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.social-btn-lg {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.social-fb {
  background: #1877F2;
}

.social-ig {
  background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF, #515BD4);
}

/* ===== MODAL ===== */
.modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  width: 85%;
  max-width: 340px;
  text-align: center;
}

.modal-content h3 {
  font-size: 20px;
  margin-bottom: 14px;
  color: #333;
}

#mulligan-text {
  font-size: 15px;
  line-height: 1.5;
  color: #333;
  margin-bottom: 14px;
}

#finished-hole-text {
  font-size: 15px;
  line-height: 1.5;
  color: #333;
  margin-bottom: 14px;
  white-space: pre-line;
}

#rick-overlay {
  background: rgba(0, 0, 0, 0.86);
}

#rick-content {
  width: min(90vw, 520px);
  min-height: min(88vh, 680px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  pointer-events: none;
}

#rick-logo {
  position: absolute;
  top: -2.5cm;
  left: 50%;
  transform: translateX(-50%);
  width: min(70vw, 280px);
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

#rick-warning {
  color: #ffeb3b;
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-size: clamp(17px, 3.6vw, 31px);
  font-weight: 800;
  text-shadow: 0 4px 14px rgba(0,0,0,0.6);
  animation: warningPulse 0.8s ease-in-out infinite;
  position: absolute;
  bottom: 1cm;
  left: 0;
  right: 0;
  transform: none;
  text-align: center;
  z-index: 2;
  white-space: nowrap;
}

@keyframes warningPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.86; }
}

#rick-video {
  width: 100%;
  margin-top: 82px;
  border-radius: 12px;
  border: 3px solid rgba(255,255,255,0.45);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  cursor: pointer;
  pointer-events: none;
}

#version-text {
  font-size: 14px;
  line-height: 1.55;
  color: #333;
  margin-bottom: 14px;
}

.mulligan-choice {
  min-width: 96px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: #9e9e9e;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

#mulligan-modal .btn-group {
  display: flex;
  gap: 0;
  justify-content: space-between;
  width: 100%;
  padding: 0 28px;
}

#mulligan-modal .modal-content {
  max-width: 460px;
}

.mulligan-choice:hover,
.mulligan-choice:focus-visible,
.mulligan-choice.selected {
  transform: scale(1.1);
  background: #ff8c00;
  outline: none;
}

#share-preview {
  background: #f0f8f0;
  border: 2px solid #2d8a4e;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

#share-hole {
  font-size: 13px;
  color: #888;
  margin-bottom: 6px;
}

#share-rule {
  font-size: 17px;
  font-weight: 700;
  color: #222;
}

#btn-close-share {
  margin-top: 10px;
  border: none;
  background: rgba(0,0,0,0.08);
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-height: 700px) {
  #app {
    height: 100vh;
    border-radius: 0;
  }
  #main-title {
    font-size: 40px;
  }
  #logo-icon {
    font-size: 48px;
  }
  #logo-container {
    margin-bottom: 16px;
    margin-top: -20px;
  }
  #menu-column {
    gap: 10px;
    width: auto;
  }
  .menu-image-btn img {
    width: 174px;
  }
  .btn-lg {
    padding: 12px 24px;
    font-size: 17px;
  }
}

@media (max-width: 420px) {
  #app {
    width: 100vw;
    border-radius: 0;
  }
}
