.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background-color: transparent;
  color: var(--secondary-color);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.dark .theme-toggle {
  background-color: rgba(30, 30, 30, 0.8);
  color: #fff;
}

.theme-toggle:hover {
  transform: scale(1.1);
  background-color: var(--primary-color);
  color: #fff;
}

.theme-toggle .moon-icon {
  color: #6366f1;
}

.theme-toggle .sun-icon {
  color: #fbbf24;
}

@media (max-width: 768px) {
  .theme-toggle {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }
} .login-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--light-bg-color);
  transition: background-color 0.3s ease;
  padding: 16px;
}

.dark .login-container {
  background-color: var(--dark-bg-color);
}

.login-hero {
  text-align: center;
  position: relative;
  margin-bottom: 24px;
  padding-top: 40px;
}

.login-logo h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.dark .login-logo h1 {
  color: #7dd3fc;
}

.login-tagline {
  font-size: 1rem;
  color: var(--secondary-color);
  margin-bottom: 0;
}

.dark .login-tagline {
  color: #9ca3af;
}

.login-card {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  padding: 24px;
  border-radius: var(--border-radius);
  background-color: var(--surface-color);
  box-shadow: var(--card-shadow);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.dark .login-card {
  background-color: var(--surface-dark-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.login-subtitle {
  text-align: center;
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--primary-color);
}

.dark .login-subtitle {
  color: #7dd3fc;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 500;
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.dark .form-group label {
  color: #9ca3af;
}

.twitter-input-container {
  display: flex;
  align-items: center;
  background-color: var(--surface-color);
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.dark .twitter-input-container {
  background-color: var(--surface-dark-color);
  border-color: #333;
}

.twitter-input-container:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2);
}

.dark .twitter-input-container:focus-within {
  box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.2);
}

.twitter-at {
  padding: 0 12px;
  color: var(--secondary-color);
  font-weight: 600;
}

.dark .twitter-at {
  color: #9ca3af;
}

.twitter-input {
  flex: 1;
  padding: 12px 12px 12px 0;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--light-text-color);
}

.dark .twitter-input {
  color: var(--dark-text-color);
}

.twitter-input:focus {
  outline: none;
}

.login-button {
  padding: 14px;
  border-radius: 50px;
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-button:hover {
  background-color: var(--primary-dark-color);
  transform: translateY(-2px);
}

.login-button:active {
  transform: translateY(0);
}

.dark .login-button {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.login-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
}

.dark .login-button:disabled {
  background-color: #444;
}

.error-message {
  color: #e53935;
  font-size: 0.9rem;
  margin-bottom: 16px;
  padding: 8px 12px;
  background-color: #ffebee;
  border-radius: 8px;
}

.dark .error-message {
  background-color: #3e1c1f;
  color: #ef9a9a;
}

.game-info {
  margin-top: 24px;
  padding: 16px;
  background-color: var(--light-bg-color);
  border-radius: var(--border-radius);
}

.dark .game-info {
  background-color: #2d2d2d;
}

.game-info h3 {
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.dark .game-info h3 {
  color: #7dd3fc;
}

.game-info ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.game-info li {
  padding: 6px 0;
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--light-text-color);
}

.dark .game-info li {
  color: var(--dark-text-color);
}

.game-info li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.dark .game-info li:before {
  color: #7dd3fc;
}

.login-footer {
  margin-top: auto;
  padding: 16px 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--secondary-color);
}

.dark .login-footer {
  color: #9ca3af;
}

/* Country Autocomplete Styles */
.country-autocomplete {
  position: relative;
}

.country-input-wrapper {
  position: relative;
}

.country-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  background-color: var(--surface-color);
  color: var(--light-text-color);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.dark .country-input {
  background-color: var(--surface-dark-color);
  border-color: #333;
  color: var(--dark-text-color);
}

.country-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2);
}

.dark .country-input:focus {
  box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.2);
}

.country-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background-color: var(--surface-color);
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 12px 12px;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dark .country-suggestions {
  background-color: var(--surface-dark-color);
  border-color: #333;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.country-suggestion {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease;
  color: var(--light-text-color);
}

.dark .country-suggestion {
  color: var(--dark-text-color);
}

.country-suggestion:hover {
  background-color: var(--light-bg-color);
}

.dark .country-suggestion:hover {
  background-color: #2d2d2d;
}

.country-suggestion.active {
  background-color: rgba(74, 111, 165, 0.1);
}

.dark .country-suggestion.active {
  background-color: rgba(125, 211, 252, 0.1);
}

.country-flag {
  font-size: 1.25rem;
}

.no-suggestions {
  padding: 12px 16px;
  color: var(--secondary-color);
  font-style: italic;
  text-align: center;
}

.dark .no-suggestions {
  color: #9ca3af;
}

/* Responsive adjustments */
@media (min-width: 640px) {
  .login-container {
    padding: 24px;
    justify-content: center;
  }
  
  .login-card {
    padding: 32px;
  }
  
  .login-logo h1 {
    font-size: 3rem;
  }
  
  .login-tagline {
    font-size: 1.1rem;
  }
} .keyboard {
  width: 100%;
  max-width: 100%;
  margin: 12px auto 0;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  box-sizing: border-box;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  width: 100%;
  flex-wrap: nowrap;
}

.keyboard-key {
  flex: 1;
  min-width: 0;
  height: 44px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  background-color: var(--light-bg-color);
  color: var(--light-text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: none;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}

.dark .keyboard-key {
  background-color: #2d2d2d;
  color: var(--dark-text-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.keyboard-key:hover:not(:disabled) {
  background-color: #e0e0e0;
  transform: translateY(-2px);
}

.dark .keyboard-key:hover:not(:disabled) {
  background-color: #3d3d3d;
}

.keyboard-key:active:not(:disabled) {
  transform: translateY(0);
}

.keyboard-key:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.key-guessed {
  background-color: var(--primary-color);
  color: white;
}

.dark .key-guessed {
  background-color: #0284c7;
  color: white;
}

/* Mobile-first responsive design */

/* Extra small devices (320px and up) */
@media (min-width: 320px) {
  .keyboard {
    padding: 0 6px;
    gap: 5px;
  }
  
  .keyboard-row {
    gap: 3px;
  }
  
  .keyboard-key {
    height: 40px;
    font-size: 0.9rem;
    border-radius: 5px;
  }
}

/* Small devices (360px and up) */
@media (min-width: 360px) {
  .keyboard {
    padding: 0 8px;
    gap: 6px;
  }
  
  .keyboard-row {
    gap: 4px;
  }
  
  .keyboard-key {
    height: 42px;
    font-size: 0.95rem;
    border-radius: 6px;
  }
}

/* Medium small devices (375px and up - iPhone SE, etc) */
@media (min-width: 375px) {
  .keyboard {
    padding: 0 10px;
  }
  
  .keyboard-key {
    height: 44px;
    font-size: 1rem;
  }
}

/* Standard mobile (400px and up) */
@media (min-width: 400px) {
  .keyboard {
    padding: 0 12px;
    gap: 7px;
  }
  
  .keyboard-row {
    gap: 5px;
  }
  
  .keyboard-key {
    height: 46px;
    font-size: 1.05rem;
  }
}

/* Large mobile (480px and up) */
@media (min-width: 480px) {
  .keyboard {
    padding: 0 16px;
    gap: 8px;
  }
  
  .keyboard-row {
    gap: 6px;
  }
  
  .keyboard-key {
    height: 48px;
    font-size: 1.1rem;
    border-radius: 7px;
  }
}

/* Tablets (640px and up) */
@media (min-width: 640px) {
  .keyboard {
    max-width: 600px;
    padding: 0 20px;
    gap: 10px;
  }
  
  .keyboard-row {
    gap: 8px;
  }
  
  .keyboard-key {
    height: 52px;
    font-size: 1.15rem;
    border-radius: 8px;
  }
}

/* Desktop (768px and up) */
@media (min-width: 768px) {
  .keyboard {
    max-width: 650px;
  }
  
  .keyboard-key {
    height: 54px;
    font-size: 1.2rem;
  }
}

/* Large screens (1024px and up) */
@media (min-width: 1024px) {
  .keyboard {
    max-width: 700px;
  }
  
  .keyboard-key {
    height: 56px;
    font-size: 1.25rem;
  }
}
 .hangman-display {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  padding: 8px 0;
}

.hangman-svg {
  max-width: 100%;
  height: auto;
  transition: all 0.3s ease;
}

.hangman-line {
  stroke: var(--light-text-color);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

.dark .hangman-line {
  stroke: var(--dark-text-color);
}

.hangman-part {
  stroke: var(--primary-color);
  stroke-width: 4;
  stroke-linecap: round;
  fill: none;
  transition: stroke 0.3s ease;
}

.dark .hangman-part {
  stroke: #0ea5e9;
}

.hangman-face {
  stroke: #e53935;
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke 0.3s ease;
}

.dark .hangman-face {
  stroke: #ef9a9a;
}

/* Mobile-first responsive adjustments */
@media (max-width: 480px) {
  .hangman-svg {
    height: 160px;
    width: 160px;
  }
  
  .hangman-line, .hangman-part {
    stroke-width: 3;
  }
  
  .hangman-face {
    stroke-width: 1.5;
  }
}

@media (max-width: 360px) {
  .hangman-svg {
    height: 140px;
    width: 140px;
  }
}

/* Larger screens */
@media (min-width: 640px) {
  .hangman-svg {
    height: 220px;
    width: 220px;
  }
} /* Highscores Full Screen Overlay */
.highscores-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
}

.dark .highscores-overlay {
    background-color: rgba(0, 0, 0, 0.85);
}

/* Container */
.highscores-container {
    width: 100%;
    max-width: 600px;
    height: 85vh;
    background-color: var(--surface-color);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Important for internal scrolling */
    animation: slideUp 0.3s ease-out;
    position: relative;
}

.dark .highscores-container {
    background-color: var(--surface-dark-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

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

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

/* Header Section (Fixed at top) */
.highscores-header-section {
    padding: 20px 24px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.highscores-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.close-highscores-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-highscores-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark .close-highscores-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Search Bar (Fixed) */
.highscores-search {
    padding: 0 24px 10px;
    flex-shrink: 0;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    font-size: 1rem;
    font-family: inherit;
    background: var(--light-bg-color);
    color: var(--light-text-color);
}

.dark .search-input {
    background: #1f2937;
    border-color: #374151;
    color: white;
}

.clear-search-btn {
    position: absolute;
    right: 34px;
    top: 50%;
    transform: translateY(-50%);
    /* Adjust due to padding bottom */
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #999;
    padding: 4px;
}

/* Correct centering for clear btn since top calc includes padding */
.highscores-search .clear-search-btn {
    top: calc(50% - 5px);
}

/* Filters (Fixed) */
.highscores-filters {
    padding: 0 24px 16px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: var(--light-bg-color);
    color: var(--secondary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.active.filter-btn {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(74, 111, 165, 0.3);
}

/* Country Selector Trigger Button */
.country-selector-trigger {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--light-text-color);
    transition: all 0.2s;
}

.dark .country-selector-trigger {
    background: #1f2937;
    border-color: #374151;
    color: white;
}

.selected-country-flag {
    font-size: 1.5rem;
}

.selected-country-name {
    flex-grow: 1;
    text-align: left;
    font-weight: 500;
}

.chevron {
    color: #999;
    font-size: 0.8rem;
}

/* Scrollable Content Wrapper */
.highscores-content-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    background: var(--light-bg-color);
    /* Slight contrast */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    /* For sticky header */
}

.dark .highscores-content-wrapper {
    background: #111827;
    border-top-color: rgba(255, 255, 255, 0.05);
}

/* Sticky Header inside Wrapper */
.highscores-table-header {
    display: grid;
    grid-template-columns: 50px 1fr 40px 70px;
    /* Adjusted columns */
    padding: 12px 16px;
    background: var(--surface-color);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.dark .highscores-table-header {
    background: #1f2937;
}

/* List Items */
.highscores-list {
    display: flex;
    flex-direction: column;
}

.highscore-item {
    display: grid;
    grid-template-columns: 50px 1fr 40px 70px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    align-items: center;
    font-size: 0.95rem;
    background: var(--surface-color);
}

.dark .highscore-item {
    background: var(--surface-dark-color);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.rank-col {
    text-align: center;
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.player-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.player-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.you-badge {
    font-size: 0.65rem;
    background: var(--primary-color);
    color: white;
    padding: 1px 4px;
    border-radius: 4px;
    width: -moz-fit-content;
    width: fit-content;
}

.flag-col {
    font-size: 1.4rem;
    text-align: center;
}

.score-col {
    text-align: right;
    font-weight: 800;
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* Current User Highlight */
.highscore-item.current-user {
    background: rgba(74, 111, 165, 0.08);
    /* Light Blue Tint */
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
    /* Compensate padding */
}

.dark .highscore-item.current-user {
    background: rgba(2, 132, 199, 0.15);
}

/* Loading Logic */
.loading-spinner,
.loading-more,
.end-message,
.no-highscores {
    padding: 20px;
    text-align: center;
    color: var(--secondary-color);
    width: 100%;
}

.loading-more {
    font-size: 0.9rem;
    padding: 10px;
}

/* Country Modal Styling */
.country-modal-overlay {
    position: absolute;
    /* Relative to highscores-container if needed, or fixed global? */
    /* Let's make it absolute to container to keep context */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Bottom sheet on mobile? Or center? */
}

.country-modal {
    width: 100%;
    height: 90%;
    /* Almost full height */
    background: var(--surface-color);
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    animation: slideUpModal 0.2s ease-out;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.dark .country-modal {
    background: var(--surface-dark-color);
}

@keyframes slideUpModal {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.country-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.country-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.country-search-input {
    margin: 16px 20px 10px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
    background: var(--light-bg-color);
}

.dark .country-search-input {
    background: #1f2937;
    border-color: #374151;
    color: white;
}

.country-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 10px 20px;
}

.country-option {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    /* Large readable text */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    color: var(--light-text-color);
}

.dark .country-option {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.country-option:hover {
    background: rgba(0, 0, 0, 0.03);
}

.country-option.selected {
    background: rgba(74, 111, 165, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.country-flag {
    font-size: 1.5rem;
}

/* Mobile Adjustments (100dvh) */
@media (max-width: 600px) {
    .highscores-container {
        max-width: 100%;
        height: 100dvh;
        /* Full viewport height */
        border-radius: 0;
        animation: none;
        /* Maybe slide from right? */
    }

    .highscores-overlay {
        align-items: flex-end;
        /* Bottom sheet logic not needed if full screen, just covers */
    }

    .highscores-header-section {
        padding: 16px 16px 10px;
    }

    .highscores-search {
        padding: 0 16px 10px;
    }

    .highscores-filters {
        padding: 0 16px 10px;
    }

    .highscore-item,
    .highscores-table-header {
        padding: 12px 10px;
        grid-template-columns: 35px 1fr 30px 60px;
        /* Compact */
        font-size: 0.9rem;
    }

    /* Make Country Modal full screen on mobile too */
    .country-modal {
        height: 100%;
        border-radius: 0;
    }

    .flag-col {
        font-size: 1.2rem;
    }

    .rank-col {
        font-size: 1rem;
    }
}/* Game Container */
.game-container {
  padding: 0;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.game-header {
  margin-bottom: 16px;
  padding: 0;
  border-radius: var(--border-radius);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: var(--primary-color);
}

.dark .page-title {
  color: #7dd3fc;
}

/* Timer styles */
.timer-container {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.timer {
  background-color: var(--light-bg-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.dark .timer {
  background-color: var(--surface-dark-color);
  color: #7dd3fc;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.timer-warning {
  background-color: #ffebee;
  color: #e53935;
  animation: pulse 1s infinite alternate;
}

.dark .timer-warning {
  background-color: #5a1e1a;
  color: #f48b86;
}

@keyframes pulse {
  from {
    opacity: 0.8;
  }
  to {
    opacity: 1;
  }
}

/* User info section */
.user-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  padding: 10px 15px;
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.dark .user-info {
  background-color: var(--surface-dark-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-info p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-label {
  font-weight: 600;
  color: var(--secondary-color);
  font-size: 0.75rem;
}

.dark .user-label {
  color: #9ca3af;
}

.user-value {
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  color: var(--light-text-color);
}

.dark .user-value {
  color: var(--dark-text-color);
}

.user-value .country-flag {
  font-size: 1.25rem;
  margin-right: 4px;
}

/* Game content */
.game-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  width: 100%;
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: background-color 0.3s ease;
}

.dark .game-content {
  background-color: var(--surface-dark-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Word display */
.word-display {
  margin: 16px 0;
  text-align: center;
  min-height: 40px;
}

.word-display p {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 4px;
  margin: 0;
  padding: 8px;
  color: var(--light-text-color);
}

.dark .word-display p {
  color: var(--dark-text-color);
}

/* Game message */
.game-message {
  text-align: center;
  margin: 16px 0;
  padding: 12px;
  border-radius: var(--border-radius);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.game-message.success-message {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.dark .game-message.success-message {
  background-color: #1b3a1c;
  color: #81c784;
}

.game-message.error-message {
  background-color: #ffebee;
  color: #c62828;
}

.dark .game-message.error-message {
  background-color: #3e1c1f;
  color: #ef9a9a;
}

/* Keyboard */
.keyboard-container {
  width: 100%;
  max-width: 480px;
  margin-top: 16px;
}

/* High scores */
.highscores-container {
  width: 100%;
  padding: 16px;
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: background-color 0.3s ease;
}

.dark .highscores-container {
  background-color: var(--surface-dark-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.highscores-title {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--primary-color);
}

.dark .highscores-title {
  color: #7dd3fc;
}

.highscores-filters {
  margin-bottom: 16px;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-btn {
  flex: 1;
  padding: 8px 16px;
  background-color: var(--light-bg-color);
  color: var(--secondary-color);
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.875rem;
  box-shadow: none;
}

.dark .filter-btn {
  background-color: #2d2d2d;
  color: #9ca3af;
}

.filter-btn.active {
  background-color: var(--primary-color);
  color: white;
}

.dark .filter-btn.active {
  background-color: #0284c7;
  color: white;
}

.country-selector {
  width: 100%;
  margin-top: 12px;
}

.country-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--border-radius);
  border: 1px solid #ddd;
  background-color: var(--surface-color);
  font-size: 0.875rem;
  color: var(--light-text-color);
}

.dark .country-select {
  background-color: var(--surface-dark-color);
  border-color: #333;
  color: var(--dark-text-color);
}

.highscores-list {
  width: 100%;
}

.highscores-header, .highscore-item {
  display: grid;
  grid-template-columns: 0.5fr 2fr 0.5fr 1fr;
  padding: 8px 12px;
  align-items: center;
  border-radius: 8px;
}

.highscores-header {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--secondary-color);
  background-color: var(--light-bg-color);
  margin-bottom: 8px;
}

.dark .highscores-header {
  color: #9ca3af;
  background-color: #2d2d2d;
}

.highscore-item {
  font-size: 0.875rem;
  margin-bottom: 4px;
  background-color: var(--light-bg-color);
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.dark .highscore-item {
  background-color: #2d2d2d;
}

.highscore-item.current-user {
  background-color: rgba(74, 111, 165, 0.1);
  font-weight: 600;
}

.dark .highscore-item.current-user {
  background-color: rgba(125, 211, 252, 0.1);
}

.user-ranking {
  font-size: 0.875rem;
  text-align: center;
  margin: 12px 0;
  font-weight: 500;
  color: var(--light-text-color);
}

.dark .user-ranking {
  color: var(--dark-text-color);
}

.back-to-game-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--border-radius);
  font-weight: 500;
  text-align: center;
  transition: background-color 0.3s ease;
}

.back-to-game-btn:hover {
  background-color: var(--primary-dark-color);
}

/* Definition modal */
.definition-btn {
  background-color: transparent;
  color: var(--primary-color);
  font-size: 0.875rem;
  padding: 8px 16px;
  font-weight: 500;
  box-shadow: none;
  text-decoration: underline;
}

.dark .definition-btn {
  color: #7dd3fc;
}

.definition-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  padding: 16px;
}

.definition-content {
  background-color: var(--surface-color);
  padding: 20px;
  border-radius: var(--border-radius);
  max-width: 90%;
  width: 100%;
  max-height: 80%;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.dark .definition-content {
  background-color: var(--surface-dark-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.definition-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary-color);
}

.dark .definition-content h3 {
  color: #7dd3fc;
}

.definition-content p {
  margin-bottom: 12px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.close-definition-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--border-radius);
  font-weight: 500;
  text-align: center;
}

.close-definition-btn:hover {
  background-color: var(--primary-dark-color);
}

/* Responsive adjustments */
@media (min-width: 480px) {
  .highscores-header, .highscore-item {
    grid-template-columns: 0.5fr 2fr 0.5fr 1fr;
  }
}

@media (min-width: 640px) {
  .game-container {
    padding: 0;
  }
  
  .definition-content {
    max-width: 480px;
  }
}

/* Necessary for maintaining game layout in mobile view */
@media (max-width: 480px) {
  .word-display p {
    font-size: 1.25rem;
    letter-spacing: 2px;
  }
}

/* Game controls and buttons */
.game-controls {
  display: flex;
  justify-content: center;
  margin: 16px 0;
  width: 100%;
}

.attempts-info {
  font-size: 0.9rem;
  color: var(--light-text-color);
  text-align: center;
}

.dark .attempts-info {
  color: var(--dark-text-color);
}

.new-game-btn {
  padding: 8px 16px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 120px;
}

.dark .new-game-btn {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.new-game-btn:hover {
  background-color: var(--primary-dark-color);
  transform: translateY(-2px);
}

.loading-btn {
  position: relative;
  cursor: default;
  opacity: 0.8;
  color: transparent;
}

.loading-btn::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: loading-spinner 1s ease infinite;
}

@keyframes loading-spinner {
  from { transform: rotate(0turn); }
  to { transform: rotate(1turn); }
}

.keyboard-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
  width: 100%;
}

.toggle-keyboard-btn {
  padding: 8px 16px;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 200px;
}

.dark .toggle-keyboard-btn {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-keyboard-btn:hover {
  background-color: var(--secondary-dark-color);
  transform: translateY(-2px);
}

.keyboard-input {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.keyboard-instructions {
  font-size: 0.8rem;
  color: var(--secondary-color);
  text-align: center;
  margin: 8px 0;
}

.dark .keyboard-instructions {
  color: #9ca3af;
}

.game-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding: 0 8px;
}

.highscores-btn {
  padding: 8px 16px;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark .highscores-btn {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.highscores-btn:hover {
  background-color: var(--secondary-dark-color);
  transform: translateY(-2px);
}

.logout-btn {
  padding: 8px 16px;
  background-color: #f87171;
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark .logout-btn {
  background-color: #ef4444;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logout-btn:hover {
  background-color: #ef4444;
  transform: translateY(-2px);
}

/* Responsive layout for game controls */
@media (min-width: 480px) {
  .game-controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 16px;
  }
  
  .keyboard-controls {
    flex-direction: row;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }
  
  .keyboard-instructions {
    width: 100%;
    text-align: center;
  }
}.multiplayer-game {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  padding: 10px;
}

/* --- HUD Header --- */
.multiplayer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.player-hud {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 45%;
}

.hud-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-color);
  text-transform: uppercase;
}

.vs-badge {
  font-size: 1.5rem;
  font-weight: 900;
  font-style: italic;
  color: #ffd700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: #444;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease-out;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2) inset;
}

/* Added Spacing for VS Badge */
.vs-badge {
  font-size: 1.5rem;
  font-weight: 900;
  font-style: italic;
  color: #ffd700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin: 0 15px;
  /* Added horizontal spacing */
}

.my-fill {
  background: linear-gradient(90deg, #4CAF50, #81C784);
}

.op-fill {
  background: linear-gradient(90deg, #F44336, #E57373);
}

.percent-text {
  font-size: 0.8rem;
  color: #bbb;
  text-align: right;
}

/* --- Arena Content --- */
.arena-content {
  position: relative;
  padding: 20px;
}

/* Hangman Display */
.hangman-section {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

/* Lives Counter */
.lives-counter {
  text-align: center;
  margin: 15px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.lives-label {
  color: var(--secondary-color);
  margin-right: 8px;
}

.lives-value {
  color: var(--primary-color);
  font-weight: 700;
}

/* Word Display */
.word-section {
  margin: 30px 0;
}

.word-section.word-display {
  text-align: center;
}

.word-section.word-display p {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.letter-box {
  display: inline-block;
  width: 40px;
  height: 50px;
  border-bottom: 3px solid var(--primary-color);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  line-height: 50px;
  color: var(--text-color);
}

/* Wrong Letters Display */
.wrong-letters {
  text-align: center;
  margin: 15px 0;
  padding: 10px;
  background: rgba(244, 67, 54, 0.1);
  border-radius: 8px;
}

.wrong-letters-label {
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin: 0 0 5px 0;
}

.wrong-letters-list {
  font-size: 1.1rem;
  color: #f44336;
  font-weight: 600;
  margin: 0;
}

/* --- Overlays --- */
.status-overlay,
.countdown-overlay,
.game-over-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100;
  border-radius: 12px;
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
}

.game-over-modal {
  background: #222;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  border: 2px solid #555;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 400px;
}

.game-over-modal h2 {
  color: #aaa;
  margin: 0;
  font-size: 1.2rem;
}

.game-over-modal h1 {
  font-size: 3rem;
  margin: 10px 0;
  background: linear-gradient(45deg, #FFD700, #FFA500);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-over-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}

.play-again-btn {
  padding: 12px 24px;
  font-size: 1.1rem;
  background: #555;
  /* Secondary action color */
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0;
  /* Override previous margin */
}

.play-again-btn:hover {
  background: #777;
}

.add-friend-btn {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-friend-btn:hover {
  background-color: #43A047;
}

.friend-added-msg {
  color: #4CAF50;
  font-weight: bold;
  font-size: 1rem;
  padding: 8px;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 8px;
  display: block;
}

.rematch-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  box-shadow: 0 4px 15px rgba(74, 111, 165, 0.4);
  width: 100%;
}

.rematch-btn:hover {
  background: var(--primary-color-dark);
  transform: scale(1.05);
}

.rematch-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rematch-alert {
  color: #4CAF50;
  font-weight: bold;
  animation: pulse 1s infinite;
}

.countdown-number {
  font-size: 8rem;
  font-weight: 900;
  color: white;
  animation: zoomOut 1s infinite;
}

@keyframes zoomOut {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-top: 20px;
}

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

  100% {
    transform: rotate(360deg);
  }
}

.eliminated-badge {
  background: #f44336;
  color: white;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
  margin-top: 4px;
  display: inline-block;
  align-self: flex-end;
}

/* Fullscreen Rematch Overlay */
.rematch-overlay-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.rematch-modal-content {
  background: #2a2a2a;
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 25px rgba(33, 150, 243, 0.5);
}

.rematch-modal-content h2 {
  color: white;
  margin-bottom: 10px;
  font-size: 1.8rem;
}

.rematch-modal-content p {
  color: #ccc;
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.rematch-accept-btn {
  background: var(--primary-color);
  color: white;
  font-size: 1.2rem;
  padding: 15px 40px;
  border: none;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
  transition: transform 0.2s;
}

.rematch-accept-btn:hover {
  transform: scale(1.05);
  background: var(--primary-color-dark);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}/* Full Screen Overlay */
.game-invitations-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Let clicks pass through if empty (React renders nothing if empty) */
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gamified-challenge-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Card Design */
.gamified-challenge-card {
  position: relative;
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 2px solid #4cc9f0;
  box-shadow: 0 0 30px rgba(76, 201, 240, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.5);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  color: white;
  width: 90%;
  max-width: 500px;
  overflow: hidden;
  animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
  from {
    transform: translateY(50px) scale(0.9);
    opacity: 0;
  }

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

/* Header Pulse */
.challenge-header {
  margin-bottom: 30px;
}

.pulse-text {
  font-size: 1.5rem;
  font-weight: 900;
  color: #f72585;
  text-shadow: 0 0 10px #f72585;
  animation: pulse 1.5s infinite;
  letter-spacing: 2px;
}

@keyframes pulse {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }

  100% {
    opacity: 0.8;
    transform: scale(1);
  }
}

/* Versus Container */
.versus-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.challenger-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.player-avatar-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.challenger-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #e0e0e0;
}

.vs-badge-large {
  font-size: 2rem;
  font-weight: 900;
  font-style: italic;
  color: #ffcc00;
  text-shadow: 2px 2px 0px #b76e00;
  margin: 0 10px;
  background: transparent;
}

.challenge-message {
  color: #a0a0a0;
  margin-bottom: 30px;
  font-size: 1rem;
}

/* Actions */
.gamified-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.gamified-btn {
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  transition: transform 0.1s, box-shadow 0.2s;
}

.accept-btn {
  background: linear-gradient(90deg, #43a047, #66bb6a);
  color: white;
  box-shadow: 0 4px 15px rgba(67, 160, 71, 0.4);
}

.accept-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(67, 160, 71, 0.6);
}

.accept-btn:active {
  transform: translateY(0);
}

.decline-btn {
  background: transparent;
  border: 2px solid #ef5350;
  color: #ef5350;
}

.decline-btn:hover {
  background: rgba(239, 83, 80, 0.1);
}.online-users-container {
  position: relative;
  margin-top: 15px;
}

.online-users-badge {
  display: inline-flex;
  align-items: center;
  background-color: var(--background-light);
  border-radius: 18px;
  padding: 5px 10px;
  font-size: 0.85rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.online-users-badge:hover {
  background-color: var(--background-alt);
  transform: translateY(-1px);
}

.online-indicator {
  width: 10px;
  height: 10px;
  background-color: var(--success-color);
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 5px var(--success-color);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(87, 204, 87, 0.6);
  }

  70% {
    box-shadow: 0 0 0 5px rgba(87, 204, 87, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(87, 204, 87, 0);
  }
}

.online-users-list {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 350px;
  max-height: 80vh;
  overflow-y: auto;
  background-color: #2a2a36;
  color: #ffffff;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  padding: 25px;
  z-index: 1100;
  animation: fadeIn 0.3s ease-out;
  border: 1px solid #444456;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -48%);
  }

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

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%);
  }

  to {
    opacity: 0;
    transform: translate(-50%, -48%);
  }
}

.online-users-list.closing {
  animation: fadeOut 0.2s ease-out forwards;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.popup-overlay.closing {
  animation: fadeOut 0.2s ease-out forwards;
}

.online-users-list h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #ffffff;
  font-size: 1.3rem;
  text-align: center;
  border-bottom: 1px solid #505068;
  padding-bottom: 15px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.online-users-list h4 {
  margin-top: 15px;
  margin-bottom: 10px;
  color: #e6e6fa;
  font-size: 1.05rem;
  border-left: 3px solid var(--primary-color);
  padding-left: 8px;
}

/* Minimalist & Embedded Styling */
.online-users-container.embedded {
  position: static;
  width: 100%;
  margin-top: 5px;
  /* Less margin */
}

.online-users-list.embedded-list {
  position: static;
  width: 100%;
  box-shadow: none;
  border: none;
  /* Removed border for cleaner look */
  background: transparent;
  /* Seamless blend */
  padding: 0;
  height: auto;
  max-height: none;
  transform: none;
}

.dark .online-users-list.embedded-list {
  background: var(--surface-dark-color);
  border-color: rgba(255, 255, 255, 0.05);
}

.online-users-list.embedded-list h3 {
  text-align: left;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 0;
  border-bottom: none;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.dark .online-users-list.embedded-list h3 {
  color: white;
}


/* Lobby Table Header (Fixed) */
.lobby-table-header {
  display: grid;
  grid-template-columns: 1fr 60px 120px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.dark .lobby-table-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Lobby List Container */
.lobby-list {
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Single Lobby Item (Row) */
.lobby-item {
  display: grid;
  grid-template-columns: 1fr 60px 120px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  align-items: center;
  background: var(--surface-color);
  transition: background 0.2s;
}

.dark .lobby-item {
  background: var(--surface-dark-color);
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.lobby-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

.dark .lobby-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* In Game State */
.lobby-item.in-game {
  opacity: 0.6;
}

/* Column: Player */
.lobby-player-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.lobby-player-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1f2937;
  /* Dark gray for light mode */
}

.dark .lobby-player-name {
  color: #f3f4f6;
  /* Light gray for dark mode */
}

.status-badge {
  font-size: 0.7rem;
  background: var(--secondary-color);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  width: -moz-fit-content;
  width: fit-content;
  opacity: 0.7;
}

.status-badge.busy {
  background: #f59e0b;
  /* Orange for busy status */
  opacity: 1;
}

/* Column: Flag */
.lobby-flag-col {
  font-size: 1.5rem;
  text-align: center;
}

/* Column: Action */
.lobby-action-col {
  text-align: right;
  display: flex;
  justify-content: flex-end;
}

/* Duel Button */
.lobby-duel-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.lobby-duel-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

.lobby-duel-btn:active {
  transform: translateY(0);
}

.busy-text {
  font-size: 0.8rem;
  color: var(--secondary-color);
  font-style: italic;
}

.sent-badge {
  font-size: 0.75rem;
  color: #10b981;
  /* Green */
  font-weight: 600;
  font-style: italic;
}

/* Load More Indicator */
.load-more-indicator {
  text-align: center;
  padding: 16px;
  color: var(--secondary-color);
  font-size: 0.85rem;
  font-style: italic;
}

/* Scrollbar Styling */
.lobby-list::-webkit-scrollbar {
  width: 6px;
}

.lobby-list::-webkit-scrollbar-track {
  background: transparent;
}

.lobby-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.dark .lobby-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 480px) {

  .lobby-table-header,
  .lobby-item {
    grid-template-columns: 1fr 50px 100px;
    padding: 12px 12px;
  }

  .lobby-duel-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* Refresh information styling */
.refresh-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: #b0b0c0;
  padding: 0 5px;
  background-color: rgba(35, 35, 46, 0.5);
  border-radius: 4px;
  padding: 5px 8px;
}

.refresh-info small {
  line-height: 1.4;
}

.refresh-btn {
  background: none;
  border: none;
  color: #b0b0c0;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.refresh-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
  transform: rotate(180deg);
}

.online-users-note {
  font-size: 0.8rem;
  color: #b0b0c0;
  text-align: center;
  border-top: 1px solid #3a3a4a;
  padding-top: 10px;
  background-color: #23232e;
  border-radius: 6px;
  padding: 10px;
  margin-top: 20px;
}

/* Search form styles */
.user-search-form {
  display: flex;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.user-search-input {
  flex-grow: 1;
  padding: 14px 16px;
  border: none;
  border-radius: 6px 0 0 6px;
  font-size: 1rem;
  outline: none;
  background-color: var(--surface-input);
  color: #ffffff;
}

.user-search-input::-moz-placeholder {
  color: #8888a0;
}

.user-search-input::placeholder {
  color: #8888a0;
}

.user-search-input:focus {
  box-shadow: 0 0 0 2px var(--primary-color);
}

.dark .user-search-input {
  background-color: rgba(255, 255, 255, 0.05);
}

.user-search-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0 6px 6px 0;
  padding: 0 15px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
  font-weight: 500;
}

.user-search-btn:hover {
  background-color: var(--primary-color-dark);
}

/* Search results styles */
.search-results {
  margin-bottom: 20px;
  padding: 12px;
  background-color: #23232e;
  border-radius: 6px;
  border: 1px solid #3a3a4a;
}

.user-search-result {
  display: flex;
  align-items: center;
  padding: 10px 8px;
  background-color: #32323f;
  border-radius: 4px;
}

.close-popup-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #b0b0c0;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.close-popup-btn:hover {
  color: #ffffff;
}

/* Invite button */
.invite-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  margin-left: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: inline-block;
  visibility: visible;
  opacity: 1;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
  letter-spacing: 0.5px;
}

.invite-btn:hover {
  background-color: var(--primary-color-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

/* Responsive styles */
@media (max-width: 480px) {
  .online-users-list {
    width: 90%;
    max-width: 350px;
    right: 0;
    left: 50%;
  }
}

@media (max-width: 360px) {
  .online-users-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  .online-users-list {
    width: 95%;
    padding: 15px;
  }
}.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-title {
  text-align: center;
  margin-bottom: 24px;
  color: var(--primary-color);
  font-size: 2rem;
}

.card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.error-message {
  color: var(--error-color);
  font-size: 14px;
  margin-top: 4px;
}

.success-message {
  color: var(--success-color);
  font-size: 14px;
  margin-top: 4px;
}

.btn-block {
  display: block;
  width: 100%;
}

@media (max-width: 768px) {
  .page-title {
    font-size: 1.75rem;
  }

  .card {
    padding: 20px;
  }
}

.mobile-container {
  width: 100%;
  height: 100vh;
  /* Changed from min-height to height to enforce scroll container */
  display: flex;
  flex-direction: column;
  background-color: var(--light-bg-color);
  transition: background-color 0.3s ease;
}

.dark .mobile-container {
  background-color: var(--dark-bg-color);
}

.mobile-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--surface-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.dark .mobile-header {
  background-color: var(--surface-dark-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.mobile-title {
  display: flex;
  align-items: center;
}

.mobile-title h1 {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0;
}

.dark .mobile-title h1 {
  color: #7dd3fc;
}

.mobile-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 15vh;
  /* Ensure space for keyboard/navigation */
}

.mobile-footer {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 16px;
  background-color: var(--surface-color);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  bottom: 0;
  z-index: 50;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.dark .mobile-footer {
  background-color: var(--surface-dark-color);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.16);
}

.nav-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-button.active {
  color: var(--primary-color);
}

.dark .nav-button {
  color: #9ca3af;
}

.dark .nav-button.active {
  color: #7dd3fc;
}

.nav-button span {
  font-size: 0.75rem;
  margin-top: 4px;
}

.nav-button:hover {
  color: var(--primary-color);
}

.dark .nav-button:hover {
  color: #7dd3fc;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .mobile-content {
    padding: 12px;
  }
}

@media (min-width: 768px) {
  .mobile-container {
    max-width: 768px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 0;
  }

  .dark .mobile-container {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  }
}

/* Safe area insets for notched devices */
@supports (padding-top: env(safe-area-inset-top)) {
  .mobile-header {
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
  }

  .mobile-footer {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
  }
}.friends-container {
    padding: 20px;
    padding-bottom: 90px;
    /* Space for Bottom Nav */
    max-width: 600px;
    margin: 0 auto;
}

.friends-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--primary-color);
}

.dark .friends-title {
    color: #38bdf8;
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.friend-item {
    background: var(--surface-color);
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid transparent;
    transition: transform 0.2s;
}

.dark .friend-item {
    background: var(--surface-dark-color);
    box-shadow: none;
    border: 1px solid #374151;
    border-left: 4px solid transparent;
}

.friend-item.online {
    border-left-color: #4CAF50;
    background: rgba(76, 175, 80, 0.05);
}

.dark .friend-item.online {
    background: rgba(76, 175, 80, 0.1);
}

.friend-info {
    flex-grow: 1;
}

.friend-name-row {
    display: flex;
    flex-wrap: wrap;
    /* allow wrapping on small screens */
    align-items: baseline;
    gap: 8px;
    /* reduced gap */
    margin-bottom: 4px;
}

.friend-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    /* truncate long names */
}

.dark .friend-name {
    color: white;
}

.friend-details {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.status-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.available {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-badge.in_game {
    background: #FFF3E0;
    color: #EF6C00;
}

.friend-avatar {
    width: 40px;
    height: 40px;
    background: var(--light-bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.dark .friend-avatar {
    background: #374151;
    color: #38bdf8;
}

.no-friends {
    text-align: center;
    color: var(--secondary-color);
    margin-top: 50px;
}.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    /* specific height */
    background-color: var(--surface-color);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.dark .bottom-nav {
    background-color: #1f2937;
    border-top-color: rgba(255, 255, 255, 0.05);
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 0.8rem;
    cursor: pointer;
    flex: 1;
    height: 100%;
    transition: all 0.2s;
}

.nav-item .nav-icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.nav-item.active {
    color: var(--primary-color);
}

.dark .nav-item.active {
    color: #38bdf8;
}

/* Play FAB Style override? */
/* The user requested standard buttons */
.nav-item.play-nav-item .nav-icon {
    font-size: 1.6rem;
}

/* Ensure equal width */
.nav-item {
    flex: 1;
}*, ::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: Inter, sans-serif; /* 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;
}
  :root {
    --primary-color: #4a6fa5;
    --primary-dark-color: #3a5a8c;
    --secondary-color: #6c757d;
    --secondary-dark-color: #5a6268;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --light-bg-color: #f5f7fa;
    --dark-bg-color: #121212;
    --light-text-color: #333;
    --dark-text-color: #e0e0e0;
    --border-radius: 12px;
    --font-family: 'Inter', sans-serif;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --surface-color: #ffffff;
    --surface-dark-color: #1e1e1e;
  }

  html, body {
  height: 100%;
  --tw-text-opacity: 1;
  color: rgb(17 24 39 / var(--tw-text-opacity, 1));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
    background-color: var(--light-bg-color);
    color: var(--light-text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    font-family: var(--font-family);
    scroll-behavior: smooth;
}
  
  .dark html, .dark body {
    background-color: var(--dark-bg-color);
    color: var(--dark-text-color);
  }
  
  #root {
  display: flex;
  height: 100%;
  flex-direction: column;
}
.\!container {
  width: 100% !important;
}
.container {
  width: 100%;
}
@media (min-width: 360px) {

  .\!container {
    max-width: 360px !important;
  }

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

  .\!container {
    max-width: 640px !important;
  }

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

  .\!container {
    max-width: 768px !important;
  }

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

  .\!container {
    max-width: 1024px !important;
  }

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

  .\!container {
    max-width: 1280px !important;
  }

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

  .\!container {
    max-width: 1536px !important;
  }

  .container {
    max-width: 1536px;
  }
}
.\!container {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 28rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
.container {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 28rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
.\!container {
    padding-top: env(safe-area-inset-top) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    padding-left: env(safe-area-inset-left) !important;
    padding-right: env(safe-area-inset-right) !important;
  }
.container {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
.card {
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  padding: 1rem;
  --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    background-color: var(--surface-color);
    box-shadow: var(--card-shadow);
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.dark .card {
    background-color: var(--surface-dark-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
.card:hover {
    transform: translateY(-2px);
  }
.page-title {
  margin-bottom: 1rem;
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 700;
    color: var(--primary-color);
}
.dark .page-title {
    color: #7dd3fc;
  }
.\!loading {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1.5rem;
}
.loading {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1.5rem;
}
.\!loading {
    color: var(--secondary-color) !important;
  }
.loading {
    color: var(--secondary-color);
  }
.error-message {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  --tw-text-opacity: 1;
  color: rgb(220 38 38 / var(--tw-text-opacity, 1));
}
.success-message {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  --tw-text-opacity: 1;
  color: rgb(22 163 74 / var(--tw-text-opacity, 1));
}
/* Mobile-first design classes */
.mobile-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  flex-direction: column;
  overflow-x: hidden;
    max-width: 100%;
    position: relative;
}
.mobile-header {
  position: sticky;
  top: 0px;
  z-index: 10;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: 1rem;
  padding-right: 1rem;
    background-color: var(--surface-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    height: 60px;
}
.dark .mobile-header {
    background-color: var(--surface-dark-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
.mobile-nav {
  display: flex;
  align-items: center;
}
.mobile-nav > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 0;
  margin-right: calc(0.5rem * var(--tw-space-x-reverse));
  margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
}
.mobile-content {
  flex: 1 1 0%;
  overflow-y: auto;
  padding: 1rem;
    -webkit-overflow-scrolling: touch;
}
.dark .mobile-footer {
    background-color: var(--surface-dark-color);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
  }
.nav-button.active {
    color: var(--primary-color);
  }
.dark .nav-button {
    color: #9ca3af;
  }
.dark .nav-button.active {
    color: #7dd3fc;
  }
.visible {
  visibility: visible;
}
.collapse {
  visibility: collapse;
}
.fixed {
  position: fixed;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.sticky {
  position: sticky;
}
.top-3 {
  top: 0.75rem;
}
.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));
}
.border {
  border-width: 1px;
}
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.font-bold {
  font-weight: 700;
}
.shadow {
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-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);
}

/* Custom styles */

/* Rest of existing CSS... */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

.dark a {
  color: #7dd3fc;
}

button {
  cursor: pointer;
  font-family: var(--font-family);
  border: none;
  outline: none;
  background-color: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: var(--primary-dark-color);
}

input {
  font-family: var(--font-family);
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 16px;
  width: 100%;
  transition: border-color 0.3s ease, background-color 0.3s ease;
  background-color: var(--surface-color);
  color: var(--light-text-color);
}

.dark input {
  background-color: var(--surface-dark-color);
  border-color: #333;
  color: var(--dark-text-color);
}

input:focus {
  border-color: var(--primary-color);
  outline: none;
}

a:hover {
  text-decoration: underline;
} 