/* CSS Variables */
:root {
  --gold: #F5D148;
  --green-submit: #4CAF50;
  --red-reset: #f44336;
  --off-white: #FAF9F6;
  --light-gray: #f5f5f5;
}

/* Global Styles */
* {
  font-family: 'Playfair Display', Georgia, serif;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background-color: #1a472a;
}

/* Text Colors */
.text-gold {
  color: var(--gold);
}

/* Splash Screen Buttons */
.splash-btn {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  border: none;
  transition: transform 0.1s, box-shadow 0.1s;
}

.splash-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.continue-btn {
  background-color: var(--off-white);
  color: black;
}

.new-game-btn {
  background-color: var(--gold);
  color: black;
}

/* Team Selection Buttons */
.team-btn {
  background-color: var(--off-white);
  border: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  transition: all 0.15s;
}

.team-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.team-btn.selected {
  background-color: var(--gold);
}

/* Suit Buttons */
.suit-btn {
  background-color: var(--off-white);
  border: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
  transition: all 0.15s;
}

.suit-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.suit-btn.selected {
  background-color: var(--gold);
}

/* Submit Button (Green) */
.submit-btn {
  background-color: var(--green-submit);
  border: 2px solid #3d8b40;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s, box-shadow 0.1s;
}

.submit-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Scoring Button (Gold) */
.scoring-btn {
  background-color: var(--gold);
  color: black;
  border: 2px solid #a68520;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s, box-shadow 0.1s;
}

.scoring-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Reset Button (Red) */
.reset-btn {
  background-color: var(--red-reset);
  border: 2px solid #c62828;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s, box-shadow 0.1s;
}

.reset-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Wood Grain Buttons */
.wood-btn {
  background: url('./assets/wood_grain.png') center/cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  border: 2px solid #8b6914;
  transition: transform 0.1s, box-shadow 0.1s;
}

.wood-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Labels */
.label {
  margin-top: 0;
  margin-bottom: 0;
}

/* Score Display */
.score {
  font-size: 2.25rem;
}

.team-name {
  font-size: 1.5rem;
}

/* Bid Info Card - styled like a playing card */
.bid-info-card {
  background-color: var(--off-white);
  border: 3px solid var(--gold);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.bid-info-card .text-green-500 {
  color: var(--gold);
}

/* Sliders */
.slider {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  height: 40px;
  touch-action: none;
}

.slider::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold) var(--value, 0%), #ddd var(--value, 0%), #ddd 100%);
  border-radius: 2px;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--gold);
  border-radius: 50%;
  margin-top: -10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-track {
  height: 4px;
  background: #ddd;
  border-radius: 2px;
}

.slider::-moz-range-progress {
  height: 4px;
  background: var(--gold);
  border-radius: 2px;
}

.slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--gold);
  border-radius: 50%;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* History Cards */
.history-card {
  transition: transform 0.1s;
}

.history-card:last-child {
  margin-bottom: 0;
}

/* Modal styling */
.modal-content {
  font-family: 'Baristo', serif;
}

/* Toast animation */
#toast {
  transition: opacity 0.3s ease-in-out;
}

#toast.show {
  opacity: 1;
}

#toast.hide {
  opacity: 0;
}

/* All screens fill viewport */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #1a472a;
  background-image: url('./assets/felt.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.screen.hidden {
  display: none !important;
}

/* Splash screen - solid background with card */
#splash-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #1a472a;
  background-image: none;
}

.splash-card {
  background-color: #1a472a;
  background-image: url('./assets/felt.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 4px solid var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Game screen layout - one poker table surface */
#game-screen {
  display: flex;
  flex-direction: column;
  background-color: #1a472a;
  background-image: url('./assets/felt.jpg');
  background-size: cover;
  background-position: center;
  border: 4px solid var(--gold);
}

#game-screen header {
  flex: 0 0 auto;
  border-bottom: 2px solid rgba(245, 209, 72, 0.3);
}

#game-screen main {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}


#game-screen footer {
  flex: 0 0 auto;
  border-top: 2px solid rgba(245, 209, 72, 0.3);
}

/* Prevent text selection on buttons */
button {
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Custom scrollbar for history modal */
#history-content {
  scrollbar-width: thin;
  scrollbar-color: var(--gold) #e5e5e5;
}

#history-content::-webkit-scrollbar {
  width: 8px;
}

#history-content::-webkit-scrollbar-track {
  background: #e5e5e5;
  border-radius: 4px;
}

#history-content::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 4px;
}

#history-content::-webkit-scrollbar-thumb:hover {
  background: #d4b83d;
}
