/* === CSS Variables for Theme System === */
:root {
  /* Light Mode (Default) */
  --bg-color: #fff9f0;
  --text-color: #333;
  --text-secondary: #555;
  --container-bg: #fff9f0;
  --border-color: #e63946;
  --accent-color: #e63946;
  --accent-hover: #d62839;
  --accent-active: #ba1e2d;
  --shadow-color: rgba(230, 57, 70, 0.3);
  --shadow-hover: rgba(214, 40, 57, 0.4);
  --button-bg: #e63946;
  --button-hover: #d62839;
  --button-active: #ba1e2d;
  --dev-btn-bg: #e63946;
  --dev-btn-hover: #d62839;
  --dev-btn-active: #ba1e2d;
  --visitor-counter-bg: #e63946;
  --settings-section-bg: #fff9f0;
  --settings-text: #555;
  --input-border: #ddd;
  --input-bg: #fff9f0;
  --dev-section-bg: #f5f5f5;
  --feedback-message-bg: #f5f5f5;
  --feedback-border: #ddd;
  --motd-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --motd-text: white;
  --motd-close-bg: rgba(255, 255, 255, 0.2);
  --motd-close-hover: rgba(255, 255, 255, 0.4);
  --motd-shadow: rgba(102, 126, 234, 0.3);
  --card-bg: #ffffff;
  --bg-secondary: #f8f9fa;
  --card-border: #e0e0e0;
  
  /* Mobile viewport height fix */
  --vh: 1vh;
}

.dark-mode {
  /* Dark Mode */
  --bg-color: #1a1a1a;
  --text-color: #eee;
  --text-secondary: #ccc;
  --container-bg: #2a2a2a;
  --border-color: #e63946;
  --accent-color: #e63946;
  --accent-hover: #d62839;
  --accent-active: #ba1e2d;
  --shadow-color: rgba(230, 57, 70, 0.2);
  --shadow-hover: rgba(214, 40, 57, 0.3);
  --button-bg: #e63946;
  --button-hover: #d62839;
  --button-active: #ba1e2d;
  --dev-btn-bg: #e63946;
  --dev-btn-hover: #d62839;
  --dev-btn-active: #ba1e2d;
  --visitor-counter-bg: #e63946;
  --settings-section-bg: #2a2a2a;
  --settings-text: #ccc;
  --input-border: #555;
  --input-bg: #333;
  --dev-section-bg: #2a2a2a;
  --feedback-message-bg: #333;
  --feedback-border: #555;
  --motd-bg: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  --motd-text: #eee;
  --motd-close-bg: rgba(255, 255, 255, 0.15);
  --motd-close-hover: rgba(255, 255, 255, 0.3);
  --motd-shadow: rgba(74, 85, 104, 0.4);
  --card-bg: #2a2a2a;
  --bg-secondary: #1e1e1e;
  --card-border: #444444;
}

/* === CUSTOM SCROLLBARS === */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

::-webkit-scrollbar-track {
  background: var(--input-border);
  border-radius: 8px;
  margin: 2px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  border-radius: 8px;
  border: 2px solid var(--input-border);
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent-active) 100%);
  border-color: var(--accent-color);
  transform: scale(1.05);
}

::-webkit-scrollbar-thumb:active {
  background: var(--accent-active);
  transform: scale(0.95);
}

::-webkit-scrollbar-corner {
  background: var(--input-border);
  border-radius: 8px;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) var(--input-border);
}

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* === General Page Styling === */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Poppins", sans-serif;
  text-align: center;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden; /* Prevent horizontal scroll */
  overflow-y: auto; /* Allow vertical scroll */
  min-height: 100vh; /* Ensure full viewport height */
}

/* === Legacy Container (for other pages) === */
.container {
  margin-top: 120px;
}

h1 {
  font-size: 3em;
  margin-bottom: 10px;
  color: var(--accent-color);
}

p {
  font-size: 1.2em;
  margin-bottom: 40px;
  color: var(--text-secondary);
}

/* === Button Grid === */
.button-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

/* Ensure button-grid uses grid layout when it has arcade-games-grid class */
#button-grid.arcade-games-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)) !important;
  gap: clamp(1rem, 4vw, 2rem) !important;
  width: 100% !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 200px !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* === Main Game Buttons === */
.game-btn {
  background-color: var(--button-bg);
  color: white;
  border: none;
  padding: 18px 45px;
  font-size: 20px;
  font-weight: 600;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 12px var(--shadow-color);
}

.game-btn:hover {
  transform: scale(1.08);
  background-color: var(--button-hover);
  box-shadow: 0 8px 16px var(--shadow-hover), 0 0 0 3px rgba(230, 57, 70, 0.3);
}

.game-btn:active {
  transform: scale(0.95);
  background-color: var(--button-active);
}

/* === Floating Dev Page Button === */
.dev-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--dev-btn-bg);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease;
  box-shadow: 0 4px 10px var(--shadow-color);
  z-index: 1000;
}

.dev-btn:hover {
  transform: scale(1.05);
  background-color: var(--dev-btn-hover);
}

.dev-btn:active {
  transform: scale(0.93);
  background-color: var(--dev-btn-active);
}

/* === Visitor Counter - bottom-right corner === */
.visitor-counter {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--visitor-counter-bg);
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: 0 4px 10px var(--shadow-color);
  z-index: 1000;
  text-align: center;
}

.visitor-counter img {
  max-width: 100px;
  height: auto;
  display: block;
  margin: 5px auto 0;
}

/* === Message of the Day === */
.motd-container {
  background: var(--motd-bg);
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  max-width: 600px;
  box-shadow: 0 8px 16px var(--motd-shadow);
  animation: slideDown 0.4s ease-out;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.motd-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--motd-text);
  font-size: 1.1em;
  font-weight: 500;
  transition: color 0.3s ease;
}

.motd-close {
  background: var(--motd-close-bg);
  border: none;
  color: var(--motd-text);
  font-size: 1.5em;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.3s ease;
}

.motd-close:hover {
  background: var(--motd-close-hover);
}

/* === Login Screen === */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-container {
  background: var(--container-bg);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: popIn 0.4s ease-out;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.login-container h1 {
  color: var(--accent-color);
  margin-bottom: 10px;
  font-size: 2em;
}

.login-container p {
  color: var(--text-secondary);
  margin-bottom: 25px;
  font-size: 1em;
}

.password-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--input-border);
  border-radius: 8px;
  font-size: 1em;
  font-family: "Poppins", sans-serif;
  margin-bottom: 20px;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
  background-color: var(--input-bg);
  color: var(--text-color);
}

.password-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 8px var(--shadow-color);
}

.login-error {
  color: #e63946;
  font-weight: 600;
  margin-top: 15px;
  min-height: 20px;
}

/* === Developer Panel === */
.dev-section {
  background-color: var(--dev-section-bg);
  border-radius: 12px;
  padding: 30px;
  margin: 20px auto;
  max-width: 700px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

.dev-section h2 {
  color: var(--accent-color);
  margin-top: 0;
  margin-bottom: 20px;
}

.motd-input {
  width: 100%;
  min-height: 120px;
  padding: 15px;
  border: 2px solid var(--input-border);
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 1em;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
  background-color: var(--input-bg);
  color: var(--text-color);
}

.motd-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 8px var(--shadow-color);
}

.dev-button-group {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.dev-button-group .game-btn {
  flex: 1;
  min-width: 150px;
}

.status-message {
  margin-top: 15px;
  font-weight: 600;
  min-height: 20px;
}

/* === Feedback Viewer Styles === */
.feedback-item {
  background-color: var(--container-bg);
  border: 1px solid var(--feedback-border);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.feedback-meta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.feedback-type {
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.85em;
  margin-left: 10px;
  display: inline-block;
}

.feedback-type.bug {
  background-color: #ffebee;
  color: #c62828;
}

.feedback-type.suggestion {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.feedback-type.compliment {
  background-color: #fff3e0;
  color: #e65100;
}

.feedback-type.other {
  background-color: #f3e5f5;
  color: #6a1b9a;
}

.feedback-message {
  margin-top: 10px;
  padding: 10px;
  background-color: var(--feedback-message-bg);
  border-radius: 6px;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.feedback-date {
  color: var(--text-secondary);
  font-size: 0.85em;
}

/* Delete feedback button */
.delete-feedback-btn {
  background-color: #e63946;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.delete-feedback-btn:hover {
  background-color: #d62839;
  transform: scale(1.1);
}

.delete-feedback-btn:active {
  transform: scale(0.95);
  background-color: #ba1e2d;
}

/* === Responsive Design === */
@media (max-width: 600px) {
  h1 {
    font-size: 2em;
  }

  .game-btn {
    width: auto;
    min-width: 180px;
    padding: 12px 24px;
    font-size: 16px;
  }

  .motd-container {
    margin: 15px;
  }

  .motd-content {
    flex-direction: row;
    gap: 15px;
    text-align: left;
  }

  .dev-section {
    margin: 15px;
    padding: 25px;
  }

  .dev-button-group {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .dev-button-group .game-btn {
    min-width: 140px;
    flex: 0 1 auto;
  }
}

/* === Enhanced Mobile Styles === */
@media (max-width: 768px) {
  /* Better touch targets - but nav buttons are smaller */
  button, .game-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 16px;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
  }
  
  /* Nav buttons are smaller to save space */
  .nav-btn {
    min-height: 24px !important;
    min-width: 24px !important;
    padding: 3px 5px !important;
  }
  
  /* Enhanced touch interactions */
  .game-btn, .nav-btn, .social-btn {
    touch-action: manipulation; /* Prevent double-tap zoom */
    -webkit-user-select: none;
    user-select: none;
  }
  
  .game-btn:active, .nav-btn:active, .social-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
  
  /* Better modal sizing */
  .modern-modal-content {
    margin: 10px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
  }
  
  /* Improved form elements */
  input, textarea, select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 14px;
    border-radius: 12px;
    -webkit-appearance: none;
    appearance: none;
  }
  
  /* Better spacing */
  .main-container {
    padding: 15px;
    margin-top: 70px; /* Account for fixed nav */
  }
  
  /* Improved game grid */
  .game-grid, .modern-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 0 5px;
  }
  
  .game-card {
    min-height: 120px;
    padding: 12px;
  }
  
  /* Better hero section for mobile */
  .hero-section {
    padding: 1.5rem 1rem;
    margin-top: 60px;
  }
  
  .hero-title {
    font-size: 2em;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1em;
    margin-bottom: 1.5rem;
  }
  
  .hero-stats {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
  }
  
  /* Improved search and filter */
  .search-filter-section {
    padding: 15px;
    margin: 15px auto;
  }
  
  .search-input {
    padding: 12px 40px 12px 15px;
    font-size: 16px;
  }
  
  .filter-buttons {
    justify-content: center;
    gap: 8px;
  }
  
  .filter-btn {
    padding: 8px 12px;
    font-size: 0.9em;
  }
  
  /* Better search */
  .search-filter-section {
    padding: 15px;
    margin: 20px auto;
  }
  
  .search-input {
    padding: 12px 40px 12px 15px;
  }
  
  /* Mobile-specific performance optimizations */
  * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Improve scrolling performance */
  .main-container, .modern-modal-content, .feedback-viewer {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  
  /* Better focus states for accessibility */
  button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
  }
  
  /* Prevent text selection on UI elements */
  .nav-btn, .game-btn, .filter-btn, .social-btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  
  /* Improve tap targets */
  .nav-btn, .game-btn, .filter-btn {
    position: relative;
  }
  
  .nav-btn::after, .game-btn::after, .filter-btn::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    z-index: -1;
  }
  
  /* Mobile viewport height fixes */
  .mobile-device .hero-section {
    min-height: calc(var(--vh, 1vh) * 50);
  }
  
  .mobile-device .modern-modal {
    height: calc(var(--vh, 1vh) * 100);
  }
  
  .mobile-device .modern-modal-content {
    max-height: calc(var(--vh, 1vh) * 90);
  }
  
  /* Better mobile scrolling */
  .mobile-device {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  
  /* Prevent horizontal scroll on mobile */
  .mobile-device body {
    overflow-x: hidden;
  }
  
  /* Mobile-specific animations */
  .mobile-device .game-btn:active,
  .mobile-device .nav-btn:active,
  .mobile-device .social-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
  
  /* Enhanced mobile visual feedback */
  .mobile-device .game-btn:active::after,
  .mobile-device .nav-btn:active::after,
  .mobile-device .social-btn:active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: inherit;
    pointer-events: none;
  }
  
  /* Mobile keyboard handling */
  .mobile-device input:focus,
  .mobile-device textarea:focus {
    transform: none; /* Prevent layout shift */
    zoom: 1; /* Prevent zoom on iOS */
  }
}

/* === Settings Page === */
.settings-container {
  max-width: 600px;
  margin: 120px auto 40px;
  padding: 20px;
}

.settings-section {
  background-color: var(--settings-section-bg);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

.settings-section h2 {
  color: var(--accent-color);
  font-size: 1.8em;
  margin-bottom: 20px;
  margin-top: 0;
}

.volume-control,
.theme-control {
  margin-top: 20px;
}

.volume-control label,
.theme-control label {
  display: block;
  font-size: 1.1em;
  color: var(--settings-text);
  margin-bottom: 10px;
}

.theme-btn {
  background-color: var(--button-bg);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 4px 8px var(--shadow-color);
}

.theme-btn:hover {
  transform: scale(1.05);
  background-color: var(--button-hover);
}

.theme-btn:active {
  transform: scale(0.95);
  background-color: var(--button-active);
}

.volume-slider {
  width: 100%;
  max-width: 400px;
  height: 8px;
  border-radius: 5px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e63946;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(230, 57, 70, 0.3);
  transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.volume-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e63946;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(230, 57, 70, 0.3);
  transition: transform 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
}

.volume-display {
  font-size: 1.2em;
  font-weight: 600;
  color: #e63946;
  min-width: 50px;
  text-align: center;
}

.status-message {
  margin-top: 15px;
  font-size: 1em;
  font-weight: 500;
}

/* === Search and Filter Section === */
.search-filter-section {
  margin: 30px auto;
  max-width: 1000px;
  padding: 20px;
}

.search-container {
  position: relative;
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  max-width: 500px;
  padding: 15px 45px 15px 20px;
  border: 2px solid var(--input-border);
  border-radius: 12px;
  font-size: 16px;
  font-family: "Poppins", sans-serif;
  background-color: var(--input-bg);
  color: var(--text-color);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 8px var(--shadow-color);
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.clear-search-btn:hover {
  background-color: var(--input-border);
}

.filter-section {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  background-color: var(--container-bg);
  color: var(--text-color);
  border: 2px solid var(--input-border);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif;
}

.filter-btn:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.filter-btn.active {
  background-color: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.sort-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-label {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
}

.sort-select {
  padding: 10px 15px;
  border: 2px solid var(--input-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  background-color: var(--input-bg);
  color: var(--text-color);
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.sort-select:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* === Section Containers === */
.section-container {
  margin: 40px auto;
  max-width: 1200px;
}

.section-title {
  font-size: 2em;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.game-count {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1em;
}

/* === Game Button Enhancements === */
.game-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.game-btn-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-emoji {
  font-size: 24px;
}

.game-name {
  font-size: 18px;
}

.favorite-btn {
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s ease;
  user-select: none;
}

.favorite-btn:hover {
  transform: scale(1.2);
}

.play-count-badge {
  font-size: 0.75em;
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  margin-left: auto;
  margin-right: 5px;
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
  white-space: nowrap;
}

.difficulty-badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.2);
}

.difficulty-easy {
  background-color: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.difficulty-medium {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.difficulty-hard {
  background-color: rgba(244, 67, 54, 0.2);
  color: #a10000;
}

/* === Game Tooltip === */
.game-tooltip {
  position: fixed;
  background: var(--container-bg);
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  pointer-events: none;
  max-width: 300px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -90%); }
  to { opacity: 1; transform: translate(-50%, -100%); }
}

.tooltip-content h3 {
  margin: 0 0 10px 0;
  color: var(--accent-color);
  font-size: 1.2em;
}

.tooltip-content p {
  margin: 0 0 10px 0;
  color: var(--text-secondary);
  font-size: 0.9em;
  line-height: 1.4;
}

.tooltip-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tooltip-category {
  padding: 4px 10px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
}

.tooltip-difficulty {
  font-size: 0.8em;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* === Stats Modal === */
.modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: var(--container-bg);
  border-radius: 16px;
  padding: 30px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  font-weight: bold;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--accent-color);
}

.modal-content h2 {
  color: var(--accent-color);
  margin-top: 0;
}

.stats-grid {
  display: grid;
  gap: 20px;
}

.stat-card {
  background-color: var(--settings-section-bg);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--input-border);
}

.stat-card h3 {
  color: var(--accent-color);
  margin-top: 0;
}

.stat-card ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
}

.stat-card li {
  padding: 8px 0;
  border-bottom: 1px solid var(--input-border);
  color: var(--text-color);
}

.stat-card li:last-child {
  border-bottom: none;
}

/* === ENHANCED DROPDOWN STYLES === */

/* Base select styling - Clean approach */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  padding-right: 40px !important;
}

/* Default dropdown arrow - only apply to selects without specific styling */
select:not(.sort-select):not(#feedbackForm select) {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e63946' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

select:not(.sort-select):not(#feedbackForm select):hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
  transform: translateY(-1px);
}

select:not(.sort-select):not(#feedbackForm select):focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
  outline: none;
  transform: translateY(-1px);
}

select:active {
  transform: translateY(0);
}

/* Enhanced select container - removed to avoid conflicts */

/* Option styling */
select option {
  background: var(--container-bg);
  color: var(--text-color);
  padding: 12px 16px;
  font-weight: 500;
  border: none;
  transition: all 0.2s ease;
}

select option:hover {
  background: var(--accent-color);
  color: white;
}

select option:checked {
  background: var(--accent-color);
  color: white;
  font-weight: 600;
}

select option[value=""] {
  color: var(--text-secondary);
  font-style: italic;
}

/* Sort select specific styling */
.sort-select {
  background: linear-gradient(135deg, var(--input-bg) 0%, rgba(230, 57, 70, 0.03) 100%);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e63946' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center, 0 0;
  background-size: 14px, cover;
  border: 2px solid var(--input-border);
  border-radius: 10px;
  padding: 10px 35px 10px 15px !important;
  font-weight: 600;
  min-width: 140px;
  transition: all 0.3s ease;
}

.sort-select:hover {
  border-color: var(--accent-color);
  background: linear-gradient(135deg, var(--input-bg) 0%, rgba(230, 57, 70, 0.06) 100%);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d62839' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center, 0 0;
  background-size: 14px, cover;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(230, 57, 70, 0.1);
}

.sort-select:focus {
  border-color: var(--accent-color);
  background: linear-gradient(135deg, var(--input-bg) 0%, rgba(230, 57, 70, 0.08) 100%);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ba1e2d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center, 0 0;
  background-size: 14px, cover;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
  transform: translateY(-1px);
  outline: none;
}

/* Achievement category buttons enhancement */
.achievement-category-btn {
  position: relative;
  overflow: hidden;
}

.achievement-category-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.achievement-category-btn:hover::before {
  left: 100%;
}

/* Custom dropdown animations */
@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dropdownPulse {
  0% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(230, 57, 70, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

@keyframes arrowRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(180deg); }
}

select:focus {
  animation: dropdownSlide 0.3s ease, dropdownPulse 1.5s ease-in-out;
}

/* Dropdown arrow rotation on focus */
select::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
}

/* Loading state for dropdowns */
select.loading {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e63946' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='12' cy='12' r='3'%3e%3c/circle%3e%3cpath d='M12 1v6M12 17v6M4.22 4.22l4.24 4.24M15.54 15.54l4.24 4.24M1 12h6M17 12h6M4.22 19.78l4.24-4.24M15.54 8.46l4.24-4.24'%3e%3c/path%3e%3c/svg%3e");
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { background-position: right 12px center; }
  to { background-position: right 12px center; }
}

/* Disabled state styling */
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--input-border);
  color: var(--text-secondary);
  transform: none !important;
  box-shadow: none !important;
}

select:disabled:hover {
  border-color: var(--input-border);
  transform: none;
  box-shadow: none;
}

/* Enhanced feedback form selects - Clean version */
#feedbackForm select {
  background: linear-gradient(135deg, var(--input-bg) 0%, rgba(230, 57, 70, 0.02) 100%);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e63946' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center, 0 0;
  background-size: 18px, cover;
  border: 2px solid var(--input-border);
  border-radius: 12px;
  padding: 15px 45px 15px 20px !important;
  font-size: 1em;
  font-weight: 500;
  color: var(--text-color);
  min-height: 52px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#feedbackForm select:hover {
  background: linear-gradient(135deg, var(--input-bg) 0%, rgba(230, 57, 70, 0.05) 100%);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d62839' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center, 0 0;
  background-size: 18px, cover;
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.15);
  transform: translateY(-2px);
}

#feedbackForm select:focus {
  background: linear-gradient(135deg, var(--input-bg) 0%, rgba(230, 57, 70, 0.08) 100%);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ba1e2d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center, 0 0;
  background-size: 18px, cover;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.1), 0 6px 16px rgba(230, 57, 70, 0.2);
  transform: translateY(-2px);
  outline: none;
}

/* === SPECIAL SCROLLBAR STYLES === */

/* Thin scrollbars for modals and containers */
.modal-content,
.dev-section,
.feedback-item,
.settings-section,
#feedback-container {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) transparent;
}

.modal-content::-webkit-scrollbar,
.dev-section::-webkit-scrollbar,
.feedback-item::-webkit-scrollbar,
.settings-section::-webkit-scrollbar,
#feedback-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.modal-content::-webkit-scrollbar-track,
.dev-section::-webkit-scrollbar-track,
.feedback-item::-webkit-scrollbar-track,
.settings-section::-webkit-scrollbar-track,
#feedback-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb,
.dev-section::-webkit-scrollbar-thumb,
.feedback-item::-webkit-scrollbar-thumb,
.settings-section::-webkit-scrollbar-thumb,
#feedback-container::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 4px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.modal-content::-webkit-scrollbar-thumb:hover,
.dev-section::-webkit-scrollbar-thumb:hover,
.feedback-item::-webkit-scrollbar-thumb:hover,
.settings-section::-webkit-scrollbar-thumb:hover,
#feedback-container::-webkit-scrollbar-thumb:hover {
  opacity: 1;
  background: var(--accent-hover);
}

/* Extra thin scrollbars for text areas and inputs */
textarea::-webkit-scrollbar,
.motd-input::-webkit-scrollbar {
  width: 6px;
}

textarea::-webkit-scrollbar-track,
.motd-input::-webkit-scrollbar-track {
  background: transparent;
}

textarea::-webkit-scrollbar-thumb,
.motd-input::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 3px;
  opacity: 0.5;
}

textarea::-webkit-scrollbar-thumb:hover,
.motd-input::-webkit-scrollbar-thumb:hover {
  opacity: 0.8;
}

/* === MODERN SETTINGS PAGE === */

.page-title {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--accent-color);
  margin: 0;
  text-align: center;
}

/* Ensure page title is visible in navigation */
.nav-center .page-title {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--accent-color);
  margin: 0;
  text-align: center;
}

.settings-hero {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff6b6b 100%);
  color: white;
  border-radius: 20px;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.settings-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="settings-grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23settings-grain)"/></svg>');
  opacity: 0.3;
}

.settings-hero-content {
  position: relative;
  z-index: 2;
}

.settings-hero-title {
  font-size: 2.5em;
  font-weight: 800;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.settings-emoji {
  font-size: 1.2em;
  animation: rotate 4s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.settings-hero-subtitle {
  font-size: 1.2em;
  opacity: 0.9;
  margin: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.settings-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.settings-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.settings-card-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent-color), #ff6b6b);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
}

.settings-card-info {
  flex: 1;
}

.settings-card-title {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 0.5rem 0;
}

.settings-card-description {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.9em;
}

.settings-card-content {
  margin-top: 1rem;
}

/* Theme Options */
.theme-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.theme-option {
  background: var(--bg-secondary);
  border: 2px solid var(--card-border);
  border-radius: 15px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.theme-option:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.theme-option.active {
  border-color: var(--accent-color);
  background: rgba(230, 57, 70, 0.1);
}

.theme-preview {
  width: 60px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
}

.light-preview {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.dark-preview {
  background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
}

.theme-preview::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
}

.theme-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.theme-icon {
  font-size: 1.2em;
}

/* Volume Control */
.volume-control {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.volume-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text-color);
}

.volume-value {
  color: var(--accent-color);
  font-size: 1.1em;
}

.volume-slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.volume-icon {
  font-size: 1.2em;
  color: var(--text-secondary);
}

.modern-volume-slider {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-secondary);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.modern-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
  transition: all 0.3s ease;
}

.modern-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.4);
}

.test-sound-btn {
  background: var(--bg-secondary);
  border: 2px solid var(--card-border);
  color: var(--text-color);
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.test-sound-btn:hover {
  border-color: var(--accent-color);
  background: var(--accent-color);
  color: white;
}

/* Game Settings */
.game-settings {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.setting-item {
  display: flex;
  align-items: center;
}

.setting-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-color);
}

.setting-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--card-border);
  border-radius: 4px;
  background: var(--bg-secondary);
  cursor: pointer;
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  transition: all 0.3s ease;
}

.setting-checkbox:checked {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.setting-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 14px;
}

/* Data Actions */
.data-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.data-btn {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid var(--card-border);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.export-btn {
  background: var(--bg-secondary);
  color: var(--text-color);
}

.export-btn:hover {
  border-color: #4caf50;
  background: #4caf50;
  color: white;
}

.clear-btn {
  background: var(--bg-secondary);
  color: var(--text-color);
}

.clear-btn:hover {
  border-color: #f44336;
  background: #f44336;
  color: white;
}

.data-info {
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 10px;
  border-left: 4px solid var(--accent-color);
}

.data-description {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9em;
}

/* Settings Actions */
.settings-actions {
  text-align: center;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 20px;
  border: 1px solid var(--card-border);
}

.save-all-btn {
  background: linear-gradient(135deg, var(--accent-color), #ff6b6b);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 15px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.save-all-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

/* Settings Status Messages */
.settings-status {
  margin-top: 1rem;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  min-height: 20px;
}

.settings-status.success {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

/* Floating Success Animation */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .theme-options {
    grid-template-columns: 1fr;
  }
  
  .data-actions {
    flex-direction: column;
  }
  
  .volume-slider-container {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* === MODERN MODALS === */

.modern-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease;
}

.modern-modal.show {
  display: flex;
}

.modern-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
}

.modern-modal-content {
  position: relative;
  background: var(--card-bg);
  border-radius: 25px;
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

.modern-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem;
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff6b6b 100%);
  color: white;
}

.modal-header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
}

.modal-title-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-title {
  font-size: 2em;
  font-weight: 800;
  margin: 0;
}

.modal-subtitle {
  font-size: 1em;
  opacity: 0.9;
  margin: 0;
}

.modern-close-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.5em;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modern-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Achievement Modal Specific */
.achievement-overview {
  padding: 2rem;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.achievement-progress-ring {
  flex: 0 0 150px;
}

.progress-circle-large {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-color) var(--progress, 0%), var(--card-border) var(--progress, 0%));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.progress-circle-large::before {
  content: '';
  position: absolute;
  width: 110px;
  height: 110px;
  background: var(--bg-secondary);
  border-radius: 50%;
}

.progress-center {
  position: relative;
  z-index: 2;
  text-align: center;
}

.progress-percentage {
  font-size: 2em;
  font-weight: 800;
  color: var(--accent-color);
  line-height: 1;
}

.progress-label {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.achievement-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  flex: 1;
}

.modern-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 15px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

.modern-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent-color), #ff6b6b);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
}

.stat-info {
  flex: 1;
}

.stat-number {
  font-size: 1.5em;
  font-weight: 800;
  color: var(--text-color);
  line-height: 1;
}

.stat-label {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Modern Filter Tabs */
.modern-filter-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 1.5rem 2rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  overflow-x: auto;
}

.modern-filter-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text-color);
}

.modern-filter-tab:hover {
  background: rgba(230, 57, 70, 0.1);
  border-color: var(--accent-color);
}

.modern-filter-tab.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.tab-icon {
  font-size: 1.1em;
}

.tab-label {
  font-size: 0.9em;
}

/* Modern Achievement Grid */
.modern-achievement-grid {
  padding: 2rem;
  max-height: 400px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Modern Stats Content */
.modern-stats-content {
  padding: 2rem;
  max-height: 500px;
  overflow-y: auto;
}

/* Modal Animations */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Mobile Modal Responsive */
@media (max-width: 768px) {
  .modern-modal-content {
    width: 95vw;
    max-height: 95vh;
  }
  
  .modern-modal-header {
    padding: 1.5rem;
  }
  
  .modal-title {
    font-size: 1.5em;
  }
  
  .achievement-overview {
    flex-direction: column;
    padding: 1.5rem;
  }
  
  .achievement-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .modern-filter-tabs {
    padding: 1rem;
  }
  
  .modern-achievement-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
  
  .progress-circle-large {
    width: 120px;
    height: 120px;
  }
  
  .progress-circle-large::before {
    width: 90px;
    height: 90px;
  }
}

/* === MODERN FEEDBACK PAGE === */

.feedback-hero {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.feedback-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="feedback-grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23feedback-grain)"/></svg>');
  opacity: 0.3;
}

.feedback-hero-content {
  position: relative;
  z-index: 2;
}

.feedback-hero-title {
  font-size: 2.5em;
  font-weight: 800;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.feedback-emoji {
  font-size: 1.2em;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.feedback-hero-subtitle {
  font-size: 1.2em;
  opacity: 0.9;
  margin: 0;
}

.feedback-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.feedback-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.feedback-card-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
}

.feedback-card-info {
  flex: 1;
}

.feedback-card-title {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 0.5rem 0;
}

.feedback-card-description {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.9em;
}

.modern-feedback-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.modern-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modern-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.9em;
}

.label-icon {
  font-size: 1.1em;
}

.modern-input,
.modern-select,
.modern-textarea {
  padding: 12px 16px;
  border: 2px solid var(--card-border);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 1em;
  font-family: inherit;
  transition: all 0.3s ease;
}

.modern-input:focus,
.modern-select:focus,
.modern-textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.modern-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.modern-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.modern-submit-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 15px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.modern-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.modern-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-icon {
  font-size: 1.2em;
}

.modern-status-message {
  margin-top: 1.5rem;
  padding: 15px 20px;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  border: 1px solid transparent;
}

.modern-status-message.success {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  border-color: rgba(76, 175, 80, 0.3);
}

.modern-status-message.error {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
  border-color: rgba(244, 67, 54, 0.3);
}

.feedback-tips {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
}

.tips-title {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 1.5rem 0;
  text-align: center;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 15px;
  transition: all 0.3s ease;
}

.tip-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.tip-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  flex-shrink: 0;
}

.tip-content h4 {
  font-size: 1em;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 0.5rem 0;
}

.tip-content p {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .tips-grid {
    grid-template-columns: 1fr;
  }
  
  .feedback-hero-title {
    font-size: 2em;
  }
}

/* === MODERN DEV PAGE === */

.modern-login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modern-login-container {
  background: var(--card-bg);
  border-radius: 25px;
  padding: 3rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  text-align: center;
  animation: loginSlideIn 0.4s ease-out;
}

@keyframes loginSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.login-header {
  margin-bottom: 2rem;
}

.login-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5em;
  margin: 0 auto 1rem auto;
}

.login-title {
  font-size: 2em;
  font-weight: 800;
  color: var(--text-color);
  margin: 0 0 0.5rem 0;
}

.login-subtitle {
  color: var(--text-secondary);
  margin: 0;
  font-size: 1em;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-input-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modern-password-input {
  padding: 15px 20px;
  border: 2px solid var(--card-border);
  border-radius: 15px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 1.1em;
  font-family: inherit;
  transition: all 0.3s ease;
}

.modern-password-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.modern-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 15px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.modern-login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.back-to-home-btn {
  background: var(--bg-secondary);
  color: var(--text-color);
  border: 2px solid var(--card-border);
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.back-to-home-btn:hover {
  border-color: var(--accent-color);
  background: var(--accent-color);
  color: white;
}

.modern-login-error {
  margin-top: 1rem;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  min-height: 20px;
}

.dev-hero {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 20px;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.dev-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dev-grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dev-grain)"/></svg>');
  opacity: 0.3;
}

.dev-hero-content {
  position: relative;
  z-index: 2;
}

.dev-hero-title {
  font-size: 2.5em;
  font-weight: 800;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.dev-emoji {
  font-size: 1.2em;
  animation: rotate 4s linear infinite;
}

.dev-hero-subtitle {
  font-size: 1.2em;
  opacity: 0.9;
  margin: 0;
}

.dev-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.dev-tool-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.dev-tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.dev-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dev-card-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
}

.dev-card-info {
  flex: 1;
}

.dev-card-title {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 0.5rem 0;
}

.dev-card-description {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.9em;
}

.dev-card-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feedback-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 500;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.filter-chip:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
}

.filter-chip.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.dev-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 20px;
  border: 2px solid var(--card-border);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-color);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  justify-content: center;
}

.dev-action-btn:hover {
  border-color: #667eea;
  background: #667eea;
  color: white;
}

.dev-action-btn.primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: #667eea;
  color: white;
}

.dev-action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.dev-action-btn.secondary {
  background: var(--bg-secondary);
  border-color: var(--card-border);
  color: var(--text-secondary);
}

.dev-action-btn.secondary:hover {
  border-color: #f44336;
  background: #f44336;
  color: white;
}

.dev-actions {
  display: flex;
  gap: 1rem;
}

.dev-status-message {
  padding: 10px 15px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  min-height: 20px;
}

.feedback-viewer {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem;
  background: var(--bg-secondary);
}

.placeholder-text {
  color: var(--text-secondary);
  text-align: center;
  font-style: italic;
  margin: 0;
}

.modern-motd-input {
  min-height: 100px;
  padding: 15px;
  border: 2px solid var(--card-border);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 1em;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s ease;
}

.modern-motd-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modern-password-field {
  padding: 12px 16px;
  border: 2px solid var(--card-border);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 1em;
  font-family: inherit;
  transition: all 0.3s ease;
}

.modern-password-field:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .dev-tools-grid {
    grid-template-columns: 1fr;
  }
  
  .dev-actions {
    flex-direction: column;
  }
  
  .feedback-filters {
    justify-content: center;
  }
  
  .dev-hero-title {
    font-size: 2em;
  }
}

/* === USER BROWSER STYLES === */

.user-browser-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-browser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.user-card {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 20px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.user-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.user-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-color), #ff6b6b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  position: relative;
}

.user-avatar::after {
  content: '';
  position: absolute;
  inset: -3px;
  background: linear-gradient(135deg, var(--accent-color), #ff6b6b);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.3;
}

.user-info {
  flex: 1;
}

.user-name {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 0.25rem 0;
}

.user-status {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin: 0;
}

.user-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.user-stat {
  text-align: center;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.user-stat-number {
  font-size: 1.3em;
  font-weight: 800;
  color: var(--accent-color);
  line-height: 1;
}

.user-stat-label {
  font-size: 0.8em;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.user-achievements-preview {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.achievement-badge-mini {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
  border: 2px solid rgba(255, 215, 0, 0.3);
  position: relative;
}

.achievement-badge-mini::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  border-radius: 8px;
  z-index: -1;
  opacity: 0.2;
}

.achievements-more {
  width: 32px;
  height: 32px;
  background: var(--bg-secondary);
  border: 2px solid var(--card-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  color: var(--text-secondary);
  font-weight: 600;
}

.user-recent-games {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.recent-game-tag {
  background: rgba(230, 57, 70, 0.1);
  color: var(--accent-color);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
  border: 1px solid rgba(230, 57, 70, 0.2);
}

.user-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.user-action-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 2px solid var(--card-border);
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--text-color);
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-action-btn:hover {
  border-color: var(--accent-color);
  background: var(--accent-color);
  color: white;
}

.user-action-btn.primary {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.user-action-btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.load-more-container {
  text-align: center;
  margin-top: 2rem;
}

/* Online status indicator */
.user-avatar.online::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: #4caf50;
  border: 3px solid var(--card-bg);
  border-radius: 50%;
  z-index: 2;
}

/* Live indicator for real-time updates */
.live-indicator {
  font-size: 0.6em;
  color: #ff4444;
  animation: pulse-live 2s infinite;
  margin-left: 0.5rem;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* User browser mobile responsive */
@media (max-width: 768px) {
  .user-browser-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .user-browser-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .user-card {
    padding: 1rem;
  }
  
  .user-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  
  .user-stat {
    padding: 0.5rem;
  }
  
  .user-card-actions {
    flex-direction: column;
  }
}

/* === APPLE ARCADE INSPIRED DESIGN === */

.arcade-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2rem);
  background: var(--bg-color);
  overflow-x: hidden; /* Prevent horizontal overflow */
  overflow-y: visible; /* Allow vertical scrolling */
  position: relative; /* Ensure proper stacking */
  z-index: 1; /* Above background, below modals */
  width: 100%;
  box-sizing: border-box;
}

/* Featured Section */
.arcade-featured {
  margin-bottom: 4rem;
}

.featured-header {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 2.5em;
  font-weight: 800;
  color: var(--text-color);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.2em;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 400;
}

.featured-card {
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff6b6b 100%);
  border-radius: 24px;
  padding: 3rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(230, 57, 70, 0.3);
  transition: all 0.3s ease;
}

.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 80px rgba(230, 57, 70, 0.4);
}

.featured-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.featured-info {
  flex: 1;
  max-width: 600px;
}

.featured-category {
  font-size: 0.9em;
  opacity: 0.9;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.featured-title {
  font-size: 3em;
  font-weight: 800;
  margin: 0 0 1rem 0;
  line-height: 1.1;
}

.featured-description {
  font-size: 1.2em;
  line-height: 1.5;
  margin: 0 0 2rem 0;
  opacity: 0.95;
}

.arcade-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.arcade-play-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.play-icon {
  font-size: 1.2em;
}

.featured-visual {
  flex: 0 0 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.featured-icon {
  font-size: 8em;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

.featured-glow {
  position: absolute;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 0.1; }
}

/* Arcade Sections - Modern Approach */
.arcade-section {
  margin-bottom: clamp(2rem, 5vw, 3rem);
  width: 100%;
  display: block;
  visibility: visible;
  opacity: 1;
  /* Ensure section doesn't hide content */
  overflow: visible;
  position: relative;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.see-all-btn {
  background: none;
  border: none;
  color: var(--accent-color);
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.see-all-btn:hover {
  background: rgba(230, 57, 70, 0.1);
}

/* Categories */
.arcade-categories {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.arcade-category-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
  color: var(--text-color);
}

.arcade-category-btn:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(230, 57, 70, 0.15);
}

.arcade-category-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.category-icon {
  font-size: 1.5em;
}

.category-name {
  font-weight: 600;
  flex: 1;
}

.category-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 700;
}

.arcade-category-btn.active .category-count {
  background: rgba(255, 255, 255, 0.3);
}

/* Games Grid */
/* Modern Game Grid - Industry Standard Approach */
.arcade-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: clamp(1rem, 4vw, 2rem);
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
  /* Ensure grid is always visible */
  visibility: visible;
  opacity: 1;
  min-height: 200px;
}

.arcade-game-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: clamp(1rem, 3vw, 1.5rem);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  /* Ensure card is always visible */
  display: block;
  visibility: visible;
  opacity: 1;
  width: 100%;
  height: auto;
  min-height: 150px;
  /* Modern aspect ratio approach */
  aspect-ratio: auto;
}

.arcade-game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-color);
}

.arcade-game-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.arcade-game-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-color), #ff6b6b);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  color: white;
}

.arcade-game-info {
  flex: 1;
}

.arcade-game-title {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 0.25rem 0;
}

.arcade-game-category {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin: 0;
}

.arcade-game-description {
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 1rem 0;
  font-size: 0.95em;
}

.arcade-game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.arcade-game-difficulty {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 600;
}

.arcade-game-favorite {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.arcade-game-favorite:hover {
  transform: scale(1.2);
}

/* Arcade Row (for horizontal scrolling sections) */
.arcade-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0.5rem 0 1rem 0;
}

.arcade-row-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.arcade-row-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(230, 57, 70, 0.2);
}

/* Arcade Select */
.arcade-select {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 1em;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.arcade-select:hover {
  border-color: var(--accent-color);
}

.arcade-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.game-count-badge {
  background: var(--accent-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9em;
  font-weight: 600;
}

/* Dark Mode Adjustments */
.dark-mode .featured-card {
  box-shadow: 0 20px 60px rgba(230, 57, 70, 0.2);
}

.dark-mode .featured-card:hover {
  box-shadow: 0 30px 80px rgba(230, 57, 70, 0.3);
}

.dark-mode .arcade-game-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Game Details Modal */
.game-details-modal .modern-modal-content {
  max-width: 900px;
  width: 95vw;
  max-height: 95vh;
  overflow-y: auto;
  border-radius: 12px;
}

.game-details-content {
  position: relative;
  padding: 0 3rem 3rem 3rem;
}

.game-details-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 3rem;
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff6b6b 100%);
  color: white;
  border-radius: 12px 12px 0 0;
  margin: -3rem -3rem 0 -3rem;
}

.game-details-icon {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5em;
  flex-shrink: 0;
}

.game-details-info {
  flex: 1;
}

.game-details-title {
  font-size: 2.8em;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  line-height: 1.1;
}

.game-details-category {
  font-size: 1.1em;
  opacity: 0.9;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.game-details-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95em;
  opacity: 0.9;
}

.game-details-difficulty {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-weight: 600;
}

.game-details-separator {
  opacity: 0.6;
}

.game-details-body {
  padding: 3rem 0 0 0;
}

.game-details-description h3 {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 1rem 0;
}

.game-details-description p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1.05em;
  margin: 0 0 2rem 0;
}

.game-details-stats {
  margin-bottom: 2rem;
}

.game-details-stats h3 {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 1rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-item {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.stat-value {
  display: block;
  font-size: 1.3em;
  font-weight: 700;
  color: var(--accent-color);
}

.game-details-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.arcade-play-btn.primary {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-color), #ff6b6b);
  border: none;
  color: white;
  padding: 1.25rem 2.5rem;
  border-radius: 10px;
  font-size: 1.2em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.arcade-play-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4), 0 0 0 3px rgba(230, 57, 70, 0.3);
}

.arcade-action-btn {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  color: var(--text-color);
  padding: 1.25rem 2rem;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.arcade-action-btn:hover {
  border-color: var(--accent-color);
  background: rgba(230, 57, 70, 0.1);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.2), 0 0 0 2px rgba(230, 57, 70, 0.15);
}

.arcade-action-btn.favorited {
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .arcade-container {
    padding: 1.5rem;
  }
  
  .featured-card {
    padding: 2rem;
  }
  
  .featured-content {
    flex-direction: row;
    text-align: left;
    gap: 2rem;
  }
  
  .featured-title {
    font-size: 2.2em;
  }
  
  .section-title {
    font-size: 1.8em;
  }
  
  .arcade-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    overflow: visible;
    padding-bottom: 0;
  }
  
  .arcade-category-btn {
    flex-shrink: 1;
    padding: 0.75rem 1rem;
    font-size: 0.9em;
  }
  
  .arcade-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }
  
  /* Game Details Modal Mobile */
  .game-details-content {
    padding: 0 2rem 2rem 2rem;
    width: 90vw;
    max-width: 500px;
  }
  
  .game-details-hero {
    flex-direction: row;
    text-align: left;
    gap: 1.5rem;
    padding: 2rem;
    margin: -2rem -2rem 0 -2rem;
  }
  
  .game-details-title {
    font-size: 1.6em;
  }
  
  .game-details-body {
    padding: 2rem 0 0 0;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .game-details-actions {
    flex-direction: row;
    gap: 1rem;
  }
}

textarea::-webkit-scrollbar-thumb:hover,
.motd-input::-webkit-scrollbar-thumb:hover {
  opacity: 0.8;
}

/* Hide scrollbars on mobile for cleaner look */
@media (max-width: 768px) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  .modal-content::-webkit-scrollbar,
  .dev-section::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }
}

/* === Mobile Dropdown Enhancements === */
@media (max-width: 768px) {
  select {
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 44px; /* iOS touch target minimum */
  }
  
  .form-group select {
    padding: 12px 40px 12px 16px !important;
    font-size: 16px;
    min-height: 48px;
  }
  
  .sort-select {
    min-width: 120px;
    padding: 8px 30px 8px 12px !important;
  }
}

/* === Responsive Design Updates === */
@media (max-width: 600px) {
  .search-filter-section {
    padding: 15px;
  }
  
  .filter-section {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  .game-btn {
    width: auto;
    min-width: 200px;
  }
  
  .modal-content {
    padding: 20px;
  }
  
  /* Mobile dropdown adjustments */
  select {
    background-size: 14px;
    background-position: right 10px center;
  }
  
  .form-group select {
    background-size: 16px;
    background-position: right 12px center;
  }
}

/* ===== MODERN LAYOUT OVERHAUL ===== */

/* Navigation Header */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 1000;
  transition: all 0.3s ease;
}

.dark-mode .main-nav {
  background: rgba(42, 42, 42, 0.95);
  border-bottom: 1px solid #444444;
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark-mode .nav-brand {
  color: var(--accent-color);
}

.dark-mode .nav-title {
  color: var(--text-color);
}

.dark-mode .nav-btn {
  background: var(--card-bg);
  color: var(--text-color);
  border-color: var(--card-border);
}

.dark-mode .nav-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.dark-mode .nav-search-input {
  background: var(--input-bg);
  color: var(--text-color);
  border-color: var(--input-border);
}

.dark-mode .nav-search-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.dark-mode .page-title {
  color: var(--accent-color);
}

.dark-mode .nav-logo {
  filter: brightness(1.1);
}

.dark-mode .clear-search-btn {
  color: var(--text-secondary);
  background: transparent;
}

.dark-mode .clear-search-btn:hover {
  background: var(--input-border);
  color: var(--text-color);
}

.dark-mode .hero-title {
  text-shadow: 
    2px 2px 4px rgba(0, 0, 0, 0.7),
    0 0 25px rgba(230, 57, 70, 0.9),
    0 0 50px rgba(230, 57, 70, 0.5);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.2em;
  color: var(--accent-color);
}

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-center {
  flex: 1;
  max-width: 500px;
  margin: 0 2rem;
}

.nav-search {
  position: relative;
  width: 100%;
}

.nav-search-input {
  width: 100%;
  padding: 12px 20px;
  border: 2px solid var(--input-border);
  border-radius: 25px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 1em;
  transition: all 0.3s ease;
}

.nav-search-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quick-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--card-border);
}

.nav-btn {
  padding: 8px 16px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-color);
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3), 0 0 0 2px rgba(230, 57, 70, 0.2);
}

.nav-btn.primary {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.nav-btn.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  position: relative;
}

/* Hero Section */
.hero-section {
  margin-top: 70px;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff6b6b 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  flex: 1;
  z-index: 2;
}

.hero-title {
  font-size: 3.5em;
  font-weight: 800;
  margin: 0 0 1rem 0;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: #ffffff;
  text-shadow: 
    2px 2px 4px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(186, 30, 45, 0.8),
    0 0 40px rgba(186, 30, 45, 0.4);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-emoji {
  font-size: 1.2em;
  animation: bounce 2s infinite;
}

.hero-sparkle {
  font-size: 0.8em;
  animation: sparkle 3s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-subtitle {
  font-size: 1.3em;
  opacity: 0.9;
  margin: 0 0 2rem 0;
  max-width: 500px;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-size: 2.5em;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hero-stat-label {
  font-size: 0.9em;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-preview {
  flex: 0 0 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.preview-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  transform: rotate(5deg);
  transition: all 0.3s ease;
  cursor: pointer;
}

.preview-card:hover {
  transform: rotate(0deg) scale(1.05);
}

.preview-emoji {
  font-size: 4em;
  margin-bottom: 1rem;
}

.preview-title {
  font-size: 0.9em;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.preview-subtitle {
  font-size: 1.5em;
  font-weight: 700;
}

/* Main Container */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* MOTD Banner */
.motd-banner {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  margin-bottom: 2rem;
  border-radius: 15px;
  overflow: hidden;
}

.motd-banner .motd-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
}

.motd-icon {
  font-size: 1.5em;
}

.motd-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  margin-left: auto;
}

/* Filter Section */
.filter-section {
  margin-bottom: 3rem;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filter-title {
  font-size: 2em;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.modern-select {
  padding: 10px 15px;
  border: 2px solid var(--input-border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 1em;
  cursor: pointer;
}

.category-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  background: var(--bg-secondary);
  padding: 0.5rem;
  border-radius: 15px;
  border: 1px solid var(--card-border);
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.category-tab:hover {
  background: rgba(230, 57, 70, 0.1);
  color: var(--accent-color);
}

.category-tab.active {
  background: var(--accent-color);
  color: white;
}

.tab-icon {
  font-size: 1.1em;
}

/* Dashboard Section */
.dashboard-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.dashboard-title {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.dashboard-action {
  padding: 10px 20px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.dashboard-action:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.dashboard-card {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 15px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-header {
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.2em;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 0.5rem 0;
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: 0.9em;
}

/* Achievement Progress Card */
.achievement-progress {
  text-align: center;
}

.achievement-summary {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.progress-ring {
  flex: 0 0 80px;
}

.progress-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-color) 0deg, var(--card-border) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.progress-circle::before {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  background: var(--bg-secondary);
  border-radius: 50%;
}

.progress-text {
  font-weight: 700;
  color: var(--accent-color);
  z-index: 1;
}

.progress-details {
  display: flex;
  gap: 1rem;
}

.progress-stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.5em;
  font-weight: 700;
  color: var(--accent-color);
}

.stat-label {
  font-size: 0.8em;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Games Section */
.games-section {
  margin-bottom: 3rem;
}

.games-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.games-title {
  font-size: 2em;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.game-count {
  color: var(--text-secondary);
  font-size: 1em;
}

/* Modern Game Grid */
.modern-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.mini-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.mini-game-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mini-game-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-color);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(230, 57, 70, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-nav {
    padding: 0 0.5rem;
    height: 50px; /* Much shorter on mobile */
    flex-wrap: nowrap; /* Prevent wrapping */
  }
  
  .nav-brand {
    flex: 0 0 auto;
    min-width: 80px;
    gap: 6px;
  }
  
  .nav-logo {
    width: 20px;
    height: 20px;
  }
  
  .nav-title {
    font-size: 0.85em;
    display: none; /* Hide title text on mobile to save space */
  }
  
  .nav-center {
    display: flex;
    flex: 1;
    max-width: 150px;
    margin: 0 0.25rem;
  }
  
  .nav-search-input {
    font-size: 12px;
    padding: 6px 10px;
    width: 100%;
  }
  
  .nav-actions {
    flex: 0 0 auto;
    gap: 2px;
  }
  
  .quick-actions {
    display: flex;
    gap: 2px;
    padding-left: 0.5rem;
  }
  
  .nav-btn {
    padding: 3px 5px !important;
    font-size: 0.65em !important;
    min-width: 24px !important;
    min-height: 24px !important;
    gap: 3px !important;
  }
  
  .nav-btn.icon-btn {
    padding: 4px !important;
    font-size: 0.8em !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
  }
  
  /* Override the earlier min-height rule that conflicts */
  .nav-btn, .nav-btn.icon-btn {
    min-height: 24px !important;
    min-width: 24px !important;
  }
  
  /* Hide text on all buttons to save space - icon only */
  .nav-btn:not(.icon-btn) span:not(:first-child) {
    display: none;
  }
  
  /* Hide user name, show only avatar */
  .user-section .nav-btn span:not(:first-child) {
    display: none;
  }
  
  .user-section {
    display: flex;
    gap: 2px;
  }
  
  /* Make sign in button smaller */
  .nav-btn.primary {
    padding: 4px 8px;
    font-size: 0.7em;
  }
  
  /* Show nav-center on game pages - override mobile hiding */
  body:not(.home-page) .nav-center {
    display: flex !important;
    justify-content: center;
    margin: 0 1rem;
    max-width: none;
  }
  
  .nav-center .page-title {
    font-size: 1.1em;
    color: var(--accent-color);
    margin: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 1rem 0.5rem;
    margin-top: 50px; /* Match nav height */
    align-items: center;
  }
  
  .hero-title {
    font-size: 1.5em;
  }
  
  .hero-preview {
    display: none; /* Hide preview on mobile to save space */
  }
  
  .preview-card {
    display: none;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }
  
  .mini-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .arcade-row {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .arcade-row-item {
    padding: 1.25rem;
  }
  
  .category-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  
  .modern-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    padding: 0 5px;
  }
  
  .mini-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
  }
  
  .mini-game-card {
    padding: 0.8rem;
    min-height: 100px;
  }
}

@media (max-width: 480px) {
  .quick-actions .nav-btn {
    padding: 8px;
    font-size: 0.9em;
  }
  
  .quick-actions .nav-btn span:not(.achievement-badge) {
    display: none;
  }
  
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
  }
  
  .hero-title {
    font-size: 1.8em;
  }
  
  .hero-preview {
    margin-left: 0;
    margin-top: 1rem;
  }
  
  .arcade-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .arcade-categories {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  
  .mini-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
  }
  
  .arcade-row {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
  }
  
  .arcade-row-item {
    padding: 1rem;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Adjust page title size on very small screens */
  .nav-center .page-title {
    font-size: 1em;
  }
  
  /* Adjust nav actions on small screens */
  .nav-actions {
    gap: 0.25rem;
  }
  
  .nav-btn {
    padding: 6px 12px;
    font-size: 0.9em;
  }
}

/* === FORCE DESKTOP LAYOUT ON ALL DEVICES === */
/* Override all mobile styles to use desktop layout everywhere */
@media (max-width: 9999px) {
  /* Force desktop styles on all screen sizes */
  
  /* Navigation - use desktop styles */
  .main-nav {
    padding: 0 2rem !important;
    height: 70px !important;
  }
  
  .nav-brand {
    min-width: auto !important;
    gap: 12px !important;
  }
  
  .nav-logo {
    width: 32px !important;
    height: 32px !important;
  }
  
  .nav-title {
    font-size: 1.2em !important;
    display: flex !important;
  }
  
  .nav-center {
    max-width: 500px !important;
    margin: 0 2rem !important;
  }
  
  .nav-search-input {
    font-size: 1em !important;
    padding: 12px 20px !important;
  }
  
  .nav-actions {
    gap: 1rem !important;
  }
  
  .quick-actions {
    gap: 0.5rem !important;
    padding-left: 1rem !important;
  }
  
  .nav-btn {
    padding: 8px 16px !important;
    font-size: 1em !important;
    min-width: auto !important;
    min-height: auto !important;
    gap: 8px !important;
  }
  
  .nav-btn.icon-btn {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    font-size: 1em !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }
  
  /* Show all button text */
  .nav-btn:not(.icon-btn) span,
  .nav-btn span {
    display: inline !important;
  }
  
  .user-section {
    gap: 0.5rem !important;
  }
  
  .nav-btn.primary {
    padding: 8px 16px !important;
    font-size: 1em !important;
  }
  
  /* Hero section - desktop styles */
  .hero-section {
    padding: 4rem 2rem !important;
    margin-top: 70px !important;
    flex-direction: row !important;
    text-align: left !important;
  }
  
  .hero-title {
    font-size: 3em !important;
  }
  
  .hero-preview {
    display: block !important;
  }
  
  .preview-card {
    display: block !important;
  }
  
  /* Game grid - desktop styles */
  .arcade-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 2rem !important;
    padding: 0 !important;
  }
  
  .arcade-game-card {
    padding: 1.5rem !important;
  }
  
  .arcade-game-icon {
    width: 60px !important;
    height: 60px !important;
    font-size: 2em !important;
  }
  
  .arcade-game-title {
    font-size: 1.3em !important;
  }
  
  .arcade-game-description {
    font-size: 0.95em !important;
    margin-bottom: 1rem !important;
  }
  
  .arcade-row {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
  }
  
  .modern-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    padding: 0 !important;
  }
  
  .mini-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 1rem !important;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 1.5rem !important;
  }
  
  .user-browser-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
  }
  
  .arcade-categories {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 0.75rem !important;
  }
  
  /* Container - desktop padding */
  .arcade-container {
    padding: 2rem !important;
  }
  
  /* Sections - desktop spacing */
  .arcade-section {
    margin-bottom: 3rem !important;
    padding: 0 !important;
  }
  
  /* Ensure game grid is visible and properly displayed */
  #button-grid {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 200px !important;
    width: 100% !important;
    position: relative !important;
    z-index: 1 !important;
  }
  
  /* Ensure arcade-games-grid class works */
  .arcade-games-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 2rem !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 200px !important;
  }
  
  /* Ensure game cards are visible */
  .arcade-game-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 150px !important;
  }
  
  /* Ensure the section containing games is visible */
  .arcade-section:has(#button-grid) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
  }
}

/* ===== FINAL OVERRIDE - MODERN INDUSTRY STANDARD APPROACH ===== */
/* Based on how modern game websites (itch.io, Steam, etc.) structure their grids */
#button-grid,
#button-grid.arcade-games-grid,
.arcade-games-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)) !important;
  gap: clamp(1rem, 4vw, 2rem) !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 200px !important;
  width: 100% !important;
  position: relative !important;
  z-index: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.arcade-game-card {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 150px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.arcade-section:has(#button-grid),
.arcade-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ===== MODERN RESPONSIVE BREAKPOINTS - INDUSTRY STANDARD ===== */
/* Based on how modern game websites handle responsive grids */
@media (max-width: 1200px) {
  .arcade-games-grid,
  #button-grid.arcade-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .arcade-games-grid,
  #button-grid.arcade-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)) !important;
    gap: clamp(0.75rem, 3vw, 1.5rem) !important;
  }
}

@media (max-width: 480px) {
  .arcade-games-grid,
  #button-grid.arcade-games-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

/* === OLD MOBILE RESPONSIVE LAYOUT - DISABLED === */
/* These are overridden by the desktop layout above */
@media (max-width: 768px) {
  /* All mobile styles disabled - using desktop layout everywhere */
  /* Responsive game grid for mobile - smaller minmax to fit on mobile screens */
  .modern-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    padding: 0 !important;
  }
  
  .mini-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 1rem !important;
  }
  
  /* Use desktop grid size everywhere */
  .arcade-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 2rem !important;
    padding: 0 !important;
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .arcade-row {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 0.75rem !important;
  }
  
  /* Make game cards smaller on mobile */
  .arcade-game-card {
    padding: 1rem !important;
  }
  
  .arcade-game-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.5em !important;
  }
  
  .arcade-game-title {
    font-size: 1em !important;
  }
  
  .arcade-game-description {
    font-size: 0.8em !important;
    margin-bottom: 0.5rem !important;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 1rem !important;
  }
  
  .user-browser-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    gap: 1rem !important;
  }
  
  .arcade-categories {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
    gap: 0.75rem !important;
  }
  
  /* Reduce padding on mobile to give more space for content */
  .arcade-container {
    padding: 1rem !important;
    margin-top: 0 !important; /* No extra margin needed */
  }
  
  .hero-section {
    padding: 1rem 0.5rem !important;
    margin-top: 50px !important; /* Match nav height */
  }
  
  /* Ensure arcade sections are visible */
  .arcade-section {
    margin-bottom: 2rem !important;
    padding: 0 !important;
  }
  
  /* Make sure game grid section is visible */
  #button-grid {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 100px !important;
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Override any flexbox layout */
  #button-grid.button-grid {
    display: grid !important;
    flex-wrap: unset !important;
  }
  
  /* Ensure arcade section containing games is visible */
  .arcade-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 200px !important;
    overflow: visible !important;
    position: relative !important;
    margin-bottom: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  /* Make sure the games section specifically is visible */
  .arcade-section:has(#button-grid) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 1rem 0 !important;
    margin: 2rem 0 !important;
  }
  
  /* Ensure game cards are visible */
  .arcade-game-card {
    min-width: 0 !important; /* Allow cards to shrink if needed */
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
  }
  
  /* Ensure proper button sizes for touch - but nav buttons stay small */
  button, .game-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Nav buttons are smaller */
  .nav-btn {
    min-height: 24px !important;
    min-width: 24px !important;
  }
  
  /* Ensure body and html allow scrolling */
  body, html {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
  }
  
  /* Make sure container doesn't hide content */
  .arcade-container {
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    padding-bottom: 3rem !important; /* Extra space at bottom */
  }
  
  /* Ensure page can scroll to see all games */
  body.home-page {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh !important;
  }
}

/* Very small screens (phones in portrait) */
@media (max-width: 480px) {
  /* Make nav even smaller */
  .main-nav {
    height: 45px !important;
    padding: 0 0.25rem !important;
  }
  
  .nav-btn {
    min-width: 22px !important;
    min-height: 22px !important;
    padding: 2px 3px !important;
    font-size: 0.6em !important;
  }
  
  .nav-btn.icon-btn {
    width: 22px !important;
    height: 22px !important;
    padding: 3px !important;
    font-size: 0.75em !important;
    min-width: 22px !important;
    min-height: 22px !important;
  }
  
  .nav-logo {
    width: 18px !important;
    height: 18px !important;
  }
  
  .hero-section {
    margin-top: 45px !important;
    padding: 0.75rem 0.25rem !important;
  }
  
  .hero-title {
    font-size: 1.2em !important;
  }
  
  /* Even smaller minmax for very small screens */
  .modern-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    gap: 0.5rem !important;
  }
  
  .mini-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
    gap: 0.5rem !important;
  }
  
  /* Single column layout for very small screens - ensures all games are visible */
  .arcade-games-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
    padding: 0.5rem 0 !important;
  }
  
  .arcade-row {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  
  .user-browser-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  
  /* Reduce padding even more on very small screens */
  .arcade-container {
    padding: 0.5rem !important;
  }
  
  /* Make game cards even more compact */
  .arcade-game-card {
    padding: 0.75rem !important;
  }
  
  .arcade-game-icon {
    width: 35px !important;
    height: 35px !important;
    font-size: 1.3em !important;
  }
  
  .arcade-game-title {
    font-size: 0.9em !important;
  }
  
  .arcade-game-description {
    font-size: 0.75em !important;
    line-height: 1.3 !important;
  }
}

/* ===== FORCE DESKTOP LAYOUT ON ALL DEVICES ===== */
/* Override ALL mobile styles - use desktop layout everywhere */
@media (max-width: 99999px) {
  /* Navigation - always use desktop styles */
  .main-nav {
    padding: 0 2rem !important;
    height: 70px !important;
  }
  
  .nav-brand {
    min-width: auto !important;
    gap: 12px !important;
  }
  
  .nav-logo {
    width: 32px !important;
    height: 32px !important;
  }
  
  .nav-title {
    font-size: 1.2em !important;
    display: flex !important;
  }
  
  .nav-center {
    max-width: 500px !important;
    margin: 0 2rem !important;
  }
  
  .nav-search-input {
    font-size: 1em !important;
    padding: 12px 20px !important;
  }
  
  .nav-actions {
    gap: 1rem !important;
  }
  
  .quick-actions {
    gap: 0.5rem !important;
    padding-left: 1rem !important;
  }
  
  .nav-btn {
    padding: 8px 16px !important;
    font-size: 1em !important;
    min-width: auto !important;
    min-height: auto !important;
    gap: 8px !important;
  }
  
  .nav-btn.icon-btn {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    font-size: 1em !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }
  
  /* Show all button text */
  .nav-btn span,
  .nav-btn:not(.icon-btn) span,
  .user-section .nav-btn span {
    display: inline !important;
  }
  
  .user-section {
    gap: 0.5rem !important;
  }
  
  .nav-btn.primary {
    padding: 8px 16px !important;
    font-size: 1em !important;
  }
  
  /* Hero section - desktop styles */
  .hero-section {
    padding: 4rem 2rem !important;
    margin-top: 70px !important;
    flex-direction: row !important;
    text-align: left !important;
  }
  
  .hero-title {
    font-size: 3em !important;
  }
  
  .hero-preview {
    display: block !important;
  }
  
  .preview-card {
    display: block !important;
  }
  
  /* Game grid - desktop styles */
  .arcade-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 2rem !important;
    padding: 0 !important;
  }
  
  .arcade-game-card {
    padding: 1.5rem !important;
  }
  
  .arcade-game-icon {
    width: 60px !important;
    height: 60px !important;
    font-size: 2em !important;
  }
  
  .arcade-game-title {
    font-size: 1.3em !important;
  }
  
  .arcade-game-description {
    font-size: 0.95em !important;
    margin-bottom: 1rem !important;
  }
  
  .arcade-row {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
  }
  
  .modern-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    padding: 0 !important;
  }
  
  .mini-game-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 1rem !important;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 1.5rem !important;
  }
  
  .user-browser-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
  }
  
  .arcade-categories {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 0.75rem !important;
  }
  
  /* Container - desktop padding */
  .arcade-container {
    padding: 2rem !important;
  }
  
  /* Sections - desktop spacing */
  .arcade-section {
    margin-bottom: 3rem !important;
    padding: 0 !important;
  }
  
  /* Ensure game grid is visible and properly displayed */
  #button-grid {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 200px !important;
    width: 100% !important;
    position: relative !important;
    z-index: 1 !important;
  }
  
  /* Ensure arcade-games-grid class works */
  .arcade-games-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 2rem !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 200px !important;
  }
  
  /* Ensure game cards are visible */
  .arcade-game-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 150px !important;
  }
  
  /* Ensure the section containing games is visible */
  .arcade-section:has(#button-grid) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
  }
}

/* ===== FINAL OVERRIDE - MODERN INDUSTRY STANDARD APPROACH ===== */
/* Based on how modern game websites (itch.io, Steam, etc.) structure their grids */
#button-grid,
#button-grid.arcade-games-grid,
.arcade-games-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)) !important;
  gap: clamp(1rem, 4vw, 2rem) !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 200px !important;
  width: 100% !important;
  position: relative !important;
  z-index: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.arcade-game-card {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 150px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.arcade-section:has(#button-grid),
.arcade-section {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ===== MODERN RESPONSIVE BREAKPOINTS - INDUSTRY STANDARD ===== */
/* Based on how modern game websites handle responsive grids */
@media (max-width: 1200px) {
  .arcade-games-grid,
  #button-grid.arcade-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .arcade-games-grid,
  #button-grid.arcade-games-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)) !important;
    gap: clamp(0.75rem, 3vw, 1.5rem) !important;
  }
}

@media (max-width: 480px) {
  .arcade-games-grid,
  #button-grid.arcade-games-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}