*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}/*
! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
*//*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
  border-color: #e5e7eb; /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  -o-tab-size: 4;
     tab-size: 4; /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
  font-feature-settings: normal; /* 5 */
  font-variation-settings: normal; /* 6 */
  -webkit-tap-highlight-color: transparent; /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
  font-feature-settings: normal; /* 2 */
  font-variation-settings: normal; /* 3 */
  font-size: 1em; /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-feature-settings: inherit; /* 1 */
  font-variation-settings: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  letter-spacing: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/
dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1; /* 1 */
  color: #9ca3af; /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}
.container {
  width: 100%;
}
@media (min-width: 640px) {

  .container {
    max-width: 640px;
  }
}
@media (min-width: 768px) {

  .container {
    max-width: 768px;
  }
}
@media (min-width: 1024px) {

  .container {
    max-width: 1024px;
  }
}
@media (min-width: 1280px) {

  .container {
    max-width: 1280px;
  }
}
@media (min-width: 1536px) {

  .container {
    max-width: 1536px;
  }
}
.visible {
  visibility: visible;
}
.fixed {
  position: fixed;
}
.relative {
  position: relative;
}
.block {
  display: block;
}
.inline-block {
  display: inline-block;
}
.flex {
  display: flex;
}
.table {
  display: table;
}
.hidden {
  display: none;
}
.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.resize {
  resize: both;
}
.border {
  border-width: 1px;
}
.uppercase {
  text-transform: uppercase;
}
.italic {
  font-style: italic;
}
.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Default player colors - will be overridden by JavaScript */
:root {
  --player-1-color: blue;
  --player-2-color: red;
}

/* Tutorial Overlay Styles */
.tutorial-overlay-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

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

.tutorial-overlay-card {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

/* ============================================================================
   Add these styles to your existing CSS file for Tutorial GIF support
   ============================================================================ */

.tutorial-gif-container {
  animation: fadeIn 0.4s ease;
}

.tutorial-gif-container img {
  transition: transform 0.3s ease;
}

.tutorial-gif-container img:hover {
  transform: scale(1.02);
}

/* Mobile optimizations for tutorial GIFs */
@media (max-width: 768px) {
  .tutorial-overlay-card {
    max-width: 95% !important;
    margin: 0.5rem;
  }
  
  .tutorial-gif-container {
    padding: 0 1rem !important;
    margin-bottom: 0.75rem !important;
  }
  
  .tutorial-gif-container img {
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
  }
}

/* Ensure tutorial content doesn't overflow on small screens */
@media (max-width: 480px) {
  .tutorial-overlay-content p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .tutorial-gif-container {
    padding: 0 0.75rem !important;
  }
}

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

.tutorial-overlay-header {
  padding: 1rem 1rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tutorial-overlay-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #007bff;
}


.tutorial-overlay-content {
  padding: 1.5rem;
}

.tutorial-overlay-content p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}

.tutorial-overlay-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  justify-content: flex-end;
}

.tutorial-continue-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.tutorial-continue-button:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Bouncing arrow animation */
@keyframes bounce-arrow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* Base arrow styles */
.tutorial-arrow {
  position: fixed !important;
  z-index: 9999 !important; /* Force to very top */
  color: #ffc107 !important; /* Yellow/gold color */
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5)) !important;
  pointer-events: none !important;
  animation: bounce-arrow 1.5s ease-in-out infinite !important;
  
  /* Make sure it's visible */
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}


/* Arrow for hex targeting */
.tutorial-arrow-hex {
  position: fixed !important;
  /* Position set via inline styles */
}

/* Arrow positions */
.tutorial-arrow-center {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

.tutorial-arrow-top-left {
  top: 100px !important;
  left: 150px !important;
}

.tutorial-arrow-top-right {
  top: 100px !important;
  right: 150px !important;
}

.tutorial-arrow-bottom-left {
  bottom: 150px !important;
  left: 150px !important;
}

.tutorial-arrow-bottom-right {
  bottom: 150px !important;
  right: 150px !important;
}

/* Make sure the SVG icon is visible */
.tutorial-arrow svg {
  display: block !important;
  color: #ffc107 !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) !important;
}

/* Mobile arrow adjustments */
@media (max-width: 768px) {
  .tutorial-arrow {
    font-size: 0.8em;
  }
  
  .tutorial-arrow-top-left {
    top: 80px !important;
    left: 20px !important;
  }
  
  .tutorial-arrow-bottom-left {
    bottom: 100px !important;
    left: auto !important;
    right: 20px !important;
  }
  
  .tutorial-arrow-center {
    top: 40% !important;
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(255, 193, 7, 0);
  }
}

.tutorial-highlight {
  position: fixed;
  z-index: 998;
  pointer-events: none;
  border: 3px solid #ffc107;
  border-radius: 16px;
  animation: pulse-glow 2s ease-in-out infinite;
}

.tutorial-highlight-hex {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid #ffc107;
  background: radial-gradient(circle, rgba(255, 193, 7, 0.3) 0%, rgba(255, 193, 7, 0) 70%);
}

.tutorial-highlight-board {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 90vh);
  height: min(90vw, 90vh);
  border-radius: 50%;
}

.tutorial-highlight-score {
  top: 75px;
  left: 15px;
  width: 140px;
  height: 120px;
  border-radius: 12px;
}

.tutorial-highlight-end-turn {
  bottom: 75px;
  left: 15px;
  width: 120px;
  height: 50px;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .tutorial-arrow {
    font-size: 0.8em;
  }
  
  .tutorial-highlight-hex {
    width: 50px;
    height: 50px;
    border: 3px solid #ffc107;
  }
  
  .tutorial-highlight-score {
    top: 70px;
    left: 10px;
    width: 130px;
    height: 100px;
  }
  
  .tutorial-highlight-end-turn {
    bottom: 50px;
    right: 10px;
    left: auto;
    width: 110px;
    height: 45px;
  }
}

.tutorial-arrow,
.tutorial-highlight {
  animation-delay: 0.3s;
  opacity: 1;
  animation-fill-mode: forwards;
}

@keyframes fade-in-bounce {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  100% {
    opacity: 1;
  }
}

.tutorial-arrow {
  animation: fade-in-bounce 0.5s ease-out forwards, bounce-arrow 1.5s ease-in-out 0.5s infinite;
}

/* Difficulty Selection Modal Styles - Updated to match waiting screen */
.difficulty-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.difficulty-modal-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideUp 0.3s ease;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

.difficulty-modal-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  z-index: 10;
  border-radius: 16px 16px 0 0;
}

.difficulty-modal-header h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
}

.difficulty-close-button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 0.5rem;
  color: white;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.difficulty-close-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.difficulty-modal-content {
  padding: 1.5rem;
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.difficulty-card {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid;
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  text-align: center;
  backdrop-filter: blur(5px);
  min-height: 260px; /* Ensure consistent height */
  justify-content: center; /* Center content vertically */
}

.difficulty-card:not(.locked):hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.difficulty-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.difficulty-lock-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: rgba(255, 193, 7, 0.9);
  color: white;
  padding: 0.35rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.difficulty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  height: 40px; /* Fixed height for consistency */
  margin-bottom: 0.25rem;
}

.difficulty-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  min-height: 2rem; /* Ensure consistent space */
  display: flex;
  align-items: center;
}

.difficulty-stars {
  display: flex;
  gap: 0.25rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  height: 20px; /* Fixed height */
  margin: 0.25rem 0;
}

.difficulty-description {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
  flex: 1; /* Take remaining space */
  display: flex;
  align-items: center;
  min-height: 3rem; /* Ensure consistent description area */
}

.difficulty-locked-text {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 193, 7, 0.9);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  min-height: 1.5rem; /* Reserve space even when not shown */
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .difficulty-modal-card {
    max-width: 95%;
    max-height: 90vh;
    margin: 0.5rem;
  }

  .difficulty-modal-header {
    padding: 1rem 1rem 0.75rem;
  }

  .difficulty-modal-header h2 {
    font-size: 1.35rem;
  }

  .difficulty-modal-content {
    padding: 1rem;
  }

  .difficulty-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .difficulty-card {
    padding: 1rem;
    gap: 0.5rem;
    min-height: 220px; /* Slightly shorter on mobile */
  }

  .difficulty-icon {
    height: 36px;
  }

  .difficulty-name {
    font-size: 1.2rem;
    min-height: 1.8rem;
  }

  .difficulty-stars {
    height: 18px;
  }

  .difficulty-description {
    font-size: 0.85rem;
    min-height: 2.5rem;
  }

  .difficulty-icon svg {
    width: 28px;
    height: 28px;
  }

  .difficulty-close-button {
    padding: 0.4rem;
  }
}

/* Small mobile screens */
@media (max-width: 400px) {
  .difficulty-modal-header h2 {
    font-size: 1.15rem;
  }

  .difficulty-card {
    padding: 0.875rem;
    min-height: 200px;
  }

  .difficulty-icon {
    height: 32px;
  }

  .difficulty-name {
    font-size: 1.1rem;
    min-height: 1.6rem;
  }

  .difficulty-description {
    font-size: 0.8rem;
    min-height: 2.25rem;
  }
}

/* Hide scrollbar for difficulty modal */
.difficulty-modal-card {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.difficulty-modal-card::-webkit-scrollbar {
  display: none; /* WebKit browsers */
}

/* Tutorial Complete Modal Styles */
.tutorial-complete-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.tutorial-complete-card {
  background: white;
  border-radius: 20px;
  max-width: 550px;
  width: 100%;
  padding: 3rem 2rem;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.4s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tutorial-complete-icon-container {
  position: relative;
  margin-bottom: 1.5rem;
}

.tutorial-complete-icon {
  color: #28a745;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 0.6s ease;
}

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

.tutorial-complete-confetti {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.tutorial-complete-title {
  margin: 0 0 1rem;
  font-size: 2.5rem;
  font-weight: 700;
  color: #28a745;
}

.tutorial-complete-message {
  margin: 0 0 2rem;
  font-size: 1.2rem;
  line-height: 1.6;
  color: #333;
}

.tutorial-complete-unlock {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.unlock-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.unlock-text {
  margin: 0;
  color: white;
  font-size: 1rem;
}

.tutorial-complete-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.tutorial-action-button {
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.tutorial-action-button.primary {
  background-color: #007bff;
  color: white;
}

.tutorial-action-button.primary:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.tutorial-action-button.secondary {
  background-color: #6c757d;
  color: white;
}

.tutorial-action-button.secondary:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(108, 117, 125, 0.4);
}

/* Bot Victory Modal Styles */
.bot-victory-card {
  max-width: 600px;
}

.bot-victory-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.bot-victory-badge {
  animation: popIn 0.5s ease;
  display: inline-block;
}

@keyframes popIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.bot-victory-stats {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bot-victory-stat-row {
  display: flex;
  gap: 1rem;
  justify-content: space-around;
  margin-bottom: 1rem;
}

.bot-victory-stat-row:last-child {
  margin-bottom: 0;
}

.bot-victory-stat-item {
  flex: 1;
  text-align: center;
}

.stat-label {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #333;
}

.bot-victory-next-challenge {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
  }
}

/* Prevent overscroll and ensure full viewport usage */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
  position: fixed; /* Prevents mobile browser chrome from affecting layout */
  width: 100%;
}

#root {
  height: 100dvh; /* Dynamic viewport height - accounts for mobile browser UI */
  width: 100vw;
  display: flex;
  flex-direction: column;
}

/* Push Game Styles */
.App {
  text-align: center;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height */
  width: 100vw;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.App-header {
  background-color: white;
  padding: 0.75rem 1rem;
  color: black;
  border-bottom: 2px solid #e0e0e0;
  z-index: 10;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  position: relative;
}

.header-left-controls {
  display: flex;
  align-items: center;
  z-index: 20;
  position: relative;
}

.header-logo-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  height: 100%;
}

.app-logo {
  height: 50px;
  width: auto;
  transition: transform 0.2s ease;
}

.app-logo:hover {
  transform: scale(1.05);
}

.header-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  z-index: 20;
  position: relative;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
  overflow-y: auto; /* Allow scrolling within main content */
  overflow-x: hidden;
}

/* Game area layout */
.game-area {
  flex: 1;
  display: flex;
  position: relative;
  min-height: 0;
}

.game-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Floating score container */
.score-container {
  position: fixed;
  top: 80px;
  left: 20px;
  z-index: 50;
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 2px solid #e0e0e0;
  backdrop-filter: blur(10px);
  min-width: 120px;
}

.score-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #333;
  text-align: center;
}

/* New score display */
.score-display {
  width: 100%;
}

.score-values {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.score-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

/* ============================================================================
   REPLACE the existing .score-item.active styles with these:
   ============================================================================ */

/* Base active score item - no color specifics */
.score-item.active {
  transform: scale(1.02);
}

/* Player 1 active score - uses dynamic color */
.score-item.active[data-player="1"] {
  background: color-mix(in srgb, var(--player-1-color) 10%, transparent);
  border: 1px solid var(--player-1-color);
}

/* Player 2 active score - uses dynamic color */
.score-item.active[data-player="2"] {
  background: color-mix(in srgb, var(--player-2-color) 10%, transparent);
  border: 1px solid var(--player-2-color);
}

/* Fallback for browsers that don't support color-mix */
@supports not (background: color-mix(in srgb, blue 10%, transparent)) {
  .score-item.active[data-player="1"] {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid #007bff;
  }
  
  .score-item.active[data-player="2"] {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
  }
}

/* Also update the score indicator glow for active player */
.score-item.active .score-indicator {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--player-1-color) 30%, transparent);
}

.score-item.active[data-player="1"] .score-indicator {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--player-1-color) 30%, transparent);
}

.score-item.active[data-player="2"] .score-indicator {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--player-2-color) 30%, transparent);
}

/* Update active player name color to match */
.score-item.active[data-player="1"] .player-name {
  color: var(--player-1-color);
  font-weight: 600;
}

.score-item.active[data-player="2"] .player-name {
  color: var(--player-2-color);
  font-weight: 600;
}

.score-indicator {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}



.score-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.player-info.active {
  background: rgba(0, 123, 255, 0.1);
  border: 2px solid #007bff;
  transform: scale(1.02);
}

.player-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.player-indicator.active::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 2px solid currentColor;
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

.player-name {
  font-size: 0.95em;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(0, 0, 0, 0.7);
}

.score-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Floating game controls */
.game-controls-sidebar {
  position: fixed;
  bottom: 80px;
  left: 20px;
  z-index: 50;
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 2px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  backdrop-filter: blur(10px);
  min-width: 100px;
}

/* Bottom game controls */
.game-controls-bottom {
  position: absolute;
  bottom: 70px; /* Move above footer */
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Welcome screen */
.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.welcome-screen h2 {
  position: static;
  transform: none;
  font-size: clamp(24px, 5vw, 36px);
  margin-bottom: 1rem;
  color: white;
}

.welcome-screen p {
  font-size: clamp(16px, 3vw, 20px);
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Welcome screen content wrapper */
.welcome-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.welcome-content h2 {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: bold;
  margin-bottom: 2rem;
  line-height: 1.2;
  color: white;
}

.welcome-content p {
  font-size: clamp(18px, 4vw, 24px);
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

/* Game mode selection screen */
.game-mode-selection-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.game-mode-selection-screen h2 {
  position: static;
  transform: none;
  font-size: clamp(24px, 5vw, 36px);
  margin-bottom: 1rem;
  color: white;
}

.game-mode-selection-screen p {
  font-size: clamp(16px, 3vw, 20px);
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.game-mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 400px;
}

.game-mode-button {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 1rem 2rem;
  font-size: 18px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.game-mode-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.game-mode-button.multiplayer:hover:not(:disabled) {
  background: rgba(0, 123, 255, 0.3);
  border-color: rgba(0, 123, 255, 0.5);
}

.game-mode-button.local:hover:not(:disabled) {
  background: rgba(40, 167, 69, 0.3);
  border-color: rgba(40, 167, 69, 0.5);
}

.game-mode-button.tutorial:hover:not(:disabled) {
  background: rgba(40, 167, 69, 0.3);
  border-color: rgba(40, 167, 69, 0.5);
}

.game-mode-button.bot:hover:not(:disabled) {
  background: rgba(255, 193, 7, 0.3);
  border-color: rgba(255, 193, 7, 0.5);
}

.game-mode-button.locked {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(108, 117, 125, 0.2);
  border-color: rgba(108, 117, 125, 0.3);
}

.game-mode-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(108, 117, 125, 0.2);
  border-color: rgba(108, 117, 125, 0.3);
}

.back-button {
  background: rgba(108, 117, 125, 0.2);
  border: 2px solid rgba(108, 117, 125, 0.3);
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 1.5rem;
  font-size: 16px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-button:hover {
  background: rgba(108, 117, 125, 0.3);
  border-color: rgba(108, 117, 125, 0.5);
  color: white;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .game-mode-buttons {
    max-width: 300px;
  }
  
  .game-mode-button {
    padding: 0.875rem 1.5rem;
    font-size: 16px;
  }
}
/* Mobile optimizations */
@media (max-width: 768px) {
  .header-left-controls {
    max-width: 30%;
    overflow: hidden;
  }
  
  .App {
    flex-direction: column;
  }
  
  .App-header {
    height: 60px;
    padding: 0.5rem;
  }
  
  .App-header h1 {
    font-size: 1.5rem;
  }
  
  .header-controls {
    gap: 0.25rem;
  }
  
  .game-area {
    flex-direction: row;
    padding-bottom: 0; /* Remove padding on mobile */
    height: 100%;
    overflow: hidden;
  }
  
  /* Hide desktop floating elements on mobile */
  .score-container,
  .game-controls-sidebar {
    display: none;
  }
  
  /* Mobile overlay containers */
  .mobile-score-overlay {
    position: fixed;
    top: 70px;
    left: 10px;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
  }

  .mobile-actions-overlay {
    position: fixed;
    bottom: 50px;
    right: 10px;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 100px;
  }

  /* Mobile score styling */
  .mobile-score-overlay .score-values {
    gap: 0.25rem;
  }

  .mobile-score-overlay .score-item {
    padding: 0.25rem;
    font-size: 0.9rem;
  }

  .mobile-score-overlay .score-indicator {
    width: 12px;
    height: 12px;
  }

  .mobile-score-overlay .score-value {
    font-size: 1rem;
    font-weight: bold;
  }

  /* Mobile actions styling */
  .mobile-actions-overlay button {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    margin: 0;
    border-radius: 6px;
  }

  .mobile-actions-overlay .MuiButton-root {
    min-height: 32px;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  .game-controls-bottom {
    bottom: 50px; /* Above footer on mobile */
  }
  
  .undo-button {
    bottom: 50px !important; /* Above footer on mobile */
    right: 0.5rem !important;
  }
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
  .mobile-score-overlay {
    top: 60px;
    left: 8px;
    padding: 0.5rem;
  }

  .mobile-current-player-overlay {
    top: 60px;
    right: 8px;
    padding: 0.4rem 0.6rem;
  }

  .mobile-actions-overlay {
    bottom: 45px;
    right: 8px;
    padding: 0.5rem;
  }

  .App-header {
    height: 50px;
    padding: 0.25rem 0.5rem;
  }
  
  .App-header h1 {
    font-size: 1.25rem;
  }
  
  .game-sidebar {
    height: 120px;
    padding: 0.5rem;
  }
  
  .score-container,
  .players-container,
  .game-controls-sidebar {
    padding: 0.5rem;
  }
  
  .game-controls-bottom {
    bottom: 0.25rem;
  }
}

/* Large screen optimizations */
@media (min-width: 1200px) {
  .score-container,
  .game-controls-sidebar {
    padding: 1.5rem;
  }
}

/* Hexagon styles */
/* Highlighted Hexagons */
svg g.active .hexagon {
  fill-opacity: 0.5 !important;
  animation: pulse 3s ease-in-out infinite; 
  transform: scale(0.95);
}

/* Selected hexagon */
svg .selected .hexagon {
  filter: drop-shadow(2px 0px 4px antiquewhite);
  backdrop-filter: sepia(100%); 
  fill-opacity: .15;
  pointer-events: none;
}

svg g.selected polygon {
  stroke: yellow;
  stroke-width: 0.4;
  transition: stroke .5s;
}

svg g polygon {
  stroke: #7be3f6;
  stroke-width: 0.2;
  transition: fill-opacity .5s;
}

/* Ensure individual hexagon groups capture pointer events */
svg g.individual-hexagon-group {
  pointer-events: all;
}

/* ============================================================================
   UPDATE THESE EXISTING HEXAGON STYLES (around line 1450-1480)
   Replace the hardcoded colors with CSS variables
   ============================================================================ */

/* Owner-specific hexagon fills - UPDATED to use CSS variables */
svg g.owner-player-1 .hexagon {
  fill: var(--player-1-color);
  fill-opacity: 0.2;
}

svg g.owner-player-2 .hexagon {
  fill: var(--player-2-color);
  fill-opacity: 0.2;
}

svg g.owner-neutral .hexagon {
  fill: dimgray;
  fill-opacity: 0.2;
}

/* ============================================================================
   OPTIONAL: Update hover styles to use CSS variables
   ============================================================================ */

/* These styles ensure hover effects work with any custom color */
svg g.owner-player-1:hover .hexagon {
  fill: var(--player-1-color);
  fill-opacity: 0.4;
}

svg g.owner-player-2:hover .hexagon {
  fill: var(--player-2-color);
  fill-opacity: 0.4;
}

/* ============================================================================
   NOTES:
   - The unit circles (SVG <circle> elements) are handled via JavaScript
   - The hexagon backgrounds are handled via these CSS variables
   - Colors update dynamically when players are loaded
   - Defaults to blue/red if no custom colors are found
   ============================================================================ */

/* Hover styles */
svg g.individual-hexagon-group:hover .hexagon {
  fill: #7be3f6 !important;
  fill-opacity: 0.7 !important;
}

svg g:hover text {
  fill-opacity: 1;
}
svg g text {
  font-size: 0.17em;
  fill: black;
  fill-opacity: 0.7;
  transition: fill-opacity .5s;
}

/* Animations */
@keyframes pulse {
  from {
    transform: scale(.95);	
  }
  50% {
    transform: scale(1.05);
  }
  to {
    transform: scale(.95);	
  }
}

/* Score display */
.score text {
  font-size: clamp(20px, 3vw, 28px);
  fill: white;
  fill-opacity: 1.0;
  transition: fill-opacity .5s;
}

svg g.score .hexagon {
  fill-opacity: 0.6;	
  stroke: #7be3f6;
  stroke-width: 0;
  transition: fill-opacity .5s;	
  transform: scale(1.075);
}

/* Game grid container */
.game-grid-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Button styles */
button {
  background-color: #007bff;
  border-radius: 8px;
  border: none;
  color: white;
  padding: clamp(8px, 2vw, 12px) clamp(16px, 4vw, 24px);
  text-align: center;
  transition: all 0.3s ease;
  font-size: clamp(14px, 2.5vw, 16px);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

button:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

button:active {
  transform: translateY(0);
}

/* Footer styles */
.footer {
  background-color: #f8f9fa;
  color: #6c757d;
  padding: 0.5rem 0;
  text-align: center;
  font-size: clamp(10px, 2vw, 12px);
  border-top: 1px solid #e0e0e0;
  z-index: 100;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
}

.links {
  display: flex;
  gap: clamp(0.25rem, 1vw, 0.5rem);
  align-items: center;
  flex-shrink: 0;
}

.links a {
  color: #6c757d;
  text-decoration: none;
  transition: color 0.3s ease;
}

.links a:hover {
  color: #007bff;
}

.social-icons {
  display: flex;
  gap: clamp(0.5rem, 2vw, 1rem);
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

.icon-link {
  font-size: clamp(16px, 3vw, 20px);
  transition: transform 0.3s ease;
  display: inline-block;
  color: inherit;
  text-decoration: none;
}

.icon-link:hover {
  transform: scale(1.2);
}

.icon-link.discord { color: #7289da; }
.icon-link.patreon { color: #ff424d; }
.icon-link.coffee { color: #ff813f; }
.icon-link.reddit { color: #ff5700; }

.legal {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
  font-size: clamp(8px, 1.5vw, 10px);
}

/* Auth screen styles */
.auth-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: relative;
}

/* Waiting screen styles */
.waiting-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: relative;
}

.waiting-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.back-button-waiting {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-button-waiting:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(-2px);
}

.waiting-content h2 {
  margin: 1rem 0;
  font-size: 1.8rem;
  font-weight: bold;
}

.waiting-content p {
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.waiting-animation {
  margin-bottom: 1.5rem;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.success-animation {
  margin-bottom: 1.5rem;
}

.checkmark {
  width: 50px;
  height: 50px;
  background: #28a745;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  margin: 0 auto;
  animation: checkmark-appear 0.5s ease-in-out;
}

@keyframes checkmark-appear {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.share-section {
  margin-bottom: 2rem;
}

.share-url-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

.share-url-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.9rem;
  font-family: monospace;
}

.share-url-input::-moz-placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.share-url-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.share-url-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
}

.copy-button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.copied-tooltip {
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.share-button {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.waiting-tips {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  text-align: left;
}

.waiting-tips h3 {
  margin: 0 0 0.75rem 0;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-weight: 600;
  position: static;
  transform: none;
  bottom: auto;
}

.waiting-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.waiting-tips li {
  padding: 0.25rem 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
  .waiting-container {
    max-width: 320px;
    padding: 1rem;
  }
  
  .waiting-content h2 {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    margin: 0.75rem 0;
  }
  
  .waiting-content p {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    margin-bottom: 1.5rem;
  }
  
  .share-url-input {
    font-size: 0.75rem;
    padding: 0.6rem;
  }
  
  .share-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .waiting-tips {
    padding: 0.6rem;
  }
  
  .waiting-tips h3 {
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    margin-bottom: 0.5rem;
  }
  
  .waiting-tips li {
    font-size: 0.8rem;
    padding: 0.2rem 0;
  }
  
  .copy-button {
    padding: 0.6rem;
  }
  
  .back-button-waiting {
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.4rem;
  }
}

.auth-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1rem;
  width: 100%;
  max-width: 300px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  margin-top: -60px;
}

.auth-header p {
  margin: 0 0 1rem 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(12px, 2vw, 13px);
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: white;
  font-size: 14px;
}

.form-group input {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-group input::-moz-placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.form-group input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error-message {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.5);
  color: #ff6b6b;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

.success-message {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid rgba(40, 167, 69, 0.5);
  color: #51cf66;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

.auth-submit-button {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.auth-submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.auth-submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-toggle {
  text-align: center;
  margin-top: 1rem;
}

.auth-toggle p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.auth-toggle-button {
  background: none;
  border: none;
  color: white;
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.auth-toggle-button:hover:not(:disabled) {
  color: rgba(255, 255, 255, 0.8);
}

.auth-toggle-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Google Sign-In Button */
.google-signin-button {
  background-color: white !important;
  color: #333 !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  margin: 0 !important;
}

.google-signin-button:hover:not(:disabled) {
  background-color: #f8f9fa !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.google-signin-button:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.google-icon {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
}

.auth-divider {
  display: flex !important;
  align-items: center !important;
  text-align: center !important;
  margin: 0.75rem 0 !important;
}

.auth-divider::before,
.auth-divider::after {
  content: '' !important;
  flex: 1 !important;
  height: 1px !important;
  background: rgba(255, 255, 255, 0.3) !important;
}

.auth-divider span {
  padding: 0 1rem !important;
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 12px !important;
}

@media (max-width: 768px) {
  .footer {
    padding: 0.25rem 0;
  }

  .footer-container {
    padding: 0 0.5rem;
  }

  .social-icons {
    transform: scale(0.8);
  }

  .auth-screen {
    padding: 1rem;
  }

  .auth-container {
    padding: 1rem;
    max-width: 280px;
  }

  .auth-header p {
    font-size: 11px;
    margin-bottom: 1rem;
  }
}

/* Profile Editor Styles */
.profile-editor-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.profile-editor-container {
  background: white;
  border-radius: 16px;
  padding: 0;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.profile-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 0 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.profile-editor-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  position: static;
  transform: none;
  bottom: auto;
}

.profile-editor-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.3s ease;
}

.profile-editor-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.profile-editor-form {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.profile-editor-form .form-group {
  margin-bottom: 1.5rem;
}

.profile-editor-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.profile-editor-form .form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  color: #333;
  background-color: white;
}

.profile-editor-form .form-group input::-moz-placeholder {
  color: #666;
}

.profile-editor-form .form-group input::placeholder {
  color: #666;
}

.profile-editor-form .form-group input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.profile-editor-form .form-group input:disabled {
  background: #f8f9fa;
  cursor: not-allowed;
  opacity: 0.7;
}

.form-help {
  display: block;
  margin-top: 0.5rem;
  font-size: 12px;
  color: #666;
}

.profile-editor-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.cancel-button {
  background: #6c757d;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cancel-button:hover:not(:disabled) {
  background: #5a6268;
  transform: translateY(-1px);
}

.cancel-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.save-button {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.save-button:hover:not(:disabled) {
  background: #0056b3;
  transform: translateY(-1px);
}

.save-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.profile-editor-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
}

.profile-editor-loading .spinner {
  margin-bottom: 1rem;
}

.profile-editor-loading p {
  color: #666;
  font-size: 14px;
  margin: 0;
}

@media (max-width: 768px) {
  .profile-editor-container {
    max-width: 350px;
    margin: 1rem;
  }
  
  .profile-editor-header {
    padding: 1rem 1rem 0 1rem;
    margin-bottom: 1rem;
  }
  
  .profile-editor-header h2 {
    font-size: 1.25rem;
  }
  
  .profile-editor-form {
    padding: 0 1rem 1rem 1rem;
  }
  
  .profile-editor-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .cancel-button,
  .save-button {
    width: 100%;
  }
}

/* Collections Editor Styles */
.color-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.color-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.color-option:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.color-option input[type="radio"] {
  display: none;
}

.color-preview {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-option input[type="radio"]:checked + .color-preview {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
  transform: scale(1.1);
}

.color-checkmark {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.color-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

@media (max-width: 768px) {
  .color-selection-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
  
  .color-option {
    padding: 0.5rem;
  }
  
  .color-preview {
    width: 50px;
    height: 50px;
  }
  
  .color-label {
    font-size: 12px;
  }
}

/* Push animations */
text.push-animation {
  transform: translate(-0.5em, -0.5em) scale(1.6);
  opacity: 0;
  animation: fade 2s ease-in-out backwards;
}

/* Floating points for off-board pushes */
text.floating-points-animation {
  transform: translate(-0.5em, -0.5em) scale(1.6);
  opacity: 0;
  animation: fade 2s ease-in-out forwards;
}

@keyframes fade {
  0% {
    transform: translateY(0%);
    opacity: 1;
  }
  100% {
    transform: translateY(-8%);
    opacity: 0.2;
  }
}

/* Transition effects */
.slow-transition polygon {
  transition: 2s ease-out !important;
}

circle {	
scale: 1.875;	/* base circle size - 25% larger */
}

.selected circle{	
scale: 2.1875;	/* larger selected circle size - 25% larger */
}

/* General styles */
.app-logo {
  height: 60px;
  width: auto;
}

/* Landscape warning styles */
.landscape-warning {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  color: white;
  text-align: center;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
}

.landscape-warning.visible {
  display: flex;
}

.rotate-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.rotate-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  -o-object-position: center;
     object-position: center;
}

.landscape-warning p {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(14px, 2vw, 20px);
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  font-weight: 600;
  text-align: center;
  padding: 0 2rem;
  margin: 0;
}

.fullscreen-button {
  position: fixed !important;
  top: 8%;
  left: .4rem;
}

.volume-button {
  position: fixed !important;
  top: 12%;
  left: .4rem;
}

@media only screen and (max-width: 480px) {

  .app-logo {
    height: 45px;
  }
}

@media screen and (max-width: 600px) {
  /* Styles for small screens */
}

@media screen and (min-width: 601px) and (max-width: 1200px) {
  /* Styles for medium screens */
}

.App-logo {
  pointer-events: none;
}

.username {
  font-size: 10px;
  text-align: left;
  margin-left: 5px;
  margin-top: 0;
}

.main-content.hidden-header {
  margin-top: -60px;
}

/* General styles for h3 */
h3 {
  position: relative;
  transform: scale(0.8);
}

/* Fullscreen-specific styles */
.fullscreen-h3 {
  position: relative;
  transform: scale(0.8);
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

@media (min-width: 820px) {
  .fullscreen-h3 {
    transform: scale(1.2);  
  }
  h3{
    transform: scale(1.2);  
  }
}



.App-main {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* PUSHED TARGET ANIMATIONS */

@keyframes nudgeAnimationWest {
  0% {
    transform: translateX(14%);
    visibility: visible;
  }
  25% {
    transform: translateX(10%);
  }
  50% {
    transform: translateX(7%);
  }
  75% {
    transform: translateX(3%);
  }
  100% {
    transform: translateX(-1%);
  }
}

svg g.West .hexagon {
  animation: nudgeAnimationWest 0.5s ease-in-out backwards;
}

@keyframes nudgeAnimationEast {
  0% {
    transform: translateX(-14%);
    visibility: visible;
  }
  25% {
    transform: translateX(-10%);
  }
  50% {
    transform: translateX(-7%);
  }
  75% {
    transform: translateX(-3%);
  }
  100% {
    transform: translateX(1%);
  }
}

svg g.East .hexagon {
  animation: nudgeAnimationEast 0.5s ease-in-out backwards;
}

@keyframes nudgeAnimationNW {
  0% {
    transform: translate(7.5%, 12.75%);
    visibility: visible;
  }
  25% {
    transform: translate(5.625%, 9.5625%);
  }
  50% {
    transform: translate(3.75%, 6.375%);
  }
  75% {
    transform: translate(1.875%, 3.1875%);
  }
  100% {
    transform: translate(-1%, -1%);
  }
}

svg g.NW .hexagon {
  animation: nudgeAnimationNW 0.5s ease-in-out backwards;
}

@keyframes nudgeAnimationSE {
  0% {
    transform: translate(-7.5%, -12.75%);
    visibility: visible;
  }
  25% {
    transform: translate(-5.625%, -9.5625%);
  }
  50% {
    transform: translate(-3.75%, -6.375%);
  }
  75% {
    transform: translate(-1.875%, -3.1875%);
  }
  100% {
    transform: translate(1%, 1%);
  }
}

svg g.SE .hexagon {
  animation: nudgeAnimationSE .5s ease-in-out backwards;
}

@keyframes nudgeAnimationNE {
  0% {
    transform: translate(-7.5%, 12.75%);
    visibility: visible;
  }
  25% {
    transform: translate(-5.625%, 9.5625%);
  }
  50% {
    transform: translate(-3.75%, 6.375%);
  }
  75% {
    transform: translate(-1.875%, 3.1875%);
  }
  100% {
    transform: translate(1%, -1%);
  }
}

svg g.NE .hexagon {
  animation: nudgeAnimationNE .5s ease-in-out backwards;
}

@keyframes nudgeAnimationSW {
  0% {
    transform: translate(7.5%, -12.75%);
    visibility: visible;
  }
  25% {
    transform: translate(5.625%, -9.5625%);
  }
  50% {
    transform: translate(3.75%, -6.375%);
  }
  75% {
    transform: translate(1.875%, -3.1875%);
  }
  100% {
    transform: translate(-1%, 1%);
  }
}

svg g.SW .hexagon {
  animation: nudgeAnimationSW .5s ease-in-out backwards;
}

/* PUSH SOURCE ANIMATIONS */

@keyframes snudgeAnimationWest {
  0% {
    transform: translateX(0%);
    scale: 4;
  }
  5% {
    transform: translateX(2%);
  }
  10% {
    transform: translateX(-4%);
  }
  20% {
    transform: translateX(-2%);
    scale: 2;
  }
  100% {
    transform: translateX(0%);
    scale: 1;
  }
}

.sWest circle{	
  animation: snudgeAnimationWest 0.5s ease-in-out backwards;
  scale: 2;
}

@keyframes snudgeAnimationEast {
  0% {
    transform: translateX(0%);
    scale: 4;
  }
  5% {
    transform: translateX(-2%);
  }
  10% {
    transform: translateX(4%);
  }
  20% {
    transform: translateX(2%);
    scale: 2;
  }
  100% {
    transform: translateX(0%);
    scale: 1;
  }
}

.sEast circle{	
  animation: snudgeAnimationEast 0.5s ease-in-out backwards;
  scale: 2;
}

@keyframes snudgeAnimationNW {
  0% {
    transform: translate(0%, 0%);
    scale: 4;
  }
  5% {
    transform: translate(1.7%, 3%);
  }
  10% {
    transform: translate(-1.7%, -3%);
  }
  20% {
    transform: translate(-.85%, -1.5%);
    scale: 2;
  }
  100% {
    transform: translate(0%);
    scale: 1;
  }
}

.sNW circle{	
  animation: snudgeAnimationNW 0.5s ease-in-out backwards;
  scale: 2;
}

@keyframes snudgeAnimationSE {
  0% {
    transform: translate(0%, 0%);
    scale: 4;
  }
  5% {
    transform: translate(-1.7%, -3%);
  }
  10% {
    transform: translate(1.7%, 3%);
  }
  20% {
    transform: translate(.85%, 1.5%);
    scale: 2;
  }
  100% {
    transform: translate(0%);
    scale: 1;
  }
}

.sSE circle{	
  animation: snudgeAnimationSE 0.5s ease-in-out backwards;
  scale: 2;
}

@keyframes snudgeAnimationNE {
  0% {
    transform: translate(0%, 0%);
    scale: 4;
  }
  5% {
    transform: translate(-1.7%, 3%);
  }
  10% {
    transform: translate(1.7%, -3%);
  }
  20% {
    transform: translate(.85%, -1.5%);
    scale: 2;
  }
  100% {
    transform: translate(0%);
    scale: 1;
  }
}

.sNE circle{	
  animation: snudgeAnimationNE 0.5s ease-in-out backwards;
  scale: 2;
}

@keyframes snudgeAnimationSW {
  0% {
    transform: translate(0%, 0%);
    scale: 4;
  }
  5% {
    transform: translate(1.7%, -3%);
  }
  10% {
    transform: translate(-1.7%, 3%);
  }
  20% {
    transform: translate(-.85%, 1.5%);
    scale: 2;
  }
  100% {
    transform: translate(0%);
    scale: 1;
  }
}

.sSW circle{	
  animation: snudgeAnimationSW 0.5s ease-in-out backwards;
  scale: 2;
}

/* falling off animations here */

@keyframes fnudgeAnimationNW {
  0% {
    transform: translate(1%, 1%);
    visibility: visible;
    opacity: 1;
  }
  50% {
    transform: translate(-7.5%, -12.75%);
    opacity: 1;
  }
  100% { 
    transform: translate(-7.5%, -12.75%);
    opacity: 0;
  }
}

svg g.fNW .hexagon{	
  animation: fnudgeAnimationNW 1s ease-in-out forwards;
  opacity: 0;
}

@keyframes fnudgeAnimationNE {
  0% {
    transform: translate(1%, 1%);
    visibility: visible;
    opacity: 1;
  }
  50% {
    transform: translate(7.5%, -12.75%);
    opacity: 1;
  }
  100% { 
    transform: translate(7.5%, -12.75%);
    opacity: 0;
  }
}

svg g.fNE .hexagon{	
  animation: fnudgeAnimationNE 1s ease-in-out forwards;
  opacity: 0;
}

@keyframes fnudgeAnimationSE {
  0% {
    transform: translate(-1%, -1%);
    visibility: visible;
    opacity: 1;
  }
  50% {
    transform: translate(7.5%, 12.75%);
    opacity: 1;
  }
  100% { 
    transform: translate(7.5%, 12.75%);
    opacity: 0;
  }
}

svg g.fSE .hexagon{	
  animation: fnudgeAnimationSE 1s ease-in-out forwards;
  opacity: 0;
}

@keyframes fnudgeAnimationSW {
  0% {
    transform: translate(-1%, -1%);
    visibility: visible;
    opacity: 1;
  }
  50% {
    transform: translate(-7.5%, 12.75%);
    opacity: 1;
  }
  100% { 
    transform: translate(-7.5%, 12.75%);
    opacity: 0;
  }
}

svg g.fSW .hexagon{	
  animation: fnudgeAnimationSW 1s ease-in-out forwards;
  opacity: 0;
}

@keyframes fnudgeAnimationWest {
  0% {
    transform: translateX(0%);
    visibility: visible;
    opacity: 1;
  }
  50% {
    transform: translateX(-15%);
    opacity: 1;
  }
  100% { 
    transform: translateX(-15%);
    opacity: 0;
  }
}

svg g.fWest .hexagon{	
  animation: fnudgeAnimationWest 1s ease-in-out forwards;
  opacity: 0;
}

@keyframes fnudgeAnimationEast {
  0% {
    transform: translateX(0%);
    visibility: visible;
    opacity: 1;
  }
  50% {
    transform: translateX(15%);
    opacity: 1;
  }
  100% { 
    transform: translateX(15%);
    opacity: 0;
  }
}

svg g.fEast .hexagon{	
  animation: fnudgeAnimationEast 1s ease-in-out forwards;
  opacity: 0;
}

text.newfriend-animation {
  opacity: 0;
  animation: fade2 2s ease-in-out backwards; 
  scale: 1;
}

@keyframes fade2 {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0.2;
  }
}

.player-bar {
  display: flex;
  align-items: center;
}

.player-bar.top {
  position: fixed;
  top: 20vh;
  left: 20vw;
  font-size: 1.5vw;
  scale: 1;
}

@media (max-width: 768px) {
  .player-bar.top {
    position: fixed;
    bottom: 80vh;
    left: 50vw;
    transform: translateX(-50%);
    font-size: 4vw;
  }
}

.player-bar.bottom {
  position: fixed;
  top: 67.5vh;
  left: 20vw;
  font-size: 1.5vw;
  scale: 1;
}

@media (max-width: 768px) {
  .player-bar.bottom {
    position: fixed;
    bottom: 55vh;
    left: 50vw;
    transform: translateX(-50%);
    font-size: 4vw;
  }
}

@media (max-width: 360px) {
  .player-bar.bottom {
    /* Additional mobile styles */
  }
}

/* Game List Screen Styles */
.game-list-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: relative;
}

.game-list-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.back-button-game-list {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-button-game-list:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(-2px);
}

.game-list-content h2 {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: bold;
  margin-bottom: 2rem;
  line-height: 1.2;
  color: white;
}

.game-list-content p {
  font-size: clamp(18px, 4vw, 24px);
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

.game-list-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
}

.game-list-loading .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem auto;
}

.game-list-loading p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin: 0;
}

.games-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.games-section h3 {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
  text-align: left;
}

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

.game-item-button {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.game-item-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.game-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.15rem;
}

.game-id {
  font-weight: 600;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-family: monospace;
  color: white;
}

.game-date {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.game-item-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 500;
  color: white;
}

.opponent-info {
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  color: rgba(255, 255, 255, 0.9);
}

.game-id-role {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.game-role-tag {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-role-tag.host {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.4);
}

.game-role-tag.invited {
  background: rgba(0, 123, 255, 0.2);
  color: #007bff;
  border: 1px solid rgba(0, 123, 255, 0.4);
}

.no-games-message {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.no-games-message p {
  margin: 0 0 0.75rem 0;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: white;
}

.no-games-message small {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.85rem, 1.8vw, 1rem);
}

.no-games-overall {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin-top: 1rem;
}

.no-games-overall p {
  margin: 0 0 0.75rem 0;
  font-size: clamp(1.1rem, 2.8vw, 1.3rem);
  color: white;
}

.no-games-overall small {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
}

.error-message {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.5);
  color: #ff6b6b;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

/* Mobile optimizations for Game List Screen */
@media (max-width: 768px) {
  .game-list-screen {
    padding: 1rem;
  }

  .game-list-container {
    padding: 1.5rem;
    max-width: 350px;
    max-height: 85vh;
    overflow-y: auto;
    margin: 0.5rem;
  }
  
  .game-list-content h2 {
    font-size: clamp(24px, 5vw, 36px);
  }
  
  .games-sections {
    gap: 1.5rem;
  }
  
  .games-section h3 {
    font-size: clamp(18px, 3.5vw, 24px);
  }
  
  .game-item-button {
    padding: 0.6rem 0.8rem;
  }
  
  .game-item-status {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
  }
  
  .game-id {
    font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  }
  
  .game-date {
    font-size: clamp(0.8rem, 1.8vw, 1rem);
  }
  
  .status-info {
    font-size: clamp(0.85rem, 2vw, 1rem);
  }
  
  .opponent-info {
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  }
  
  .game-role-tag {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }

  .waiting-screen {
    padding: 1rem;
  }

  .waiting-container {
    padding: 1.5rem;
    max-width: 350px;
    max-height: 85vh;
    overflow-y: auto;
    margin: 0.5rem;
  }
  
  .waiting-content h2 {
    font-size: clamp(24px, 5vw, 36px);
    margin: 1rem 0;
  }
  
  .waiting-content p {
    font-size: clamp(16px, 3.5vw, 20px);
    margin-bottom: 1.5rem;
  }
  
  .share-url-input {
    font-size: 0.75rem;
    padding: 0.6rem;
  }
  
  .share-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .waiting-tips {
    padding: 0.75rem;
  }
  
  .waiting-tips h3 {
    font-size: clamp(16px, 3.5vw, 20px);
    margin-bottom: 0.75rem;
  }
  
  .waiting-tips li {
    font-size: 0.8rem;
    padding: 0.2rem 0;
  }
  
  .copy-button {
    padding: 0.6rem;
  }
  
  .back-button-waiting {
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.4rem;
  }
}
/* Desktop-specific styles */
@media (min-width: 769px) {
  .game-list-container {
    max-height: 80vh;
    overflow-y: auto;
    /* Hide scrollbar while maintaining scroll functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
  }

  .game-list-container::-webkit-scrollbar {
    display: none; /* WebKit browsers (Chrome, Safari, Edge) */
  }
}

/* Global Stats Bar Styles */
.global-stats-bar {
  width: 100%;
  margin: 2rem auto 1rem;
  padding: 0 1rem;
  max-width: 900px;
}

.global-stats-bar.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.stats-loading-text {
  color: #6c757d;
  font-size: 0.9rem;
}

.global-stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  max-width: 100%;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .global-stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 0.75rem;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }
}

/* Stats Modal Styles */
.stats-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.stats-modal {
  background: white;
  border-radius: 16px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.stats-modal-header {
  padding: 1.5rem;
  border-bottom: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  border-radius: 16px 16px 0 0;
}

.stats-modal-header h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
}

.modal-close-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: #6c757d;
  transition: all 0.2s ease;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-button:hover {
  background-color: #f8f9fa;
  color: #dc3545;
}

.stats-modal-content {
  padding: 1.5rem;
}

.stats-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
}

.stats-modal-loading p {
  color: #6c757d;
  font-size: 1rem;
}

.stats-no-data {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
}

.stats-no-data p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.stats-no-data-sub {
  font-size: 0.9rem;
  color: #adb5bd;
}

.stats-section {
  margin-bottom: 2rem;
}

.stats-section:last-child {
  margin-bottom: 0;
}

.stats-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e0e0e0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.stat-box {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-box:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.stat-box-value {
  font-size: 2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.25rem;
}

.stat-box-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recent-games-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recent-game-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.recent-game-item:hover {
  background: #e9ecef;
}

.recent-game-result {
  flex-shrink: 0;
}

.recent-game-info {
  flex: 1;
  min-width: 0;
}

.recent-game-opponent {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
}

.recent-game-score {
  font-size: 0.9rem;
  color: #6c757d;
}

.recent-game-date {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: #adb5bd;
}

.stats-empty-state {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
}

.stats-empty-state p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.stats-empty-sub {
  font-size: 0.9rem;
  color: #adb5bd;
}

@media (max-width: 768px) {
  .stats-modal {
    max-height: 95vh;
    border-radius: 12px;
  }

  .stats-modal-header h2 {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-box {
    padding: 0.75rem;
  }

  .stat-box-value {
    font-size: 1.5rem;
  }

  .recent-game-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .recent-game-date {
    align-self: flex-end;
  }
}