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

body {
  font-family: "system-ui", "Arial", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  color: #333;
  transition: all 0.5s ease;
}

/* Theme Toggle Switch */
.theme-toggle-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  width: 80px;
}

.theme-toggle-switch {
  position: relative;
  width: 80px;
  height: 40px;
  background: linear-gradient(45deg, #4834d4, #686de0);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(72, 52, 212, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.2);
  margin: 0 auto;
}

.theme-toggle-switch:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(72, 52, 212, 0.4);
}

.toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-emoji {
  font-size: 18px;
  transition: all 0.3s ease;
}

.theme-toggle-switch.toggled .toggle-slider {
  transform: translateX(40px);
}

.theme-toggle-switch.toggled {
  background: linear-gradient(45deg, #ff4757, #c44569);
  box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

.theme-toggle-switch.toggled:hover {
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.5);
}

.toggle-labels {
  position: absolute;
  top: -35px;
  width: 120px;
  left: -20px;
  display: flex;
  justify-content: space-between;
  padding: 0 15px;
  pointer-events: none;
}

.toggle-label {
  font-size: 14px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  opacity: 0.7;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.toggle-label.left {
  opacity: 1;
}

.theme-toggle-switch.toggled .toggle-label.left {
  opacity: 0.7;
}

.theme-toggle-switch.toggled .toggle-label.right {
  opacity: 1;
}

h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.title-icon {
  width: 60px;
  height: 60px;
  vertical-align: middle;
}

.game-container {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-width: 800px;
  width: 100%;
}

.controls {
  text-align: center;
  margin-bottom: 30px;
}

.game-btn {
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
  margin: 0 10px 10px;
}

.game-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.help-btn {
  background: linear-gradient(45deg, #4834d4, #686de0);
  box-shadow: 0 5px 15px rgba(72, 52, 212, 0.3);
}

.help-btn:hover {
  box-shadow: 0 8px 25px rgba(72, 52, 212, 0.4);
}

.bingo-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 0 auto;
  max-width: 700px;
}

.bingo-header {
  background: linear-gradient(45deg, #4834d4, #686de0);
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  text-align: center;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(72, 52, 212, 0.3);
}

.bingo-cell {
  background: linear-gradient(145deg, #f8f9fa, #e9ecef);
  border: 3px solid #dee2e6;
  border-radius: 15px;
  padding: 10px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
}

.bingo-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.bingo-cell.marked {
  background: linear-gradient(145deg, #00d2d3, #01a3a4);
  color: white;
  border-color: #01a3a4;
  transform: scale(0.95);
}

.bingo-cell.marked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background-image: url("images/chip.webp");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: checkmark 0.5s ease;
}

@keyframes checkmark {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.3);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.free-space {
  background: linear-gradient(145deg, #ffd700, #ffed4e) !important;
  color: #333 !important;
  border-color: #f39c12;
}

.free-space::before {
  content: "★";
  font-size: 1.5rem;
  color: #e67e22;
}

.free-space.marked {
  color: #333 !important;
}

.free-space.marked::after {
  display: none;
}

.jaygo-theme .free-space::before {
  color: #2c3e50;
}

.win-modal-content {
  background: linear-gradient(45deg, #ff6b6b, #ee5a24) !important;
  color: white;
  text-align: center;
  max-width: 800px;
  min-width: none;
  padding: 40px 60px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  opacity: 0;
  animation: winFadeIn 1.25s ease forwards;
}

.win-modal-content .close {
  color: rgba(255, 255, 255, 0.8);
  font-size: 2rem;
}

.win-modal-content .close:hover,
.win-modal-content .close:focus {
  color: white;
}

.win-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.win-text {
  text-align: center;
  font-size: 3rem;
  font-weight: bold;
}



.win-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.win-text {
  text-align: center;
}

.share-btn {
  background: linear-gradient(45deg, #00d2d3, #01a3a4);
  color: white;
  border: none;
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 210, 211, 0.3);
  margin-top: 20px;
  display: inline-block;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 210, 211, 0.4);
}

.share-option-btn {
  background: linear-gradient(45deg, #4834d4, #686de0);
  color: white;
  border: none;
  padding: 15px 25px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(72, 52, 212, 0.3);
  margin: 10px;
  display: block;
  width: 80%;
  max-width: 250px;
  margin-left: auto;
  margin-right: auto;
}

.share-option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(72, 52, 212, 0.4);
}

.share-option-btn:first-of-type {
  background: linear-gradient(45deg, #00d2d3, #01a3a4);
  box-shadow: 0 5px 15px rgba(0, 210, 211, 0.3);
}

.share-option-btn:first-of-type:hover {
  box-shadow: 0 8px 25px rgba(0, 210, 211, 0.4);
}

.dancing-tay-rex {
  width: 120px;
  height: 120px;
}

.dancing-left {
  animation: teeterLeft 0.8s infinite ease-in-out;
}

.dancing-right {
  animation: teeterRight 0.8s infinite ease-in-out;
}

@keyframes winFadeIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes winShowAnimation {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.confetti {
  position: fixed;
  width: 80px;
  height: 80px;
  background-image: url("images/taylor/potatayto.webp");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  top: -30px;
  animation: confetti-fall 3s linear infinite;
}

.jaygo-theme .confetti {
  background-image: url("images/jason/croc.png");
}

@keyframes confetti-fall {
  to {
    transform: translateY(100vh) rotate(360deg);
  }
}

@keyframes teeterLeft {

  0%,
  100% {
    transform: rotate(-15deg);
  }

  50% {
    transform: rotate(15deg);
  }
}

@keyframes teeterRight {

  0%,
  100% {
    transform: rotate(15deg);
  }

  50% {
    transform: rotate(-15deg);
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 30px;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
  overflow-y: auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover,
.close:focus {
  color: #ff6b6b;
}

.modal h2 {
  color: #4834d4;
  margin-bottom: 20px;
  font-size: 2rem;
  text-align: center;
}

.modal h3 {
  color: #333;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.modal p,
.modal ul {
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
}

.modal ul {
  padding-left: 20px;
}

.modal li {
  margin-bottom: 8px;
}

.highlight {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}

.form-input {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #4834d4;
  box-shadow: 0 0 0 3px rgba(72, 52, 212, 0.1);
}

.form-submit {
  text-align: center;
}

.form-disclaimer {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  line-height: 1.4;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}

.form-input {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #4834d4;
  box-shadow: 0 0 0 3px rgba(72, 52, 212, 0.1);
}

.form-submit {
  text-align: center;
}

.form-disclaimer {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  line-height: 1.4;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  font-weight: normal;
  color: #333;
}

.radio-label:hover {
  background-color: #f8f9fa;
}

.radio-input {
  margin: 0;
  margin-right: 10px;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ddd;
  border-radius: 50%;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.radio-input:checked {
  border-color: #4834d4;
  background-color: #4834d4;
}

.radio-input:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: white;
}

.radio-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(72, 52, 212, 0.1);
}

.radio-custom {
  display: none;
}

.error-message {
  color: #e74c3c;
  font-size: 0.9rem;
  margin-top: 5px;
  font-weight: normal;
  animation: errorShake 0.5s ease;
}

@keyframes errorShake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

.footer {
  margin-top: 40px;
  padding: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  max-width: 800px;
  width: 100%;
}

.footer p {
  color: white;
  font-size: 1rem;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.footer a {
  color: #ffd700;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #ffed4e;
  text-decoration: underline;
}

@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }

  body {
    padding: 5px;
  }

  .game-container {
    padding: 5px;
  }

  .game-btn {
    padding: 10px 20px;
    font-size: 1rem;
    margin: 0 5px 10px;
    display: inline-block;
  }

  .bingo-board {
    gap: 5px;
  }

  .bingo-cell {
    padding: 5px;
    font-size: 0.65rem;
    min-height: 60px;
  }

  .bingo-header {
    font-size: 1.2rem;
    padding: 10px;
  }

  .win-message {
    font-size: 2rem;
  }
}

@media (max-width: 425px) {
  .win-message {
    padding: 20px 30px;
    font-size: 2rem;
  }

  .win-content {
    gap: 15px;
  }

  .dancing-tay-rex {
    width: 80px;
    height: 80px;
  }

  .bingo-cell {
    font-size: 0.65rem;
  }
}

@media (max-width: 375px) {
  .bingo-cell {
    font-size: 0.5rem;
  }

  .win-modal-content {
    max-width: 90%;
    padding: 30px 40px;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .win-text {
    font-size: 2rem;
  }

  .dancing-tay-rex {
    width: 60px;
    height: 60px;
  }

  .theme-toggle-container {
    top: 40px;
    left: 10px;
    width: 100px;
  }

  .theme-toggle-switch {
    width: 60px;
    height: 30px;
  }

  .toggle-slider {
    width: 24px;
    height: 24px;
    top: 1px;
    left: 1px;
  }

  .toggle-emoji {
    font-size: 14px;
  }

  .theme-toggle-switch.toggled .toggle-slider {
    transform: translateX(29px);
  }

  .toggle-labels {
    top: -30px;
    width: 100px;
    left: -20px;
    padding: 0 10px;
  }

  .toggle-label {
    font-size: 12px;
  }
}

/* Jaygo Dark Theme */
body.jaygo-theme {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #e0e0e0;
}

.jaygo-theme .game-container {
  background: linear-gradient(145deg, #2d2d44, #1e1e2e);
  border: 2px solid #404040;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.jaygo-theme .game-btn {
  background: linear-gradient(45deg, #ff4757, #c44569);
  box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

.jaygo-theme .game-btn:hover {
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.5);
}

.jaygo-theme .help-btn {
  background: linear-gradient(45deg, #3742fa, #2f3542);
  box-shadow: 0 5px 15px rgba(55, 66, 250, 0.4);
}

.jaygo-theme .help-btn:hover {
  box-shadow: 0 8px 25px rgba(55, 66, 250, 0.5);
}

.jaygo-theme .bingo-header {
  background: linear-gradient(45deg, #3742fa, #57606f);
  box-shadow: 0 5px 15px rgba(55, 66, 250, 0.4);
}

.jaygo-theme .bingo-cell {
  background: linear-gradient(145deg, #404040, #2d2d44);
  border: 3px solid #555;
  color: #e0e0e0;
}

.jaygo-theme .bingo-cell:hover {
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

.jaygo-theme .bingo-cell.marked {
  background: linear-gradient(145deg, #ff6348, #ff4757);
  color: white;
  border-color: #ff4757;
}

.jaygo-theme .free-space {
  background: linear-gradient(145deg, #ffa502, #ff6348) !important;
  color: #2c3e50 !important;
  border-color: #ff6348;
}

.jaygo-theme .free-space.marked {
  color: #2c3e50 !important;
}

.jaygo-theme .win-modal-content {
  background: linear-gradient(45deg, #ff4757, #c44569) !important;
}

.jaygo-theme .share-btn {
  background: linear-gradient(45deg, #ff6348, #ff4757);
  box-shadow: 0 5px 15px rgba(255, 99, 72, 0.4);
}

.jaygo-theme .share-btn:hover {
  box-shadow: 0 8px 25px rgba(255, 99, 72, 0.5);
}

.jaygo-theme .theme-toggle-switch {
  background: linear-gradient(45deg, #ff4757, #c44569);
  box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

.jaygo-theme .theme-toggle-switch:hover {
  box-shadow: 0 8px 25px rgba(255, 71, 87, 0.5);
}

.jaygo-theme .theme-toggle-switch.toggled {
  background: linear-gradient(45deg, #ff4757, #c44569);
}

.jaygo-theme .modal-content {
  background: linear-gradient(145deg, #2d2d44, #1e1e2e);
  border: 2px solid #404040;
  color: #e0e0e0;
}

.jaygo-theme .modal h2 {
  color: #ff6348;
}

.jaygo-theme .modal h3 {
  color: #e0e0e0;
}

.jaygo-theme .modal p,
.jaygo-theme .modal ul {
  color: #b0b0b0;
}

.jaygo-theme .form-input {
  background: #404040;
  border: 2px solid #555;
  color: #e0e0e0;
}

.jaygo-theme .form-input:focus {
  border-color: #ff6348;
  box-shadow: 0 0 0 3px rgba(255, 99, 72, 0.2);
}

.jaygo-theme .form-label {
  color: #e0e0e0;
}

.jaygo-theme .radio-label {
  color: #e0e0e0;
}

.jaygo-theme .radio-label:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.jaygo-theme .radio-input {
  border: 2px solid #555;
  background-color: #404040;
}

.jaygo-theme .radio-input:checked {
  border-color: #ff6348;
  background-color: #ff6348;
}

.jaygo-theme .radio-input:focus {
  box-shadow: 0 0 0 3px rgba(255, 99, 72, 0.2);
}

.jaygo-theme .close:hover,
.jaygo-theme .close:focus {
  color: #ff6348;
}

.jaygo-theme .footer {
  background: rgba(45, 45, 68, 0.3);
}

.jaygo-theme .footer a {
  color: #ff6348;
}

.jaygo-theme .footer a:hover {
  color: #ffa502;
}