/* DoodleCharades Custom Styles - Gamified Design */

/* ============================================
   MODERN COLOR PALETTE - Vibrant & Playful
   ============================================ */
:root {
  /* Primary Colors - Vibrant Blue/Teal */
  --color-primary: #4A90E2;
  --color-primary-dark: #357ABD;
  --color-primary-light: #6BA3E8;
  
  /* Secondary Colors - Orange/Teal Accents */
  --color-secondary: #FF6B6B;
  --color-accent: #4ECDC4;
  --color-accent-2: #FFA07A;
  
  /* Success/Game Colors */
  --color-success: #51CF66;
  --color-warning: #FFD93D;
  --color-danger: #FF6B6B;
  
  /* Background Colors */
  --color-bg-primary: #F8F9FA;
  --color-bg-secondary: #FFFFFF;
  --color-bg-dark: #2C3E50;
  
  /* Text Colors */
  --color-text-primary: #2C3E50;
  --color-text-secondary: #6C757D;
  --color-text-light: #FFFFFF;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.25);
}

html {
  font-size: 14px;
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
}

/* ============================================
   ANIMATED BACKGROUND - Desktop Only
   ============================================ */
@media (min-width: 992px) {
  body {
    background: linear-gradient(135deg, #667eea 0%, #6b7ee8 25%, #7368e4 50%, #7a62e0 75%, #764ba2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
  }
  
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
      radial-gradient(circle at 20% 50%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
      radial-gradient(circle at 80% 80%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
      radial-gradient(circle at 40% 20%, rgba(78, 205, 196, 0.1) 0%, transparent 50%);
    background-size: 200% 200%;
    animation: patternMove 20s ease infinite;
    pointer-events: none;
    z-index: 0;
  }
  
  body > * {
    position: relative;
    z-index: 1;
  }
  
  @keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  
  @keyframes patternMove {
    0%, 100% { background-position: 0% 0%, 100% 100%, 50% 50%; }
    50% { background-position: 100% 100%, 0% 0%, 0% 100%; }
  }
}

/* Mobile Background - Simple & Clean */
@media (max-width: 991px) {
  body {
    background: var(--color-bg-primary);
  }
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* ============================================
   LANDING PAGE - Gamified Hero Section
   ============================================ */
.landing-hero {
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

@media (min-width: 992px) {
  .landing-hero {
    padding: 120px 20px;
    min-height: 60vh;
    display: flex;
    align-items: center;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  color: var(--color-text-light);
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
  animation: heroFadeIn 1s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (min-width: 992px) {
  .hero-title {
    font-size: 5rem;
    margin-bottom: 2rem;
  }
}

.hero-icon {
  font-size: 4rem;
  animation: bounce 2s ease-in-out infinite;
  display: inline-block;
}

@media (min-width: 992px) {
  .hero-icon {
    font-size: 5.5rem;
  }
}

.hero-text {
  background: linear-gradient(135deg, #FFD93D, #FF6B6B, #4ECDC4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 3s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientText {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-tagline {
  font-size: 1.5rem;
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  animation: heroFadeIn 1s ease-out 0.3s both;
}

@media (min-width: 992px) {
  .hero-tagline {
    font-size: 2rem;
    margin-bottom: 3rem;
  }
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: heroFadeIn 1s ease-out 0.6s both;
}

.btn-hero {
  padding: 16px 32px;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 992px) {
  .btn-hero {
    padding: 18px 40px;
    font-size: 1.3rem;
  }
}

.btn-hero:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-xl);
}

/* ============================================
   GAME BUTTONS - Modern Styling
   ============================================ */
.btn-game-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: var(--color-text-light);
  border: none;
}

.btn-game-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: var(--color-text-light);
}

.btn-game-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-text-light);
  border: 2px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
}

.btn-game-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  color: var(--color-text-light);
  border-color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   HOW TO PLAY - Visual Steps
   ============================================ */
.steps-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 992px) {
  .steps-container {
    gap: 2rem;
    margin: 3rem 0;
  }
}

.step-card {
  background: var(--color-bg-secondary);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  flex: 0 0 auto;
  min-width: 150px;
  max-width: 200px;
}

@media (min-width: 992px) {
  .step-card {
    padding: 2.5rem 2rem;
    min-width: 180px;
  }
  
  .step-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: var(--shadow-xl);
  }
}

.step-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  animation: stepIconBounce 2s ease-in-out infinite;
}

@media (min-width: 992px) {
  .step-icon {
    font-size: 4rem;
  }
}

@keyframes stepIconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.step-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin: 0;
}

.step-arrow {
  font-size: 2rem;
  color: var(--color-primary);
  font-weight: bold;
  display: none;
}

@media (min-width: 992px) {
  .step-arrow {
    display: block;
    animation: arrowPulse 2s ease-in-out infinite;
  }
}

@keyframes arrowPulse {
  0%, 100% { opacity: 0.6; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(5px); }
}

/* ============================================
   FEATURE CARDS - Icon Grid
   ============================================ */
.feature-card {
  background: var(--color-bg-secondary);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  height: 100%;
  border: 3px solid transparent;
}

@media (min-width: 992px) {
  .feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary);
  }
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 2rem;
  text-align: center;
}

@media (min-width: 992px) {
  .section-title {
    font-size: 3rem;
    margin-bottom: 3rem;
  }
}

/* ============================================
   CTA CARD
   ============================================ */
.cta-card {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 30px;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--color-text-light);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

@media (min-width: 992px) {
  .cta-card {
    padding: 5rem 3rem;
  }
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: ctaShine 3s ease-in-out infinite;
}

@keyframes ctaShine {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}

.cta-card h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

@media (min-width: 992px) {
  .cta-card h2 {
    font-size: 3.5rem;
  }
}

.cta-card p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

@media (min-width: 992px) {
  .cta-card p {
    font-size: 1.5rem;
    margin-bottom: 3rem;
  }
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.cta-card .btn {
  background: var(--color-bg-secondary);
  color: var(--color-primary);
  border: none;
  font-weight: 700;
}

.cta-card .btn:hover {
  background: var(--color-bg-secondary);
  color: var(--color-primary-dark);
  transform: translateY(-4px) scale(1.05);
}

/* ============================================
   SEO CONTENT SECTION
   ============================================ */
.seo-content-section {
  background: var(--color-bg-primary);
  padding: 3rem 0;
}

@media (min-width: 992px) {
  .seo-content-section {
    padding: 4rem 0;
  }
}

.seo-card {
  background: var(--color-bg-secondary);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  height: 100%;
  border-top: 4px solid var(--color-primary);
}

@media (min-width: 992px) {
  .seo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
  }
}

.seo-icon {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.seo-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

.seo-card p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

.seo-text-card {
  background: var(--color-bg-secondary);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

@media (min-width: 992px) {
  .seo-text-card {
    padding: 3rem;
  }
}

.seo-text-card h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
}

.seo-text-card p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.faq-container .accordion-item {
  border-radius: 15px;
  margin-bottom: 1rem;
  border: none;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-container .accordion-button {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  font-weight: 600;
  border: none;
  padding: 1.25rem 1.5rem;
}

.faq-container .accordion-button:not(.collapsed) {
  background: var(--color-primary);
  color: var(--color-text-light);
}

.faq-container .accordion-body {
  background: var(--color-bg-secondary);
  padding: 1.5rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--color-primary);
}

/* ============================================
   NAVBAR - Gamified Styling
   ============================================ */
.navbar {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)) !important;
  box-shadow: var(--shadow-md);
  border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text-light) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

@media (min-width: 992px) {
  .navbar-brand:hover {
    transform: scale(1.05);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  }
}

.navbar-brand i {
  color: var(--color-warning);
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

/* ============================================
   GAME-SPECIFIC STYLES (Preserved)
   ============================================ */
.game-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #6b7ee8 25%, #7368e4 50%, #7a62e0 75%, #764ba2 100%);
}

.card {
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: none;
}

.card-header {
  border-radius: 15px 15px 0 0 !important;
  border: none;
}

.player-icon {
  font-size: 1.5rem;
  display: inline-block;
  animation: bounce 2s infinite;
}

/* Compact player card styles */
.player-card.compact {
  padding: 0.4rem 0.6rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
}

.player-card.compact.top-player {
  background-color: #fff3cd;
  border-color: #ffc107;
}

.player-card.compact.guessed-correctly {
  border-color: #28a745 !important;
  border-width: 3px !important;
  border-style: solid !important;
  box-shadow: 0 0 0 1px rgba(40, 167, 69, 0.3), 0 0 8px rgba(40, 167, 69, 0.2);
  position: relative;
}

.player-card.compact.guessed-correctly.top-player {
  border-color: #28a745 !important;
  border-width: 3px !important;
  border-style: solid !important;
  box-shadow: 0 0 0 1px rgba(40, 167, 69, 0.3), 0 0 8px rgba(40, 167, 69, 0.2);
  position: relative;
}

/* Small tick icon in corner for correct guessers */
.player-card.compact.guessed-correctly::after {
  content: '✓';
  position: absolute;
  top: 2px;
  right: 4px;
  color: #28a745;
  font-size: 0.7rem;
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 10;
}

.player-card.compact .player-icon {
  font-size: 1.2rem;
}

.player-card.compact .compact-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-badge-compact {
  font-size: 0.75rem !important;
  padding: 0.25rem 0.5rem !important;
}

.position-badge-compact {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
}

.admin-badge-compact {
  font-size: 0.65rem;
  padding: 0.15rem 0.35rem;
}

.player-icon.offline {
  animation: none;
  opacity: 0.5;
  filter: grayscale(100%);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Drawing canvas styles */
.canvas-container {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

#drawingCanvas, #viewingCanvas {
  display: block;
  background: white;
  border-radius: 10px;
  /* DO NOT set width/height here - JavaScript controls exact pixel dimensions */
  /* CSS scaling causes coordinate mismatch between cursor and drawing */
  /* Remove width: 100% and aspect-ratio to prevent CSS scaling */
}

.drawing-tools {
  background: linear-gradient(45deg, #f8f9fa, #e9ecef);
  border-radius: 10px 10px 0 0;
}

/* Chat/Guesses styles */
#guessesList {
  background: #f8f9fa;
  border-radius: 10px;
  min-height: 200px;
}

.guess-item {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Timer styles */
#timerDisplay {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Button styles */
.btn {
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-lg {
  padding: 12px 30px;
  font-size: 1.1rem;
}

/* Form styles */
.form-control {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Modal styles */
.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  border-radius: 15px 15px 0 0;
  border: none;
}

/* Loading animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   MOBILE RESPONSIVE STYLES - Landing Page
   ============================================ */
@media (max-width: 991px) {
  /* Mobile Hero Adjustments */
  .landing-hero {
    padding: 60px 20px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-icon {
    font-size: 3rem;
  }
  
  .hero-tagline {
    font-size: 1.2rem;
  }
  
  .btn-hero {
    padding: 14px 28px;
    font-size: 1.1rem;
    width: 100%;
    max-width: 280px;
  }
  
  /* Mobile Steps - Stack Vertically */
  .steps-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .step-arrow {
    transform: rotate(90deg);
    display: block;
    font-size: 1.5rem;
  }
  
  .step-card {
    width: 100%;
    max-width: 100%;
    min-width: auto;
  }
  
  /* Mobile Feature Cards */
  .feature-card {
    margin-bottom: 1rem;
  }
  
  /* Mobile CTA */
  .cta-card {
    padding: 3rem 1.5rem;
  }
  
  .cta-card h2 {
    font-size: 2rem;
  }
  
  .cta-card p {
    font-size: 1.1rem;
  }
  
  .cta-buttons {
    flex-direction: column;
  }
  
  .cta-buttons .btn {
    width: 100%;
    max-width: 280px;
  }
  
  /* Mobile Section Titles */
  .section-title {
    font-size: 2rem;
  }
  
  /* Mobile SEO Cards */
  .seo-card {
    margin-bottom: 1rem;
  }
  
  .seo-text-card {
    padding: 1.5rem;
  }
  
  .seo-text-card h2 {
    font-size: 1.5rem;
  }
}

/* ============================================
   MOBILE RESPONSIVE STYLES - Game Pages
   ============================================ */
@media (max-width: 768px) {
  .card-body {
    padding: 1rem;
  }
  
  .drawing-tools {
    padding: 0.5rem;
  }
  
  .drawing-tools .row {
    margin: 0;
  }
  
  .drawing-tools .col-md-3 {
    padding: 0.25rem;
    margin-bottom: 0.5rem;
  }
  
  .canvas-container {
    max-width: 100%;
  }
  
  #drawingCanvas, #viewingCanvas {
    max-height: 400px;
    aspect-ratio: 1/1;
  }
}

@media (max-width: 576px) {
  /* Extra Small Mobile - Game Canvas */
  .canvas-container {
    margin: 0 -0.5rem;
  }
  
  #drawingCanvas, #viewingCanvas {
    max-height: 300px;
    border-radius: 0;
  }
  
  .drawing-tools .col-md-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  /* Extra Small Mobile - Landing Page */
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-icon {
    font-size: 2.5rem;
  }
  
  .hero-tagline {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .step-card {
    padding: 1.5rem 1rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .cta-card {
    padding: 2rem 1rem;
  }
  
  .cta-card h2 {
    font-size: 1.75rem;
  }
}

/* Game status indicators */
.status-online {
  color: #28a745;
}

.status-offline {
  color: #dc3545;
}

.status-drawing {
  background: linear-gradient(45deg, #ffc107, #ff8c00);
  color: #000;
  font-weight: bold;
}

/* Word selection modal */
.word-option {
  padding: 15px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  background: white;
  transition: all 0.3s ease;
  cursor: pointer;
}

.word-option:hover {
  border-color: #667eea;
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Layout improvements */
.flex-grow-1 {
  flex-grow: 1;
}

/* Footer */
.footer {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: none;
  color: white;
  margin-top: auto;
}

/* Footer on landing page - override bg-light */
.footer.bg-light {
  background-color: #f8f9fa !important;
  color: #6c757d !important;
}

/* Ensure main content expands to push footer down on landing page */
body > div.d-flex.flex-column.min-vh-100 > div.flex-grow-1 {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0;
}

body > div.d-flex.flex-column.min-vh-100 > div.flex-grow-1 > main {
  flex-grow: 1 !important;
  min-height: 0;
}

/* Force footer to bottom on landing page */
body > div.d-flex.flex-column.min-vh-100 > footer.mt-auto {
  position: relative !important;
  margin-top: auto !important;
  flex-shrink: 0;
}

/* Game Complete Screen Styles */
.game-complete-container {
  padding: 2rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #6b7ee8 25%, #7368e4 50%, #7a62e0 75%, #764ba2 100%);
  border-radius: 15px;
  color: white;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.winner-celebration {
  margin-bottom: 3rem;
}

.trophy-animation {
  margin-bottom: 2rem;
}

.trophy-icon {
  font-size: 5rem;
  color: #ffd700;
  animation: trophy-bounce 2s ease-in-out infinite;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.winner-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.winner-announcement {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem 0;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.winner-name {
  font-size: 2.5rem;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.5rem;
}

.winner-subtitle {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.winner-score {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 1.2rem;
}

.score-label {
  opacity: 0.8;
}

.score-value {
  font-size: 2rem;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.scoreboard-container {
  margin: 2rem 0;
}

.scoreboard-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #ffd700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.scoreboard {
  max-width: 500px;
  margin: 0 auto;
}

.scoreboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.scoreboard-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

.scoreboard-item:first-child {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #333;
  border: 2px solid #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.player-rank {
  font-size: 1.5rem;
  min-width: 3rem;
  text-align: center;
}

.rank-number {
  font-weight: bold;
  font-size: 1.2rem;
}

.player-info {
  flex: 1;
  text-align: left;
  margin: 0 1rem;
}

.player-name {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

/* Compact name style for grid layout */
.compact-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.player-score {
  font-size: 1rem;
  opacity: 0.8;
}

.player-position {
  font-size: 1.5rem;
  min-width: 2rem;
  text-align: center;
}

.game-actions {
  margin-top: 2rem;
}

.game-actions .btn {
  border-radius: 25px;
  padding: 0.75rem 2rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

.game-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes trophy-bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  10% {
    transform: translateY(-10px) rotate(-5deg);
  }
  30% {
    transform: translateY(-5px) rotate(3deg);
  }
  40% {
    transform: translateY(-8px) rotate(-2deg);
  }
  60% {
    transform: translateY(-3px) rotate(1deg);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in {
  animation: fade-in 1s ease-out;
}

.animate-slide-up {
  animation: slide-up 1s ease-out 0.5s both;
}

.animate-fade-in-delay {
  animation: fade-in 1s ease-out 1s both;
}

.animate-fade-in-delay-2 {
  animation: fade-in 1s ease-out 1.5s both;
}

.animate-slide-in {
  animation: slide-in 0.6s ease-out both;
}

/* Responsive Design */
@media (max-width: 768px) {
  .game-complete-container {
    padding: 1rem;
  }
  
  .winner-title {
    font-size: 2rem;
  }
  
  .winner-name {
    font-size: 2rem;
  }
  
  .trophy-icon {
    font-size: 3rem;
  }
  
  .scoreboard-item {
    padding: 0.75rem 1rem;
  }
  
  .player-name {
    font-size: 1rem;
  }
  
  .game-actions .btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Score Update Animations */
.score-update-animation {
  animation: scoreFlash 0.5s ease-in-out;
  background-color: rgba(40, 167, 69, 0.1);
  border-radius: 8px;
  padding: 0.5rem;
  margin: -0.5rem;
}

@keyframes scoreFlash {
  0%, 100% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(40, 167, 69, 0.3);
  }
}

.score-increase-indicator {
  color: #28a745;
  font-weight: bold;
  font-size: 1.2rem;
  animation: scorePopIn 0.5s ease-out;
}

@keyframes scorePopIn {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.5);
  }
  50% {
    transform: translateY(-5px) scale(1.2);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.score-badge {
  transition: all 0.3s ease;
}

.player-row {
  transition: all 0.3s ease;
}

/* Guess announcements */
.guess-announcements {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 0;
  padding: 0.25rem;
}

#guessAnnouncementsCard {
  transition: all 0.2s ease;
  margin-bottom: 0.5rem !important;
  margin-top: 0 !important;
  padding: 0 !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#guessAnnouncementsCard .card-header {
  padding-top: 0.375rem !important;
  padding-bottom: 0.375rem !important;
  margin-bottom: 0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

#guessAnnouncementsCard .card-header h6 {
  font-size: 0.875rem;
  margin: 0;
}

#guessAnnouncementsCard .card-body {
  padding: 0 !important;
  margin: 0 !important;
}

.guess-announcement {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-left: 4px solid transparent;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.guess-announcement.show {
  opacity: 1;
  transform: translateY(0);
}

.guess-announcement.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

.guess-announcement.correct,
.guess-announcement.guess-correct {
  border-left-color: #198754;
  background: #ecf9f1;
  color: #0f5132;
}

.guess-announcement.incorrect,
.guess-announcement.guess-incorrect {
  border-left-color: #dc3545;
  background: #fdf0f0;
  color: #842029;
}

.guess-announcement.guess-clue-request {
  border-left-color: #0dcaf0;
  background: rgba(13, 202, 240, 0.15);
}

.guess-announcement-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.guess-announcement-player {
  font-size: 0.875rem;
}

.guess-announcement-status {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.guess-announcement-body {
  font-size: 0.85rem;
  line-height: 1.25;
}

.guess-announcement-word {
  font-weight: 600;
}

.guess-announcement-correct-word {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0.2rem;
}

/* Revealed letter styling for extra clues */
.revealed-letter {
  background-color: rgba(0, 123, 255, 0.2);
  color: #0056b3;
  font-weight: bold;
  padding: 2px 4px;
  border-radius: 3px;
  display: inline-block;
}

/* Charade type cards - 5 columns on large screens */
@media (min-width: 992px) {
  .charade-type-col {
    flex: 1 1 0;
    min-width: 180px;
  }
  
  /* Reduce gap between cards on large screens */
  .row.g-3 > .charade-type-col {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Reduce padding on charade type cards for better fit */
.charade-type-card .card-body {
  padding: 1.25rem !important;
}

.charade-type-card .card-title {
  font-size: 1.1rem;
  white-space: nowrap;
  margin-bottom: 0.5rem;
}

.charade-type-card .card-text {
  font-size: 0.9rem;
  line-height: 1.3;
}

.charade-type-card .fa-3x {
  font-size: 2.5rem !important;
  margin-bottom: 0.75rem !important;
}