/* ABOUTME: Admin-specific styles for pack preview functionality
   ABOUTME: Improves layout and visual presentation of pack preview in admin forms */

/* Admin pack preview container */
.pack-preview-background {
  background-image: url(/images/silver-bg.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Admin pack preview specific styling */
.admin-pack-preview {
  transform: scale(0.8);
  margin: 20px 0;
  transition: all 0.3s ease;
}

.admin-pack-preview:hover {
  transform: scale(0.85) !important;
  background: rgba(255, 255, 255, 0.15) !important;
}

/* Preview container layout */
#pack-preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
}

/* Preview text styling */
.pack-preview-background p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 20px;
  font-weight: 500;
}

/* Ensure preview card is properly centered */
.pack-preview-background .card-pack {
  position: relative;
  z-index: 1;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .pack-preview-background {
    min-height: 250px;
  }
  
  .admin-pack-preview {
    transform: scale(0.7);
  }
  
  .admin-pack-preview:hover {
    transform: scale(0.75) !important;
  }
}

/* Form layout improvements */
.grid.grid-cols-1.md\\:grid-cols-2 {
  gap: 2rem;
}

/* Preview section spacing */
.mt-8.pt-8.border-t {
  margin-top: 3rem;
  padding-top: 2rem;
}

/* Ensure preview updates smoothly */
.card-pack-title,
.card-pack-subtitle,
.card-pack-image {
  transition: all 0.2s ease;
}

/* Loading state for image preview */
.card-pack-image[src=""] {
  opacity: 0.5;
}

.card-pack-image:not([src=""]) {
  opacity: 1;
}
/* 
* ==============================================
* FONT DEFINITIONS
* ==============================================
*/

@font-face {
  font-family: 'Supreme LL';
  src: url(/fonts/SupremeLL-Book.otf) format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Supreme LL Jumbo';
  src: url(/fonts/SupremeLL-Jumbo.otf) format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
/* 
* ==============================================
* GLOBAL STYLES & RESETS
* ==============================================
*/

html, body {
  overscroll-behavior: none;
  touch-action: manipulation;
  margin: 0;
}

/* Prevent text selection across the entire site */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body ::-webkit-scrollbar {
  display: none;
}

@media screen and (max-width: 768px) {
  html, body {
    background-color: transparent !important;
  }
}

/* Special styles for standalone mode - positioning moved to mobile files */
@media screen and (display-mode: standalone) {
  html, body {
    background-color: #d4d4d4 !important; /* Match the background color with the static background */
  }
}

/* Basic safe area handling */
@supports (padding: env(safe-area-inset-left)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* iOS standalone class for body - moved to mobile/ios.css */

/* Desktop background settings */
@media screen and (min-width: 768px) {
  /* Ensure background fills entire screen */
  .background-image {
    background-color: transparent !important;
    height: 100vh !important;
    width: 100vw !important;
    opacity: 0.5 !important;
  }
  
  /* Improve image sizing and positioning */
  #background-image {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
  }
}

/* Remove any dark overlays from main containers */
body, 
html, 
#game-view, 
.card-stack-container {
  background-color: transparent !important;
}
/* ABOUTME: Centralized z-index management for all DOM elements in the Monikers game */
/* ABOUTME: Organized in layers from background (-10) to highest overlays (1000) for confetti and effects */

/* 
* ==============================================
* Z-INDEX LAYER SYSTEM
* ==============================================
* 
* This file defines all z-index values used throughout the application
* to ensure proper layering and avoid conflicts, especially for confetti effects.
* 
* LAYER STRUCTURE:
* -10 to -1:   Background elements (images, videos)
* 0 to 9:      Base game elements (flash effects, basic containers, card effects)
* 10 to 19:    Game content (cards, navigation, counters)
* 20 to 29:    UI controls (buttons, timers)
* 30 to 49:    Modal content and overlays
* 50 to 99:    High-priority overlays (game start, round intro)
* 100 to 999:  Reserved for future use
* 1000+:       Special UI elements (pack footer)
*/

/* CSS Custom Properties for Z-Index Values */
:root {
  /* Background Layer (-10 to -1) */
  --z-background-image: -1;
  --z-background-video: -1;
  
  /* Base Layer (0 to 9) */
  --z-background-flash: 0;
  --z-base-container: 1;
  --z-card-stack-base: 2;
  
  /* Content Layer (10 to 19) */
  --z-card-stack: 10;
  --z-card-counter: 10;
  --z-navigation: 10;
  --z-card-effects: 1; 
  --z-debug-notification: 15;
  
  /* UI Controls Layer (20 to 29) */
  --z-round-header: 20;
  --z-pass-deck-overlay: 20;
  --z-action-buttons: 25;
  
  /* Modal Layer (30 to 49) */
  --z-settings-modal: 40;
  --z-turn-end-overlay: 45;
  
  /* High Priority Overlays (50 to 99) */
  --z-game-start-overlay: 50;
  --z-round-intro-overlay: 50;
  --z-round-end-overlay: 50;
  --z-pause-overlay: 50;
  
  --z-pack-footer: 1000;
}

/* 
* ==============================================
* UTILITY CLASSES
* ==============================================
*/

/* Background layers */
.z-background-image { z-index: var(--z-background-image); }
.z-background-video { z-index: var(--z-background-video); }

/* Base layers */
.z-background-flash { z-index: var(--z-background-flash); }
.z-base-container { z-index: var(--z-base-container); }
.z-card-stack-base { z-index: var(--z-card-stack-base); }

/* Content layers */
.z-card-stack { z-index: var(--z-card-stack); }
.z-card-counter { z-index: var(--z-card-counter); }
.z-navigation { z-index: var(--z-navigation); }
.z-card-effects { z-index: var(--z-card-effects); }
.z-debug-notification { z-index: var(--z-debug-notification); }

/* UI control layers */
.z-round-header { z-index: var(--z-round-header); }
.z-pass-deck-overlay { z-index: var(--z-pass-deck-overlay); }
.z-action-buttons { z-index: var(--z-action-buttons); }

/* Modal layers */
.z-settings-modal { z-index: var(--z-settings-modal); }
.z-turn-end-overlay { z-index: var(--z-turn-end-overlay); }

/* High priority overlay layers */
.z-game-start-overlay { z-index: var(--z-game-start-overlay); }
.z-round-intro-overlay { z-index: var(--z-round-intro-overlay); }
.z-round-end-overlay { z-index: var(--z-round-end-overlay); }
.z-pause-overlay { z-index: var(--z-pause-overlay); }

/* Special effects layers */
.z-confetti-effects { z-index: var(--z-confetti-effects); }
.z-pack-footer { z-index: var(--z-pack-footer); }
/* ABOUTME: Styles for the main boardgame container and root elements */
/* ABOUTME: Handles layout, positioning, and loading states for the game interface */

.boardgame-root {
  /* Container for the entire boardgame interface - consolidated from all container divs */
  position: fixed;
  overflow: hidden;
  top: 0px;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  background-color: transparent;
}

.loading-message {
  color: #6b7280; /* text-gray-500 equivalent */
}

/* Game view styles */
.game-view {
  /* Main game view container */
}

.background-flash {
  position: absolute;
  inset: 0;
  transition: color 0.3s;
  z-index: var(--z-background-flash);
  min-height: 100vh;
}

.background-image {
  /* Background image container */
}

.background-image img {
  /* Background image styling */
}

.round-header-container {
  position: relative;
  z-index: var(--z-round-header);
  margin-top: -4vh;
  margin-bottom: 10vh;
}

.card-stack-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-stack {
  position: relative;
  z-index: var(--z-card-stack);
}

.card-counter {
  opacity: 0.8;
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 300;
}

.debug-notification {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background-color: #7c3aed;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  font-size: 0.875rem;
  z-index: var(--z-debug-notification);
}

.debug-status-text {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  color: #c4b5fd;
}

/* Utility classes */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* 
* ==============================================
* BUTTONS
* ==============================================
*/

/* Primary button styles (based on Figma design) */
.monikers-button {
  /* Layout */
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 12px;
  gap: 8px;
  
  /* Dimensions */
  width: 100%;
  max-width: 345px;
  height: 46px;
  
  /* Glass effect styling */
  background: rgba(255, 255, 255, 0.1);
  color: white;
  box-shadow: 0px 8px 6px rgba(0, 0, 0, 0.05), 
              inset 0px -1px 1px rgba(255, 255, 255, 0.1), 
              inset 0px 1px 1px rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(52px);
  -webkit-backdrop-filter: blur(52px);
  border-radius: 104px;
  
  /* Text styling */
  text-align: center;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  
  /* Other properties */
  cursor: pointer;
  border: none;
  outline: none;
  margin: 0.5rem auto;
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Button icon position */
.monikers-button svg {
  width: 18px;
  height: 18px;
}

/* Button states */
.monikers-button:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  box-shadow: 0px 10px 8px rgba(0, 0, 0, 0.07), 
              inset 0px -1px 1px rgba(255, 255, 255, 0.15), 
              inset 0px 1px 1px rgba(255, 255, 255, 0.3);
}

/* Button sizes */
.monikers-button.small {
  padding: 8px 16px;
  height: 38px;
  font-size: 0.9rem;
  max-width: 300px;
}

.monikers-button.large {
  padding: 16px 32px;
  height: 54px;
  font-size: 1.2rem;
  max-width: 370px;
}

/* Secondary button style */
.monikers-button.secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.monikers-button.secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Legacy action buttons - maintaining for backward compatibility but using new styles */
.action-buttons {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 20px;
}

.action-button {
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  outline: none;
  transition: background-color 0.2s, transform 0.1s;
}

.action-button.success {
  background-color: #10B981;
  color: white;
}

.action-button.success:hover {
  background-color: #059669;
}

.action-button.fail {
  background-color: #EF4444;
  color: white;
}

.action-button.fail:hover {
  background-color: #DC2626;
}

.action-button:active {
  transform: scale(0.95);
}

/* Legacy pass-deck-button - using monikers-button instead */
.pass-deck-button {
  background-color: #7031DA;
  color: white;
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  box-shadow: 0 4px 10px rgba(112, 49, 218, 0.2);
  animation: slideInUp 0.5s ease-out 0.3s both;
  position: relative;
  /* Fixed position to prevent movement */
  transform: none !important;
  will-change: background-color;
}

.pass-deck-button:hover {
  background-color: #5f25c5;
}

/* Legacy round-intro-button - using monikers-button instead */
.round-intro-button {
  background-color: #7031DA;
  color: white;
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  box-shadow: 0 4px 10px rgba(112, 49, 218, 0.2);
  animation: slideInUp 0.5s ease-out 0.4s both;
  position: relative;
  /* Fixed position to prevent movement */
  transform: none !important;
  will-change: background-color;
}

.round-intro-button:hover {
  background-color: #5f25c5;
}

.packs-footer {
  position: fixed;
  bottom: 0;
  z-index: var(--z-pack-footer); 
}
/* 
* ==============================================
* CARD STACK STYLES
* ==============================================
*/

/* Main card styling */
.card {
  width: min(360px, 75vw);  
  height: min(520px, 112.5vw); 
  max-width: 360px; /* Fixed maximum width */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: min(50px, 8vw); /* Responsive border radius */
  background-color: #fff;
  padding: 0 min(16px, 3vw); /* Remove vertical padding */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  /* Enhanced iOS optimizations */
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.03);
  will-change: transform, opacity; /* Optimize for animations */
  transform: translateZ(0); /* Force GPU acceleration */
  backface-visibility: hidden; /* Reduce visual artifacts */
  -webkit-backface-visibility: hidden; /* Explicit for iOS */
  touch-action: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden; /* Prevent content overflow */
  pointer-events: auto; /* Make cards interactive */
  position: relative; /* Ensure absolute positioning context */
  -webkit-perspective: 1000; /* Improve performance on iOS */
  -webkit-transform-style: preserve-3d; /* Better 3D rendering on iOS */
  -webkit-font-smoothing: antialiased; /* Improve text rendering */
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
}

/* Stack effect - cards behind the top one */
#card-stack {
  position: relative;
  width: 100%;
  height: min(520px, 112.5vw); /* Match card height */
  max-width: 360px;
  margin: 0 auto;
  margin-top: 30vh;
  z-index: var(--z-base-container);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  transform-style: preserve-3d;
}

/* Style for empty cards in stack */
.empty-card {
  /* Make sure empty cards don't have any content */
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  color: transparent !important;
  text-shadow: none !important;
  pointer-events: none !important; /* Don't interfere with top card */
}

/* Special styles for stacking effect */
#card-stack .card {
  /* Stack positioning via CSS variables */
  --stack-y: 0px;
  --stack-scale: 1;
  transform: translateY(var(--stack-y)) scale(var(--stack-scale));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease-out;
  transform-style: preserve-3d;
  transform-origin: center center;
  backface-visibility: hidden;
  background-color: #fff;
  will-change: transform, scale;
}

/* Cards behind the top card have reduced opacity for depth effect */
#card-stack .card:not(:first-child) {
  background-color: #f9f9f9;
  border-top-color: #eee;
  opacity: 0.97;
}

/* 
* ==============================================
* CARD CONTENT STYLING
* ==============================================
*/

.card-name {
  font-size: clamp(1.85rem, 4vw, 2.2rem);
  color: #7031DA; /* Purple from Figma */
  pointer-events: none;
  user-select: none;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: -0.03em; /* Even tighter letter spacing for longer names */
  margin-top: 26%; /* Position a bit higher to accommodate larger text */
  margin-bottom: auto; /* Push to top */
  font-family: 'Supreme LL Jumbo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 0.95; /* Even tighter line height for better fit */
  hyphens: auto; /* Enable hyphenation for better word breaks */
  max-width: 100%; /* Ensure text doesn't overflow */
  width: 100%; /* Full width of card */
  padding: 0 0.75rem; /* Increased padding on the sides */
  text-rendering: optimizeLegibility; /* Improve text appearance */
  -webkit-font-smoothing: antialiased; /* Better rendering on WebKit */
  -moz-osx-font-smoothing: grayscale; /* Better rendering on Firefox */
}

/* Long card name (for names > 15 characters) */
.card-name-long {
  font-size: clamp(2.0rem, 3vw, 2.8rem); /* Fixed size */
  letter-spacing: -0.05em; /* More extreme letter spacing */
  line-height: 0.9; /* Tighter line height */
  padding: 0 1rem; /* More padding to ensure text fits */
  font-family: 'Supreme LL Jumbo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Very long card name (for names > 25 characters) */
.card-name-very-long {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem); /* Fixed size */
  letter-spacing: -0.06em; /* Maximum letter spacing compression */
  line-height: 0.85; /* Minimum line height */
  padding: 0 1.2rem; /* Maximum padding */
  margin-top: 24%; /* Adjust top position for possibly more lines */
  font-family: 'Supreme LL Jumbo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.card-category {
  font-size: 0.9rem;
  color: #4B5563;
  margin-bottom: 1rem;
  pointer-events: none;
  user-select: none;
  text-align: center;
  background: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
}

.card-description {
  position: absolute;
  bottom: 90px; /* Fixed distance from bottom */
  left: 0;
  right: 0;
  font-size: clamp(0.8rem, 1.5vw, 1rem); /* Adjusted font size */
  color: #7031DA; /* Purple from Figma */
  line-height: 1.25; /* Tighter line height for better fit */
  pointer-events: none;
  user-select: none;
  text-align: center;
  overflow-y: auto;
  padding: 0 1.5rem; /* Fixed padding */
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 26%; /* Limit height */
  width: 100%; /* Full width of card */
}

#card-counter {
  font-size: clamp(0.9rem, 1vw, 1.1rem); /* Slightly larger on desktop */
  color: #6B7280;
  pointer-events: none;
  user-select: none;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.7;
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, sans-serif;
  bottom: 115px;
}


/* 
* ==============================================
* STACK PLACEHOLDER STYLES
* ==============================================
*/

/* Lightweight placeholder cards for performance optimization */
.card-placeholder {
  /* Inherit base card styling but override content */
  background-color: #f9f9f9; /* Slightly muted background */
  border: 1px solid rgba(0, 0, 0, 0.05); /* Subtle border */
  cursor: default; /* No grab cursor */
  
  /* Remove all content-related styling */
  padding: 0;
  
  /* Ensure no text or content shows */
  color: transparent;
  font-size: 0;
  line-height: 0;
  
  /* Performance optimizations - remove expensive properties */
  will-change: auto; /* Don't optimize for animations */
  transition: none; /* No transitions needed */
  transform-style: flat; /* Disable 3D transforms */
  backface-visibility: visible; /* Default value, less GPU usage */
  -webkit-backface-visibility: visible;
  -webkit-perspective: none; /* Remove 3D perspective */
  -webkit-transform-style: flat;
  
  /* Minimal visual styling */
  opacity: 0.95;
  
  /* Remove interactive optimizations not needed for placeholders */
  touch-action: auto;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: auto; /* Default, less processing */
  -moz-osx-font-smoothing: auto;
  text-rendering: auto; /* Default, faster */
}

/* Ensure placeholder cards don't interfere with interactions */
.card-placeholder * {
  display: none; /* Hide any child content */
}

/* Override any hover or active states for placeholders */
.card-placeholder:hover,
.card-placeholder:active,
.card-placeholder:focus {
  transform: translateY(var(--stack-y)) scale(var(--stack-scale)); /* Maintain position */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); /* Keep same shadow */
}

/* 
* ==============================================
* OPTIMIZED CARD TYPE STYLES
* ==============================================
*/

/* ActiveCard (position 0) - Full interactivity and animations */
.card.active-card {
  /* Enhanced performance for the interactive card */
  will-change: transform, opacity, box-shadow; /* Optimize for animations */
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  
  /* Full 3D and animation support */
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
  -webkit-transform-style: preserve-3d;
  
  /* Enhanced text rendering for readability */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* NextCard (position 1) - Visual only, no interactions */
.card.next-card {
  /* Reduced performance optimizations */
  will-change: auto; /* No animations expected */
  cursor: default;
  pointer-events: none;
  touch-action: auto;
  
  /* Minimal 3D support */
  transform-style: flat;
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
  -webkit-perspective: none;
  -webkit-transform-style: flat;
  
  /* Standard text rendering */
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: auto;
}

/* Remove expensive properties from non-active cards */
.card:not(.active-card) {
  transition: none; /* Remove transitions for non-interactive cards */
}
/* 
* ==============================================
* GAME END OVERLAY
* ==============================================
*/

/* Game end overlay wrapper - no need to hide since React controls visibility */
#game-end-overlay {
  width: 100%;
  height: 100%;
}
/* ABOUTME: Navigation bar styles for the Monikers game
/* ABOUTME: Contains timer font styling and navigation layout styles */

#game-timer {
  font-family: 'Supreme LL', monospace;
  color: #ffffff;
}

#game-navigation {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  height: 100px;
}
/* 
* ==============================================
* PASS DECK & ROUND COMPLETION OVERLAYS
* ==============================================
*/

.pass-deck-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-pass-deck-overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  animation: fadeIn 0.4s ease-out;
  backdrop-filter: blur(5px);
  padding-top: 250px;
  background-color: rgba(125, 125, 125, 0.9);
}

.pass-deck-image {
  max-width: 200px;
  margin: 20px auto;
  animation: slideInUp 0.5s ease-out both;
}

.pass-deck-title {
  font-family: 'Supreme LL Jumbo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  text-transform: uppercase;
  line-height: 0.9;
  margin-bottom: 2rem;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: slideInUp 0.5s ease-out 0.1s both;
}

.pass-deck-description {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: #ffffff;
  opacity: 0.9;
  margin-bottom: 3rem;
  max-width: 400px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  animation: slideInUp 0.5s ease-out 0.2s both;
}

/* 
* ==============================================
* ROUND INTRO SCREEN
* ==============================================
*/

.round-intro-screen {
  position: fixed;
  top: 180px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-round-intro-overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: transparent;
  animation: fadeIn 0.4s ease-out;
}

.round-intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  z-index: 2;
  position: relative;
}

.round-intro-image {
  width: min(60vw, 250px);
  height: auto;
  margin-bottom: 3rem;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
  animation: slideInUp 0.5s ease-out 0.1s both;
}

.round-intro-number {
  font-family: 'Supreme LL Jumbo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(3rem, 12vw, 6rem);
  color: #ffffff;
  text-transform: uppercase;
  line-height: 0.9;
  font-weight: 900;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: slideInUp 0.5s ease-out 0.2s both;
}

.round-intro-instructions {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(1rem, 3.5vw, 1.4rem);
  color: #ffffff;
  max-width: 500px;
  margin-bottom: 4rem;
  line-height: 1.4;
  opacity: 0.95;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  animation: slideInUp 0.5s ease-out 0.3s both;
}

/* 
* ==============================================
* GAME START OVERLAY
* ==============================================
*/

.game-start-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-game-start-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
}

.game-start-content {
  background-color: white;
  border-radius: 8px;
  padding: 2rem;
  max-width: 28rem;
  width: 100%;
  margin: 0 1rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.game-start-title {
  font-size: 1.875rem;
  font-weight: bold;
  color: #7c3aed;
  margin-bottom: 1rem;
}

.game-start-emoji {
  font-size: 3.75rem;
  margin-bottom: 1rem;
}

.game-start-round {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.game-start-instructions {
  font-size: 1.125rem;
  color: #4b5563;
  margin-bottom: 1rem;
}

.game-start-timer-info {
  background-color: #f3f4f6;
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.game-start-timer-info p {
  font-size: 0.875rem;
  color: #374151;
  margin: 0;
}

/* 
* ==============================================
* ROUND END OVERLAY
* ==============================================
*/

.round-end-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-round-end-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
}

.round-end-content {
  background-color: white;
  border-radius: 8px;
  padding: 2rem;
  max-width: 32rem;
  width: 100%;
  margin: 0 1rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.round-end-emoji {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.round-end-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.round-end-subtitle {
  font-size: 1.125rem;
  color: #4b5563;
  margin-bottom: 1rem;
}

.round-end-score {
  background-color: #faf5ff;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.score-display {
  font-size: 1.25rem;
  font-weight: bold;
  color: #7c3aed;
  margin-bottom: 0.5rem;
}

.next-round-preview {
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}

.next-round-emoji {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.next-round-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.next-round-instructions {
  color: #4b5563;
  margin-bottom: 1rem;
}

.game-complete-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}

.game-complete-emoji {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.game-complete-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.game-complete-message {
  color: #4b5563;
  margin-bottom: 1rem;
}

.press-button {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.press-button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  width: 100%;
  bottom: 20px;
}

.stats-continue-button {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  width: 100%;
  height: 45px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  transform: scale(1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #6366f1;
  font-weight: 600;
  font-size: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  outline: none;
}

.stats-continue-button:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 
* ==============================================
* TURN STATS OVERLAY
* ==============================================
*/

.stats-overlay-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-pass-deck-overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 2rem 1rem 2rem;
  animation: fadeIn 0.4s ease-out;
  backdrop-filter: blur(5px);
  background-color: rgba(121, 121, 121, 0.85);
  overflow-y: auto;
  overflow-x: hidden;
}

.stats-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  z-index: 2;
  position: relative;
  margin: 2rem auto;
  padding-bottom: 2rem;
}

.stats-header {
  margin-bottom: 2rem;
  animation: slideInUp 0.5s ease-out both;
}

.stats-title {
  font-family: 'Supreme LL Jumbo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(2rem, 6vw, 3rem);
  text-transform: uppercase;
  line-height: 0.9;
  margin-bottom: 1rem;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.stats-subtitle {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: #ffffff;
  opacity: 0.9;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.stats-cards-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  margin-bottom: 2rem;
  animation: slideInUp 0.5s ease-out 0.1s both;
}

/* Mobile: Use grid layout for more compact display */
@media (max-width: 768px) {
  .stats-cards-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  
  /* When there are odd number of cards, make the last one span full width */
  .stats-cards-section:has(.stats-card:nth-child(odd):last-child) .stats-card:last-child {
    grid-column: 1 / -1;
  }
}

.stats-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile: Reduce padding and font sizes */
@media (max-width: 768px) {
  .stats-card {
    padding: 0.75rem;
    border-radius: 8px;
  }
}

.stats-card-empty {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  opacity: 0.8;
}

.stats-card-emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Mobile: Smaller emoji */
@media (max-width: 768px) {
  .stats-card-emoji {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
  }
}

.stats-card-title {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mobile: Smaller title */
@media (max-width: 768px) {
  .stats-card-title {
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
  }
}

.stats-card-time {
  font-family: 'Supreme LL Jumbo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: bold;
  color: #3b82f6;
  margin-bottom: 0.75rem;
}

/* Mobile: Smaller time value */
@media (max-width: 768px) {
  .stats-card-time {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
  }
}

.stats-card-name {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

/* Mobile: Smaller card name/value */
@media (max-width: 768px) {
  .stats-card-name {
    font-size: 0.875rem;
  }
}

.stats-card-value {
  font-family: 'Supreme LL Jumbo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: bold;
  color: #3b82f6;
  margin-bottom: 0.25rem;
}

/* Mobile: Smaller card value */
@media (max-width: 768px) {
  .stats-card-value {
    font-size: 1.125rem;
    margin-bottom: 0.125rem;
  }
}

.stats-card-no-data {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

.stats-card-subtitle {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
  line-height: 1.2;
}

/* Mobile: Even smaller subtitle */
@media (max-width: 768px) {
  .stats-card-subtitle {
    font-size: 0.625rem;
    margin-top: 0.125rem;
  }
}

.stats-achievements-section {
  width: 100%;
  animation: slideInUp 0.5s ease-out 0.2s both;
}

.stats-achievements-title {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.stats-achievements-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stats-achievement {
  background: rgba(254, 240, 138, 0.95);
  border: 2px solid rgba(251, 191, 36, 0.5);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stats-achievement-emoji {
  font-size: 1.5rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.stats-achievement-text {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #92400e;
  text-align: left;
}

/* 
* ==============================================
* GAME STATS OVERLAY ADDITIONS
* ==============================================
*/

.stats-section-title {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  text-align: left;
  width: 100%;
}

.stats-round-breakdown {
  width: 100%;
  margin-bottom: 2rem;
  animation: slideInUp 0.5s ease-out 0.3s both;
}

.stats-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stats-breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.stats-breakdown-item:last-child {
  border-bottom: none;
}

.stats-breakdown-round {
  display: flex;
  align-items: center;
}

.stats-breakdown-emoji {
  font-size: 1.25rem;
  margin-right: 0.5rem;
}

.stats-breakdown-name {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
}

.stats-breakdown-stats {
  display: flex;
  gap: 1rem;
}

.stats-breakdown-score, .stats-breakdown-cards {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  color: #4b5563;
}

.stats-achievements {
  width: 100%;
  margin-bottom: 2rem;
  animation: slideInUp 0.5s ease-out 0.2s both;
}

.stats-achievements-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stats-achievement-item {
  background: rgba(254, 240, 138, 0.95);
  border: 2px solid rgba(251, 191, 36, 0.5);
  border-radius: 8px;
  padding: 0.75rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stats-achievement-message {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #92400e;
  text-align: center;
}

.stats-home-button-container {
  width: 100%;
  margin-top: 1rem;
  animation: slideInUp 0.5s ease-out 0.4s both;
}

.stats-home-button {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  width: 100%;
  height: 45px;
  border-radius: 30px;
  background: rgba(96, 165, 250, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  transform: scale(1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: white;
  font-weight: 600;
  font-size: 16px;
  border: none;
  backdrop-filter: blur(10px);
  outline: none;
}

.stats-home-button:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stats-preview-notice {
  width: 100%;
  margin-top: 1rem;
  display: none; /* Hide the preview notice since we're showing full stats now */
}
/* 
* ==============================================
* CARD PACK STYLING
* ==============================================
*/

.card-packs-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  max-width: 380px;
  margin: 0 auto;
  padding: 20px;
  transition: margin-top 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.has-selected-packs .card-packs-container {
  margin-top: 50px; /* Push down when packs are selected */
}

.card-pack {
  /* Layout */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 16px;
  
  /* Dimensions */
  width: 128px;
  height: 160px;
  
  /* Glass effect styling */
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0px 8px 6px rgba(0, 0, 0, 0.05), 
              inset 0px -1px 1px rgba(255, 255, 255, 0.1), 
              inset 0px 1px 1px rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(52px);
  -webkit-backdrop-filter: blur(52px);
  border-radius: 16px;
  
  /* Other properties */
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  margin: 0 auto;
  transform: translateY(0);
}

/* Hover effect for desktop only - unselected cards */
@media (hover: hover) {
  .card-pack:not(.selected):hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0px 12px 10px rgba(0, 0, 0, 0.08), 
                inset 0px -1px 1px rgba(255, 255, 255, 0.15), 
                inset 0px 1px 1px rgba(255, 255, 255, 0.3);
  }
  
  /* Hover effect for desktop only - selected cards */
  .card-pack.selected:hover {
    background: rgba(112, 49, 218, 0.3);
    transform: translateY(-5px);
    box-shadow: 0px 12px 10px rgba(0, 0, 0, 0.08), 
                inset 0px -1px 1px rgba(112, 49, 218, 0.15), 
                inset 0px 1px 1px rgba(112, 49, 218, 0.25);
  }
}

/* Active state for all devices - on tap/click */
.card-pack:active {
  transform: scale(0.97); /* Slight scale down to indicate press */
  transition: transform 0.1s;
}

/* Selected state for all devices */
.card-pack.selected {
  background: rgba(112, 49, 218, 0.2);
}

.card-pack-title {
  font-family: 'Supreme LL Jumbo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  color: white;
  text-transform: uppercase;
  text-align: left;
  line-height: 0.9;
  margin: 0;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  width: 100%;
  /* padding: 10px 0px; */
}

.card-pack-subtitle {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
  margin: 0;
  margin-top: -14px;
  width: 100%;
}

.card-pack-image {
  width: 200px;
  height: 200px;
  object-fit: contain;
  position: absolute;
  left: 30px;
  top: 60px;
}

.card-pack-select {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.card-pack.selected .card-pack-select {
  background: rgba(112, 49, 218, 0.6);
}

.card-pack-count {
  position: relative;
  top: -7px;
  left: -32px;
  font-size: 0.75rem;
  color: white;
  background: rgba(0, 0, 0, 0.2);
  padding: 3px 8px;
  border-radius: 12px;
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Base class for all corner icons */
.card-pack-corner-icon {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 250px;
  height: 250px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  z-index: 2;
}

/* Specific icon classes */
.corner-icon-game-die {
  transform: rotate(8deg);
}

.corner-icon-blowfish {
  bottom: 10px;
  right: 10px;
}

.corner-icon-crystal {
  transform: rotate(-25deg);
}

.corner-icon-lego {
  bottom: 14px;
  right: 12px;
  transform: rotate(-25deg);
}

/* Hide the info button since it's not in the reference design */
.card-pack-info {
  display: none;
}

/* Packs selection screen */
.packs-selection-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  padding-top: 2rem;
}

.packs-header {
  text-align: center;
  color: white;
  width: 100%;
  position: relative;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.has-selected-packs .packs-header {
  margin-bottom: 220px; /* Add space when packs are selected */
}

.packs-count {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 15px;
  transition: margin-bottom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.has-selected-packs .packs-count {
  margin-bottom: 0;
}

.packs-title {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  max-width: 300px;
  margin: 0 auto 20px auto;
  line-height: 1.3;
  position: relative;
  text-align: center;
  padding-top: 20px;
  transition: opacity 0.4s ease;
}

/* Selected packs display */
.selected-packs-display {
  position: absolute;
  top: 240px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  z-index: 10;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  transform: translateY(-30px);
  pointer-events: none;
}

.has-selected-packs .selected-packs-display {
  opacity: 1;
  transform: translateY(0);
}

.selected-pack-image {
  position: absolute;
  max-width: 300px;
  max-height: 300px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: none;
  padding: 0;
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.2));
  opacity: 1;
}

/* Separate animation just for appearing */
.selected-pack-image.pre-positioned {
  opacity: 0;
  transform: scale(0.8) translateX(0) !important;
  transition: opacity 0.4s ease-out, transform 0s;
}

.selected-pack-image:not(.pre-positioned) {
  opacity: 1;
  transition: opacity 0.4s ease-out, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.selected-pack-image.center-image {
  z-index: 10;
  transform: scale(1.2);
}

.selected-pack-image.left-image {
  transform-origin: center right;
}

.selected-pack-image.right-image {
  transform-origin: center left;
}

.packs-footer {
  width: 100%;
  max-width: 345px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Admin pack preview background */
.pack-preview-background {
  background-image: url(/images/silver-bg.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card-pack.admin-pack-preview {
  width: 168px;
  height: 200px;
}

.card-pack-subtitle {
  text-align: left;
}
/* 
* ==============================================
* TIMER STYLES
* ==============================================
*/

#nav-timer {
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
  font-size: clamp(1.2rem, 5vw, 3.5rem);
  margin-top: -20px; /* Move the timer up slightly */
}
/* 
* ==============================================
* ANIMATIONS
* ==============================================
*/

/* iOS specific optimizations */
.ios-device .card, 
.ios-device .card-stack, 
.ios-device .animated-card,
.ios-device .swiping-left,
.ios-device .swiping-right,
.ios-device .undo-from-left,
.ios-device .undo-from-right {
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
  -webkit-transform-style: preserve-3d;
  -webkit-font-smoothing: antialiased;
  -webkit-touch-callout: none; /* Disable callout */
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform, opacity;
}

/* Animation for card scaling up from the stack */
@keyframes scaleUp {
  from {
    transform: translateY(-10px) scale(0.95);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

/* Animation for text blur clearing */
@keyframes clearBlur {
  from {
    filter: blur(15px);
  }
  50% {
    filter: blur(2px);
  }
  to {
    filter: blur(0);
  }
}

/* Swipe animations - optimized for performance */
@keyframes swipeRight {
  0% {
    transform: translateX(0) rotate(0deg) translateZ(0);
    opacity: 1;
  }
  100% {
    transform: translateX(200vw) rotate(20deg) translateZ(0);
    opacity: 0;
  }
}

@keyframes swipeLeft {
  0% {
    transform: translateX(0) rotate(0deg) translateZ(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-200vw) rotate(-20deg) translateZ(0);
    opacity: 0;
  }
}

/* Undo animations - reverse of swipe animations */
@keyframes undoFromRight {
  0% {
    transform: translateX(200vw) rotate(20deg) translateZ(0);
    opacity: 0;
  }
  100% {
    transform: translateX(0) rotate(0deg) translateZ(0);
    opacity: 1;
  }
}

@keyframes undoFromLeft {
  0% {
    transform: translateX(-200vw) rotate(-20deg) translateZ(0);
    opacity: 0;
  }
  100% {
    transform: translateX(0) rotate(0deg) translateZ(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Class for animated card to trigger animation */
.animated-card {
  animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Use cubic-bezier for slight bounce effect */
  will-change: transform; /* Optimize rendering performance */
}

/* Animated text elements within the animated card */
.animated-card .card-name,
.animated-card .card-description,
.animated-card .card-count {
  animation: clearBlur 0.4s ease-out; /* Text blur clearing animation */
  will-change: filter; /* Optimize blur animation performance */
}

.swiping-right {
  animation: swipeRight 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  will-change: transform, opacity; /* Hint to browser to optimize these properties */
  backface-visibility: hidden; /* Performance optimization */
  -webkit-backface-visibility: hidden; /* Explicit for iOS */
  perspective: 1000px; /* Performance optimization */
  -webkit-perspective: 1000; /* iOS perspective */
  transform: translateZ(0); /* Force GPU acceleration */
  -webkit-transform-style: preserve-3d; /* Better 3D rendering on iOS */
  -webkit-font-smoothing: antialiased; /* Improve text rendering */
}

.swiping-left {
  animation: swipeLeft 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  will-change: transform, opacity; /* Hint to browser to optimize these properties */
  backface-visibility: hidden; /* Performance optimization */
  -webkit-backface-visibility: hidden; /* Explicit for iOS */
  perspective: 1000px; /* Performance optimization */
  -webkit-perspective: 1000; /* iOS perspective */
  transform: translateZ(0); /* Force GPU acceleration */
  -webkit-transform-style: preserve-3d; /* Better 3D rendering on iOS */
  -webkit-font-smoothing: antialiased; /* Improve text rendering */
}

/* Undo animations */
.undo-from-right {
  animation: undoFromRight 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  will-change: transform, opacity; /* Hint to browser to optimize these properties */
  backface-visibility: hidden; /* Performance optimization */
  -webkit-backface-visibility: hidden; /* Explicit for iOS */
  perspective: 1000px; /* Performance optimization */
  -webkit-perspective: 1000; /* iOS perspective */
  transform: translateZ(0); /* Force GPU acceleration */
  -webkit-transform-style: preserve-3d; /* Better 3D rendering on iOS */
  -webkit-font-smoothing: antialiased; /* Improve text rendering */
}

.undo-from-left {
  animation: undoFromLeft 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  will-change: transform, opacity; /* Hint to browser to optimize these properties */
  backface-visibility: hidden; /* Performance optimization */
  -webkit-backface-visibility: hidden; /* Explicit for iOS */
  perspective: 1000px; /* Performance optimization */
  -webkit-perspective: 1000; /* iOS perspective */
  transform: translateZ(0); /* Force GPU acceleration */
  -webkit-transform-style: preserve-3d; /* Better 3D rendering on iOS */
  -webkit-font-smoothing: antialiased; /* Improve text rendering */
}

/* Confetti animations */
@keyframes confettiFall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

@keyframes confettiBurst {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(0);
    opacity: 0;
  }
  10% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--burst-x), var(--burst-y)) rotate(var(--rotation)) scale(0);
    opacity: 0;
  }
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8) translateX(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}
/* 
* ==============================================
* SWIPE HINTS & INTERACTIONS
* ==============================================
*/

.swipe-hints {
  position: absolute;
  width: 100%;
  top: 50%;
  left: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-stack-container:hover .swipe-hints {
  opacity: 0.4;
}

.swipe-hint {
  padding: 10px;
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.swipe-hint.swipe-left {
  background-color: #EF4444;
  transform: translateX(-30px);
}

.swipe-hint.swipe-right {
  background-color: #10B981;
  transform: translateX(30px);
}

/* 
* ==============================================
* CONFETTI STYLES
* ==============================================
*/

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confettiFall 3s linear forwards;
  transform-origin: center;
}

.confetti.confetti-burst {
  animation: confettiBurst 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  border-radius: 50%;
  z-index: 9999;
  transform-origin: center;
}

/* 
* ==============================================
* SWIPE TO CONTINUE
* ==============================================
*/

.swipe-to-continue-container {
  position: relative;
  transform: translateX(-50%);
  width: 90%;
  max-width: 340px;
  z-index: 100;
  animation: slideInUp 0.5s ease-out 0.4s both;
}

.swipe-track {
  position: relative;
  width: 100%;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: border-color 0.3s ease;
}

.swipe-track.ready-to-release {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(112, 49, 218, 0.3);
}

.swipe-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-family: 'Supreme LL', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: opacity 0.3s ease;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.swipe-handle {
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #7031DA 0%, #5f25c5 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(112, 49, 218, 0.3);
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.swipe-handle:active,
.swipe-handle.dragging {
  cursor: grabbing;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3), 
              inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.swipe-handle.dragging {
  cursor: grabbing;
  box-shadow: 0 4px 12px rgba(112, 49, 218, 0.4);
  /* transform: translateY(-50%) scale(1.05); */
}

.swipe-handle svg {
  pointer-events: none;
  transform: translateX(2px);
}
/* 
* ==============================================
* BACKGROUND IMAGE
* ==============================================
*/

.background-image {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  z-index: var(--z-background-image);
  pointer-events: none; /* Make sure image doesn't intercept clicks */
  max-width: 100vw; /* Ensure it doesn't overflow on desktop */
  background-image: url(/images/silver-bg.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#background-flash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  z-index: var(--z-background-flash);
  overflow: hidden;
  pointer-events: none; /* Make sure video doesn't intercept clicks */
  max-width: 100vw; /* Ensure it doesn't overflow on desktop */
}
/* ABOUTME: Chrome mobile specific styles and optimizations */
/* ABOUTME: Contains Blink engine specific properties and Chrome mobile enhancements */

/* 
* ==============================================
* CHROME MOBILE STYLES
* ==============================================
*/

/* Chrome mobile device detection and base optimizations */
.chrome-mobile {
  /* Chrome mobile specific optimizations will go here */
  /* Currently using standard properties as Chrome handles most things well */
}

/* Chrome mobile card stack positioning */
.chrome-mobile .card-stack-container {
  margin-top: 15vh; /* Chrome specific positioning - can be adjusted independently */
}

/* Chrome mobile standalone mode adjustments */
@media screen and (display-mode: standalone) {
  .chrome-mobile .card-stack-container {
    margin-top: env(safe-area-inset-top);
  }
}

/* Chrome mobile round header positioning */
@media screen and (display-mode: standalone) {
  .chrome-mobile #round-header {
    padding-top: 1rem !important;
  }
}

/* Chrome mobile game view positioning */
@media screen and (display-mode: standalone) {
  .chrome-mobile #game-view {
    padding-top: calc(env(safe-area-inset-top) + -25px) !important;
    margin-top: 1rem;
  }
}

/* Chrome mobile specific scrolling optimizations */
.chrome-mobile-scroll {
  /* Chrome mobile has better default scrolling behavior */
  /* May need specific optimizations for smooth scrolling */
  scroll-behavior: smooth;
}

/* Chrome mobile specific touch handling */
.chrome-mobile-touch {
  /* Chrome mobile touch optimizations */
  /* Less aggressive optimizations needed compared to iOS */
  touch-action: manipulation;
}

/* Chrome mobile specific performance hints */
.chrome-mobile-performance {
  /* Chrome mobile performance optimizations */
  /* Less WebKit-specific prefixes needed */
  will-change: transform;
  contain: layout style paint;
}

/* Chrome mobile specific text rendering */
.chrome-mobile-text {
  /* Chrome mobile text optimizations */
  text-rendering: optimizeSpeed;
  font-display: swap;
}

/* Chrome mobile specific animation optimizations */
.chrome-mobile-animation {
  /* Chrome mobile animation optimizations */
  /* Chrome handles animations well with standard properties */
  transform: translateZ(0);
  will-change: transform, opacity;
}
/* ABOUTME: iOS Safari specific mobile styles and optimizations */
/* ABOUTME: Contains WebKit-specific properties and iOS performance enhancements */

/* 
* ==============================================
* iOS MOBILE STYLES
* ==============================================
*/

/* iOS device detection and base optimizations */
.ios-device {
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
  -webkit-transform-style: preserve-3d;
  -webkit-font-smoothing: antialiased;
  -webkit-touch-callout: none;
}

/* iOS standalone app optimizations */
body.ios-standalone .card-stack-container {
  margin-top: 120px;
}

/* iOS card stack positioning */
.ios-device .card-stack-container {
  margin-top: 10vh;
}

/* iOS standalone mode card stack adjustments */
@media screen and (display-mode: standalone) {
  .ios-device .card-stack-container {
    margin-top: env(safe-area-inset-top);
  }
}

/* iOS round header positioning */
@media screen and (display-mode: standalone) {
  .ios-device #round-header {
    padding-top: 2rem !important;
  }
  .navigation-bar {
    padding-top: 3.5rem !important;
  }
}

/* iOS game view positioning */
@media screen and (display-mode: standalone) {
  .ios-device #game-view {
    padding-top: calc(env(safe-area-inset-top) + -25px) !important;
    margin-top: 1rem;
  }
}

/* iOS specific animation performance */
.ios-device .card,
.ios-device .card-stack,
.ios-device .animated-card,
.ios-device .swiping-left,
.ios-device .swiping-right,
.ios-device .undo-from-left,
.ios-device .undo-from-right {
  -webkit-transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
  -webkit-transform-style: preserve-3d;
  -webkit-font-smoothing: antialiased;
  -webkit-touch-callout: none;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform, opacity;
}

/* iOS specific text rendering */
.ios-text-optimized {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* iOS specific performance optimizations for animations */
.ios-animation-optimized {
  -webkit-backface-visibility: hidden;
  -webkit-perspective: 1000;
  -webkit-transform-style: preserve-3d;
  -webkit-font-smoothing: antialiased;
}
/* ABOUTME: Common mobile styles shared between Chrome and iOS platforms */
/* ABOUTME: Contains base mobile optimizations that work across all mobile browsers */

/* 
* ==============================================
* SHARED MOBILE STYLES
* ==============================================
*/
body {
  overscroll-behavior: none;
  touch-action: manipulation;
  margin: 0;
0
/* Common mobile touch optimizations */
.mobile-optimized {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Common mobile performance optimizations */
.mobile-performance {
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Common mobile text rendering */
.mobile-text {
  text-rendering: optimizeLegibility;
}

/* Common mobile scrollbar hiding */
.mobile-scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

/* Common mobile backdrop blur */
.mobile-backdrop-blur {
  backdrop-filter: blur(52px);
  -webkit-backdrop-filter: blur(52px);
}

.end-turn-button-container {
  position: absolute;
  bottom: 40px;
} 
/*


*/

@tailwind components;
@tailwind utilities;
