/* ============================================
   Game Collector Pal - Retro Pixel Styles
   ============================================ */

/* CSS Variables */
:root {
  --primary-color: #8b5cf6;
  --secondary-color: #ec4899;
  --accent-color: #10b981;
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-tertiary: #0f3460;
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0a0;
  --border-color: #533483;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
  
  --transition: all 0.2s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Courier New', monospace;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  image-rendering: pixelated;
}

/* Pixel font for headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Press Start 2P', cursive;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   Header
   ============================================ */
.header {
  background: var(--bg-secondary);
  border-bottom: 4px solid var(--primary-color);
  padding: 20px 0;
  box-shadow: var(--shadow-md);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  color: var(--primary-color);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.pixel-icon {
  font-size: 2rem;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.5));
}

.logo-icon {
  height: 2.2rem;
  width: auto;
  display: block;
  filter: drop-shadow(2px 2px 4px rgba(139, 92, 246, 0.5));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-icon:hover {
  transform: scale(1.1);
  filter: drop-shadow(2px 2px 8px rgba(139, 92, 246, 0.7));
}

.logo-text {
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(
    45deg,
    #8b5cf6,
    #a78bfa,
    #06b6d4,
    #67e8f9,
    #8b5cf6
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gaming-gradient 4s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

@keyframes gaming-gradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-selector {
  display: flex;
  gap: 5px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  padding: 4px;
  height: 40px;
}

.lang-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: bold;
}

.lang-button:hover {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.lang-button.active {
  background: var(--bg-secondary);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.flag-icon {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.login-button {
  height: 40px;
}

/* ============================================
   Navigation
   ============================================ */
.navigation {
  background: var(--bg-tertiary);
  border-bottom: 2px solid var(--border-color);
  padding: 0;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
}

.nav-item {
  flex: 1;
}

.nav-button {
  width: 100%;
  padding: 15px 20px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-bottom: 3px solid transparent;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
}

.nav-button:hover {
  background: rgba(139, 92, 246, 0.1);
  color: var(--primary-color);
}

.nav-button.active {
  background: rgba(139, 92, 246, 0.2);
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
  padding: 40px 0;
  min-height: calc(100vh - 200px);
}

.view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 30px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

/* ============================================
   Pixel Styled Components
   ============================================ */
.pixel-box {
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
  padding: 20px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.pixel-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    var(--primary-color) 0%, 
    var(--secondary-color) 100%);
}

.pixel-input,
.pixel-select {
  width: 100%;
  padding: 12px 15px;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  transition: var(--transition);
}

.pixel-input:focus,
.pixel-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.pixel-button {
  padding: 10px 24px 6px 24px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.pixel-button::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;
}

.pixel-button:hover::before {
  left: 100%;
}

.pixel-button:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.pixel-button:active {
  box-shadow: none;
}

.pixel-button.primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.pixel-button.secondary {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
}

.pixel-button.success {
  background: var(--success-color);
  border-color: var(--success-color);
}

.pixel-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: #666;
}

.pixel-button:disabled::before {
  display: none;
}

.pixel-button:disabled:hover {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  box-shadow: none;
  transform: none;
}

/* ============================================
   Search Section
   ============================================ */
.search-section {
  margin-bottom: 40px;
}

.search-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 15px;
  margin-bottom: 20px;
}

.search-input-wrapper {
  position: relative;
}

.search-input {
  padding-right: 40px;
}

.search-loading-indicator {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

.spinner-small {
  width: 18px;
  height: 18px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-right-color: var(--primary-color);
  border-radius: 0; /* Square for pixel-art look */
  animation: spin 1s linear infinite;
  box-shadow: 0 0 0 1px var(--bg-secondary);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-top: none;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: var(--shadow-lg);
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-result-item:hover {
  background: var(--bg-tertiary);
  border-left: 4px solid var(--primary-color);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-cover {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  image-rendering: pixelated;
  pointer-events: none; /* Evita que la imagen capture clics */
}

.search-result-info {
  flex: 1;
}

.search-result-title {
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.search-result-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-result-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.platform-filter {
  min-width: 350px;
}

.platform-filter:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--bg-secondary);
}

.platform-autocomplete-wrapper {
  position: relative;
  min-width: 350px;
}

.platform-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-top: none;
  z-index: 1000;
  margin-top: -2px;
}

.platform-dropdown.show {
  display: block;
}

.platform-option {
  padding: 12px 15px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.platform-option:last-child {
  border-bottom: none;
}

.platform-option:hover,
.platform-option.selected,
.platform-option.keyboard-selected {
  background: var(--primary-color);
  color: #ffffff;
}

.platform-option.all-platforms {
  font-weight: bold;
  border-bottom: 2px solid var(--border-color);
}

/* Scrollbar para el dropdown */
.platform-dropdown::-webkit-scrollbar {
  width: 10px;
}

.platform-dropdown::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.platform-dropdown::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border: 2px solid var(--bg-secondary);
}

.platform-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Search Placeholder (Capybara & Cat GIF) */
.search-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  margin-top: 40px;
  opacity: 0.7;
  animation: fadeIn 0.5s ease-in;
}

.search-placeholder-container {
  position: relative;
  display: inline-block;
}

.search-placeholder-image {
  max-width: 135px;
  width: 100%;
  height: auto;
  image-rendering: auto; /* Mantener la calidad del GIF */
  filter: brightness(0.6) contrast(0.9);
  mix-blend-mode: luminosity;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.search-placeholder-image:hover {
  filter: brightness(0.7) contrast(1);
}

.search-placeholder-image:active {
  filter: brightness(0.5) contrast(1.1);
}

/* Viñeta "yup!" */
.jump-bubble {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: var(--primary-color);
  color: var(--bg-primary);
  padding: 6px 12px;
  border-radius: 12px;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  font-weight: bold;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid var(--accent-color);
}

/* Cola de la viñeta (punta que apunta a la imagen) */
.jump-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--primary-color);
}

/* Tooltip al hacer hover */
.hover-tooltip {
  position: absolute;
  bottom: -58px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 10px 15px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 2px solid var(--border-color);
  min-width: 240px;
  white-space: normal;
  text-align: center;
  line-height: 1.4;
}

/* Cola del tooltip (punta que apunta hacia arriba) */
.hover-tooltip::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--border-color);
}

.hover-tooltip::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid var(--bg-secondary);
}

/* Animación de aparición del tooltip */
@keyframes tooltipFadeIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.8) translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
  }
}

.hover-tooltip.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: tooltipFadeIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Animación de salto realista para la imagen */
@keyframes jumpAnimation {
  0% {
    transform: translateY(0) scaleY(1);
  }
  15% {
    transform: translateY(-8px) scaleY(1.05) scaleX(0.98);
  }
  30% {
    transform: translateY(-50px) scaleY(1.1) scaleX(0.95);
  }
  45% {
    transform: translateY(-80px) scaleY(1.15) scaleX(0.92);
  }
  55% {
    transform: translateY(-80px) scaleY(1.15) scaleX(0.92);
  }
  70% {
    transform: translateY(-50px) scaleY(1.1) scaleX(0.95);
  }
  85% {
    transform: translateY(-8px) scaleY(1.05) scaleX(0.98);
  }
  92% {
    transform: translateY(0) scaleY(0.95) scaleX(1.05);
  }
  96% {
    transform: translateY(0) scaleY(0.98) scaleX(1.02);
  }
  100% {
    transform: translateY(0) scaleY(1) scaleX(1);
  }
}

/* Animación de la viñeta que sigue el salto */
@keyframes bubbleJumpAnimation {
  0% {
    transform: translateX(-50%) translateY(0) scale(0);
    opacity: 0;
  }
  10% {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
  }
  20% {
    transform: translateX(-50%) translateY(-10px) scale(1);
    opacity: 1;
  }
  35% {
    transform: translateX(-50%) translateY(-55px) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) translateY(-85px) scale(1);
    opacity: 1;
  }
  60% {
    transform: translateX(-50%) translateY(-85px) scale(1);
    opacity: 1;
  }
  75% {
    transform: translateX(-50%) translateY(-55px) scale(1);
    opacity: 1;
  }
  88% {
    transform: translateX(-50%) translateY(-10px) scale(1);
    opacity: 1;
  }
  95% {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translateX(-50%) translateY(0) scale(0);
    opacity: 0;
  }
}

.search-placeholder-image.jumping {
  animation: jumpAnimation 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.jump-bubble.jumping {
  animation: bubbleJumpAnimation 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 0.7;
    transform: translateY(0);
  }
}

/* Responsive para la imagen placeholder */
@media (max-width: 768px) {
  .search-placeholder-image {
    max-width: 150px;
  }
  
  .search-placeholder {
    padding: 40px 20px;
  }
  
  .hover-tooltip {
    display: none !important;
  }
}

/* ============================================
   Welcome Section (Not Logged In)
   ============================================ */
.welcome-section {
  margin-top: 40px;
  animation: fadeIn 0.6s ease;
}

.welcome-content {
  padding: 40px;
}

.welcome-header {
  text-align: center;
  margin-bottom: 40px;
}

.welcome-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.4;
}

.welcome-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.welcome-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.feature-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  padding: 25px;
  border-radius: 8px;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.feature-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.feature-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.5;
}

.feature-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.welcome-cta {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(109, 40, 217, 0.1));
  border: 3px solid var(--primary-color);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
}

.cta-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  line-height: 1.4;
}

.cta-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.welcome-cta-button {
  font-size: 0.9rem;
  padding: 15px 40px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(139, 92, 246, 0);
  }
}

/* Mobile responsive for welcome section */
@media (max-width: 768px) {
  .welcome-content {
    padding: 25px;
  }

  .welcome-title {
    font-size: 1.2rem;
  }

  .welcome-subtitle {
    font-size: 0.85rem;
  }

  .welcome-features {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-card {
    padding: 20px;
  }

  .feature-icon {
    font-size: 1.5rem;
  }

  .feature-title {
    font-size: 0.8rem;
  }

  .feature-description {
    font-size: 0.85rem;
  }

  .welcome-cta {
    padding: 25px;
  }

  .cta-title {
    font-size: 1rem;
  }

  .cta-description {
    font-size: 0.85rem;
  }

  .welcome-cta-button {
    font-size: 0.8rem;
    padding: 12px 30px;
  }
}

/* ============================================
   Game Details
   ============================================ */
.game-details {
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.game-details-header-buttons {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 100;
}

.back-button,
.close-button {
  padding: 10px 20px;
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
  color: var(--text-primary);
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.back-button:hover,
.close-button:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.back-button:active,
.close-button:active {
  transform: translateY(0);
}

.pixel-box:has(.game-details-header-buttons) {
  padding-top: 70px;
}

.game-header {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.game-cover-large {
  width: 100%;
  height: auto;
  border: 4px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  image-rendering: pixelated;
}

.game-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.game-title {
  font-size: 2rem;
  color: var(--primary-color);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.game-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.meta-item {
  background: var(--bg-tertiary);
  padding: 10px 15px;
  border-left: 3px solid var(--primary-color);
}

.meta-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.meta-value {
  font-weight: bold;
  color: var(--text-primary);
}

.game-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.game-in-collection-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px 6px 24px;
  background: var(--success-color);
  color: #ffffff;
  border: 2px solid var(--success-color);
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: bold;
}

.game-description {
  background: var(--bg-tertiary);
  padding: 20px;
  border-left: 4px solid var(--secondary-color);
  margin-top: 20px;
  margin-bottom: 30px;
  line-height: 1.8;
}

.game-description .meta-label {
  margin-bottom: 15px;
}

.game-description p {
  margin-bottom: 15px;
  line-height: 1.8;
}

.game-description p:last-child {
  margin-bottom: 0;
}

.game-description strong {
  color: var(--primary-color);
  font-weight: bold;
}

.game-description br {
  display: block;
  margin: 8px 0;
  content: "";
}

.game-insights {
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
  padding: 25px;
  margin-top: 30px;
}

.insights-title {
  font-size: 1.2rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.insights-content {
  line-height: 1.8;
  color: var(--text-primary);
}

.insights-content h1,
.insights-content h2,
.insights-content h3 {
  color: var(--primary-color);
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}

.insights-content h1:first-child,
.insights-content h2:first-child,
.insights-content h3:first-child {
  margin-top: 0;
}

.insights-content p {
  margin-bottom: 18px;
  text-align: justify;
}

.insights-content ul,
.insights-content ol {
  margin-left: 25px;
  margin-bottom: 18px;
  line-height: 2;
}

.insights-content li {
  margin-bottom: 10px;
}

.insights-content strong {
  color: var(--accent-color);
  font-weight: bold;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.insights-content em {
  color: var(--secondary-color);
  font-style: italic;
}

.insights-content code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  color: var(--primary-color);
}

/* ============================================
   Game Family Tree
   ============================================ */
.game-family-tree {
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
  border-left: 5px solid var(--secondary-color);
  padding: 25px;
  margin-top: 30px;
}

.family-tree-title {
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.load-family-tree-btn {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  background: var(--secondary-color);
  border: 2px solid var(--border-color);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.load-family-tree-btn:hover {
  background: var(--primary-color);
  transform: scale(1.02);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.family-tree-content {
  line-height: 1.8;
  color: var(--text-primary);
}

.family-tree-content h1,
.family-tree-content h2,
.family-tree-content h3 {
  color: var(--secondary-color);
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}

.family-tree-content h1:first-child,
.family-tree-content h2:first-child,
.family-tree-content h3:first-child {
  margin-top: 0;
}

.family-tree-content p {
  margin-bottom: 18px;
  text-align: justify;
}

.family-tree-content ul,
.family-tree-content ol {
  margin-left: 25px;
  margin-bottom: 18px;
  line-height: 2;
}

.family-tree-content li {
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 2px solid var(--border-color);
}

.family-tree-content strong {
  color: var(--secondary-color);
  font-weight: bold;
  text-shadow: 0 0 5px rgba(34, 211, 238, 0.3);
}

.family-tree-content em {
  color: var(--accent-color);
  font-style: italic;
}

.family-tree-content code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  color: var(--secondary-color);
}

.family-tree-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
}

.family-tree-content table thead {
  background: var(--secondary-color);
  color: var(--bg-primary);
}

.family-tree-content table th {
  padding: 12px;
  text-align: left;
  font-weight: bold;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.family-tree-content table td {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  line-height: 1.6;
}

.family-tree-content table tr:nth-child(even) {
  background: rgba(139, 92, 246, 0.05);
}

.family-tree-content table tr:hover {
  background: rgba(34, 211, 238, 0.1);
}

/* ============================================
   Collection Filters
   ============================================ */
.collection-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.collection-search-wrapper {
  flex: 1;
  min-width: 250px;
}

.collection-search-input {
  width: 100%;
}

.collection-list-filter-wrapper {
  min-width: 250px;
}

.collection-list-filter {
  width: 100%;
}

.collection-sort-wrapper {
  min-width: 250px;
}

.collection-sort-select {
  width: 100%;
}

/* ============================================
   Game Grid (Collection)
   ============================================ */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
}

.game-grid .empty-state {
  grid-column: 1 / -1;
}

.game-card {
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.game-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}

.game-card-highlighted {
  border-color: var(--secondary-color) !important;
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.3) !important;
  animation: pulse-highlight 1s ease-in-out 2;
}

@keyframes pulse-highlight {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.3);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(236, 72, 153, 0.5);
  }
}

.game-card-cover {
  width: 100%;
  height: 300px;
  object-fit: cover;
  background: var(--bg-primary);
  border-bottom: 3px solid var(--border-color);
  image-rendering: pixelated;
  transition: opacity 0.3s ease;
}

.game-card-cover.lazy-image {
  opacity: 0.5;
}

.game-card-cover.lazy-image.loaded {
  opacity: 1;
}

.search-result-cover.lazy-image {
  opacity: 0.5;
}

.search-result-cover.lazy-image.loaded {
  opacity: 1;
}

.game-card-content {
  padding: 15px;
}

.game-card-title {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.game-card-actions {
  padding: 10px 15px;
  background: var(--bg-primary);
  border-top: 2px solid var(--border-color);
  display: flex;
  gap: 10px;
}

.game-card-actions .pixel-button {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.6rem;
}

/* Shelf Mode Styles */
.shelf-mode-toggle-wrapper {
  display: flex;
  align-items: center;
}

#shelfModeToggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  transition: all 0.3s ease;
  background: var(--bg-tertiary);
  border-color: var(--border-color);
  opacity: 0.7;
}

#shelfModeToggle:hover {
  opacity: 1;
  border-color: var(--primary-color);
}

#shelfModeToggle.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
  opacity: 1;
  color: #ffffff;
}

#shelfModeToggle.active:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.7);
}

#shelfModeToggle.active .shelf-mode-icon {
  filter: brightness(1.2);
}

.shelf-mode-icon {
  font-size: 1.1rem;
}

/* Shelf Mode Grid */
.game-grid.shelf-mode {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
}

.shelf-card {
  background: transparent;
  border: none;
  cursor: pointer;
  perspective: 1000px;
  height: auto;
  overflow: visible;
}

.shelf-card-inner {
  position: relative;
  width: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.shelf-card.expanded .shelf-card-inner {
  transform: rotateY(180deg);
}

.shelf-card:hover .shelf-card-inner {
  transform: scale(1.02);
}

.shelf-card.expanded:hover .shelf-card-inner {
  transform: rotateY(180deg) scale(1.02);
}

.shelf-card-cover-wrapper,
.shelf-card-details {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.shelf-card-cover-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  border: 3px solid var(--border-color);
  transition: all 0.3s ease;
}

.shelf-card:hover .shelf-card-cover-wrapper {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.shelf-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  transition: opacity 0.3s ease;
}

.shelf-card-cover.lazy-image {
  opacity: 0.5;
}

.shelf-card-cover.lazy-image.loaded {
  opacity: 1;
}

.shelf-card-details {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  border: 3px solid var(--primary-color);
  padding: 12px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.6);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.shelf-card.expanded .shelf-card-details {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px var(--secondary-color), 0 6px 16px rgba(236, 72, 153, 0.5);
}

.shelf-card .game-card-content {
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

.shelf-card .game-card-title {
  font-size: 0.75rem;
  margin-bottom: 8px;
  line-height: 1.2;
  -webkit-line-clamp: 3;
}

.shelf-card .game-card-meta {
  font-size: 0.65rem;
  gap: 4px;
}

.shelf-card .game-card-meta span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shelf-card .game-card-actions {
  padding: 0;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  flex-shrink: 0;
}

.shelf-card .game-card-actions .pixel-button {
  font-size: 0.6rem;
  padding: 6px 8px;
  width: 100%;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.empty-state-description {
  font-size: 1rem;
}

/* ============================================
   Lists
   ============================================ */
.lists-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.lists-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lists-container {
  display: grid;
  gap: 25px;
}

.list-card {
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
  border-left: 6px solid var(--primary-color);
  padding: 15px 20px;
  transition: var(--transition);
}

.list-card:hover {
  border-left-width: 10px;
  box-shadow: var(--shadow-md);
}

.list-header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
  flex: 1;
}

.list-header:hover .list-name {
  color: var(--secondary-color);
}

.list-header-info {
  flex: 1;
}

.list-stats {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.list-stats .meta-label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.list-stats .stat-icon {
  font-size: 0.9rem;
}

.list-name {
  font-size: 1.2rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  margin-bottom: 5px;
}

.collapse-icon {
  display: inline-block;
  font-size: 0.8rem;
  transition: transform 0.3s ease;
  min-width: 12px;
}

.collapse-icon.collapsed {
  transform: rotate(0deg);
}

.list-actions {
  display: flex;
  gap: 10px;
}

/* Menu móvil de acciones de lista (oculto por defecto) */
.list-actions-mobile {
  display: none;
}

.list-description {
  color: var(--text-secondary);
  margin-bottom: 10px;
  margin-top: 10px;
  font-style: italic;
}

.meta-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.list-games {
  margin-top: 15px;
  transition: all 0.3s ease;
}

.list-games {
  margin-top: 15px;
  transition: all 0.3s ease;
}

.list-sort-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding: 10px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
}

.list-sort-controls label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.list-sort-select {
  flex: 1;
  max-width: 250px;
  font-size: 0.85rem;
}

.list-games-simple {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-game-simple-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: var(--bg-tertiary);
  border-left: 3px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.list-game-simple-item:hover {
  background: var(--bg-primary);
  border-left-color: var(--primary-color);
  padding-left: 20px;
}

.list-game-simple-item .game-name {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.list-game-simple-item .game-year {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-left: 15px;
}

.empty-list-message {
  color: var(--text-secondary);
  text-align: center;
  padding: 20px;
  font-style: italic;
}

/* Old styles - remove */
.list-game-item {
  display: none;
}

/* ============================================
   Modal
   ============================================ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
}

.modal-content {
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

/* Confirm Modal Styles */
.confirm-modal .modal-content {
  max-width: 450px;
  text-align: center;
}

.confirm-modal .modal-title {
  font-size: 1.3rem;
  color: var(--accent-color);
  margin-bottom: 15px;
}

.confirm-message {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 25px;
  padding: 0 10px;
}

.confirm-modal .form-actions {
  justify-content: center;
  margin-top: 30px;
}

.confirm-modal .pixel-button.primary {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.confirm-modal .pixel-button.primary:hover {
  background: #e94560;
  border-color: #e94560;
  transform: translateY(-2px);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.form-actions .pixel-button {
  flex: 1;
}

/* ============================================
   Loading & Toast
   ============================================ */
.loading-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.pixel-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 0;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
  padding: 15px 20px;
  min-width: 300px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.success {
  border-left: 6px solid var(--success-color);
}

.toast.error {
  border-left: 6px solid var(--error-color);
}

.toast.warning {
  border-left: 6px solid var(--warning-color);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  /* Centrar cabecera en móvil */
  .header-content {
    justify-content: center;
    flex-direction: column;
  }
  
  .header-actions {
    justify-content: flex-end;
    width: 100%;
  }
  
  .language-selector {
    margin: 0;
    padding: 2px;
    height: 36px;
  }
  
  /* Ocultar texto del idioma en móvil, solo mostrar banderas */
  .lang-button span {
    display: none;
  }
  
  .lang-button {
    padding: 4px 6px;
    gap: 0;
  }
  
  .flag-icon {
    width: 24px;
    height: 18px;
  }
  
  .logo {
    justify-content: center;
  }
  
  .logo-text {
    font-size: 0.9rem;
  }
  
  .nav-button {
    font-size: 0.6rem;
    padding: 12px 10px;
  }
  
  .section-title {
    font-size: 1.2rem;
  }
  
  .search-controls {
    grid-template-columns: 1fr;
  }
  
  .platform-filter {
    min-width: 100%;
  }
  
  /* Reducir tamaño de imágenes de resultados de búsqueda en móvil */
  .search-result-cover {
    width: 40px;
    height: 53px;
  }
  
  .search-result-item {
    padding: 10px;
    gap: 10px;
  }
  
  /* Controles de colección a ancho completo en móvil */
  .collection-filters {
    flex-direction: column;
    gap: 12px;
  }
  
  .collection-search-wrapper,
  .collection-list-filter-wrapper,
  .collection-sort-wrapper,
  .shelf-mode-toggle-wrapper {
    min-width: 100%;
    width: 100%;
  }
  
  .shelf-mode-toggle-wrapper button {
    width: 100%;
  }
  
  .game-header {
    grid-template-columns: 1fr;
  }
  
  .game-title {
    font-size: 1.5rem;
  }
  
  .game-meta {
    grid-template-columns: 1fr;
  }
  
  /* Ficha del juego en móvil */
  .back-button,
  .close-button {
    padding: 6px 12px;
    font-size: 0.6rem;
  }
  
  .game-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .game-actions button {
    width: 100%;
  }
  
  /* Botones de guardar notas y condición a ancho completo */
  .tracking-section button,
  .notes-actions button {
    width: 100%;
  }
  
  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
  
  .game-grid.shelf-mode {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
  }
  
  .shelf-card .game-card-title {
    font-size: 0.65rem;
    -webkit-line-clamp: 2;
  }
  
  .shelf-card .game-card-meta {
    font-size: 0.6rem;
  }
  
  .shelf-card .game-card-actions .pixel-button {
    font-size: 0.55rem;
    padding: 5px 6px;
  }
  
  .shelf-card-details {
    padding: 8px;
  }
  
  .lists-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .lists-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .lists-actions button {
    width: 100%;
  }
  
  /* Estilos de listas en móvil */
  .list-card {
    padding: 12px 15px;
  }
  
  .list-name {
    font-size: 0.85rem;
  }
  
  .list-header-wrapper {
    flex-direction: row;
    align-items: start;
  }
  
  .list-header {
    flex-direction: column;
    gap: 12px;
    flex: 1;
  }
  
  .list-header-info {
    width: 100%;
  }
  
  .list-actions {
    display: none !important; /* Ocultar botones normales en móvil */
  }
  
  .list-actions-mobile {
    display: flex !important;
    justify-content: flex-end;
    width: auto;
    flex-shrink: 0;
  }
  
  .list-actions-dropdown {
    position: relative;
  }
  
  .list-actions-menu-button {
    padding: 8px 16px;
    font-size: 0.7rem;
  }
  
  .list-actions-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: var(--bg-tertiary);
    border: 3px solid var(--border-color);
    min-width: 150px;
    z-index: 100;
    box-shadow: var(--shadow-lg);
  }
  
  .list-actions-menu button {
    width: 100%;
    text-align: left;
    border: none;
    border-bottom: 2px solid var(--border-color);
    padding: 12px 15px;
    font-size: 0.7rem;
  }
  
  .list-actions-menu button:last-child {
    border-bottom: none;
  }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.hidden {
  display: none !important;
}

/* ============================================
   Authentication Styles
   ============================================ */

/* User Menu */
.user-menu {
  position: relative;
  display: none;
}

.user-menu.active {
  display: block;
}

.user-button {
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
  color: var(--text-primary);
  padding: 0px 15px 4px 12px;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 40px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-button:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
  min-width: 200px;
  z-index: 1000;
  display: none;
}

.user-dropdown.active {
  display: block;
}

.user-dropdown-header {
  padding: 15px;
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-color);
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-name {
  font-size: 1rem;
  font-weight: bold;
  color: var(--primary-color);
  font-family: var(--font-primary);
}

.user-stats {
  display: flex;
  gap: 15px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-icon {
  font-size: 0.9rem;
}

.user-dropdown-divider {
  height: 2px;
  background: var(--border-color);
}

.user-dropdown button {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 15px;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
}

.user-dropdown button:last-child {
  border-bottom: none;
}

.user-dropdown button:hover {
  background: var(--primary-color);
}

.user-dropdown button.danger:hover {
  background: var(--error-color);
}

/* Account Modal Styles */
.account-info {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--primary-color);
}

.info-group {
  margin-bottom: 15px;
}

.info-group label {
  display: block;
  color: var(--primary-color);
  margin-bottom: 5px;
  font-size: 0.9em;
}

.info-value {
  background: rgba(139, 92, 246, 0.05);
  padding: 10px 15px;
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  font-weight: 500;
}

.change-password-section h4 {
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
}

.form-hint {
  display: block;
  margin-top: 5px;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.6);
}

/* Danger Zone Styles */
.danger-zone {
  margin-top: 40px;
  padding: 20px;
  border: 2px solid var(--error-color);
  border-radius: 4px;
  background: rgba(244, 67, 54, 0.05);
}

.danger-zone h4 {
  color: var(--error-color);
  margin-bottom: 10px;
  font-size: 1em;
}

.danger-zone-description {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 15px;
  font-size: 0.85em;
  line-height: 1.5;
}

.danger-button {
  background: var(--error-color);
  border-color: var(--error-color);
  width: 100%;
}

.danger-button:hover {
  background: #d32f2f;
  border-color: #d32f2f;
}

/* Delete Account Modal */
.delete-account-modal {
  width: 90%;
  max-width: 500px;
  margin: 50px auto;
  position: relative;
}

.delete-account-modal .modal-content {
  padding: 30px;
}

.delete-account-content {
  text-align: center;
}

.warning-icon {
  font-size: 4em;
  margin: 20px 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.delete-warning-text {
  font-size: 1.1em;
  color: var(--error-color);
  margin: 20px 0;
  font-weight: bold;
  line-height: 1.6;
}

.delete-info-box {
  background: rgba(244, 67, 54, 0.1);
  border: 2px solid var(--error-color);
  border-radius: 4px;
  padding: 20px;
  margin: 20px 0;
  text-align: left;
}

.delete-info-box strong {
  color: var(--error-color);
  display: block;
  margin-bottom: 10px;
}

.delete-info-box ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
}

.delete-info-box li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(244, 67, 54, 0.2);
}

.delete-info-box li:last-child {
  border-bottom: none;
}

.delete-info-box li:before {
  content: "✗ ";
  color: var(--error-color);
  font-weight: bold;
  margin-right: 8px;
}

.delete-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.delete-actions button {
  flex: 1;
}

/* Auth Modal */
.auth-modal {
  width: 90%;
  max-width: 450px;
  margin: 50px auto;
  position: relative;
}

.auth-modal .modal-content {
  padding: 30px;
}

.auth-modal .modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  font-size: 1.2rem;
  font-family: Arial, sans-serif;
  line-height: 24px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.auth-modal .modal-close:hover {
  background: var(--error-color);
  border-color: var(--error-color);
  color: var(--text-primary);
  transform: scale(1.1);
}

.auth-modal h2,
.auth-modal h3 {
  color: var(--primary-color);
  margin-bottom: 25px;
  font-size: 1.5rem;
  text-align: center;
}

/* Auth Forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-group input {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 15px;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.form-group input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.form-hint {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-top: -5px;
}

/* Auth Links */
.auth-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  text-align: center;
  padding: 15px;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 4px;
}

.auth-links button {
  background: none;
  border: none;
  color: var(--primary-color);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  padding: 5px;
  transition: all 0.2s ease;
  position: relative;
}

.auth-links button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.2s ease;
}

.auth-links button:hover {
  color: var(--secondary-color);
}

.auth-links button:hover::after {
  width: 100%;
  background: var(--secondary-color);
}

/* Auth Messages */
.auth-message {
  padding: 12px 15px;
  margin-bottom: 20px;
  border: 2px solid;
  font-size: 0.85rem;
  text-align: center;
}

.auth-message.success {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--success-color);
  color: var(--success-color);
}

.auth-message.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error-color);
  color: var(--error-color);
}

/* Form Toggle */
.auth-form-container {
  display: none;
}

.auth-form-container.active {
  display: block;
}

/* Responsive Auth Styles */
@media (max-width: 768px) {
  .auth-modal {
    width: 95%;
    margin: 20px auto;
  }
  
  .auth-modal .modal-content {
    padding: 20px;
  }
  
  .user-dropdown {
    right: -10px;
  }
  
  /* Avatar section en móvil */
  .avatar-container {
    flex-direction: column;
    align-items: center;
  }
  
  .avatar-container .pixel-button {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Game Screenshots Gallery */
.game-screenshots {
  background: var(--bg-tertiary);
  padding: 20px;
  border-left: 4px solid var(--accent-color);
  margin-top: 20px;
  margin-bottom: 30px;
}

.game-screenshots .meta-label {
  margin-bottom: 15px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.screenshot-item {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 3px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-secondary);
}

.screenshot-item:hover {
  border-color: var(--primary-color);
  transform: scale(1.02);
  box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.screenshot-item:hover img {
  transform: scale(1.05);
}

/* Game Videos Section */
.game-videos {
  background: var(--bg-tertiary);
  padding: 20px;
  border-left: 4px solid var(--accent-color);
  margin-top: 20px;
  margin-bottom: 30px;
}

.game-videos .meta-label {
  margin-bottom: 15px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.video-item {
  position: relative;
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s ease;
}

.video-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.video-item iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

.video-title {
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-primary);
  margin: 0;
  border-top: 2px solid var(--border-color);
  text-align: center;
}

/* Screenshot Modal */
.screenshot-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
}

.screenshot-modal.active {
  display: block;
}

.screenshot-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.screenshot-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
}

.screenshot-modal-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 4px solid var(--border-color);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.screenshot-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.5rem;
  font-family: 'Press Start 2P', cursive;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.screenshot-modal-close:hover {
  background: var(--error-color);
  border-color: var(--error-color);
  color: #ffffff;
  transform: scale(1.1);
}

.screenshot-modal-prev,
.screenshot-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
  color: var(--text-primary);
  font-size: 2rem;
  font-family: 'Press Start 2P', cursive;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.screenshot-modal-prev {
  left: 20px;
}

.screenshot-modal-next {
  right: 20px;
}

.screenshot-modal-prev:hover,
.screenshot-modal-next:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.screenshot-modal-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 3px solid var(--border-color);
  padding: 10px 20px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  color: var(--text-primary);
  z-index: 10001;
}

/* Responsive Screenshots */
@media (max-width: 768px) {
  .screenshot-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .screenshot-modal-content {
    padding: 60px 20px;
  }

  .screenshot-modal-prev,
  .screenshot-modal-next {
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
  }

  .screenshot-modal-prev {
    left: 10px;
  }

  .screenshot-modal-next {
    right: 10px;
  }

  .screenshot-modal-close {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .screenshot-modal-counter {
    font-size: 0.6rem;
    padding: 8px 15px;
  }
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 4px solid var(--border-color);
  margin-top: 60px;
  padding: 40px 0 30px;
  font-family: var(--font-primary);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(
    45deg,
    #8b5cf6,
    #a78bfa,
    #06b6d4,
    #67e8f9,
    #8b5cf6
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gaming-gradient 4s ease-in-out infinite;
}

.footer-subtitle {
  font-size: 0.8rem;
  color: var(--accent-color);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-description {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.footer-tagline {
  font-size: 0.7rem;
  color: var(--primary-color);
  margin: 2px 0 0 0;
  line-height: 1.6;
  font-style: italic;
  opacity: 0.9;
}

.footer-support {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid var(--border-color);
}

.footer-support-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.75rem;
  color: var(--text-primary);
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.footer-support-description {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin: 0 0 15px 0;
  line-height: 1.6;
}

.kofi-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.7rem;
  cursor: pointer;
  text-align: left;
  padding: 4px 0;
  transition: all 0.2s ease;
  position: relative;
}

.footer-link::before {
  content: '▶';
  position: absolute;
  left: -15px;
  opacity: 0;
  transition: all 0.2s ease;
  color: var(--primary-color);
}

.footer-link:hover {
  color: var(--primary-color);
  padding-left: 15px;
}

.footer-link:hover::before {
  opacity: 1;
  left: 0;
}

.footer-text {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.footer-external-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease;
}

.footer-external-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.footer-copyright {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid var(--border-color);
  color: var(--text-tertiary);
}

.copyright-app-name {
  background: linear-gradient(
    45deg,
    #8b5cf6,
    #a78bfa,
    #06b6d4,
    #67e8f9,
    #8b5cf6
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gaming-gradient 4s ease-in-out infinite;
}

.copyright-link {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.copyright-link:hover {
  color: var(--primary-color);
}

/* AI Powered Text - Magical Golden Effect */
.ai-powered-text {
  background: linear-gradient(
    45deg,
    #d4af37,
    #f4e4c1,
    #d4af37,
    #f9f295,
    #d4af37
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: magical-shimmer 4s ease-in-out infinite;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
  position: relative;
  display: inline-block;
}

@keyframes magical-shimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Subtle glow effect on hover */
.ai-powered-text:hover {
  filter: brightness(1.2);
  cursor: default;
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer {
    margin-top: 40px;
    padding: 30px 0 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-section {
    text-align: center;
  }

  .footer-title {
    justify-content: center;
  }

  .footer-links {
    align-items: center;
  }

  .footer-link {
    text-align: center;
  }

  .footer-link::before {
    display: none;
  }

  .footer-link:hover {
    padding-left: 0;
  }
}

/* ============================================
   Game Tracking Styles
   ============================================ */

.game-tracking {
  margin-top: 30px;
}

.tracking-section {
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--border-color);
  border-radius: 8px;
}

.tracking-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 14px;
  color: var(--primary-color);
}

.tracking-title span:first-child {
  font-size: 20px;
}

/* Status Selector */
.status-selector {
  margin-top: 10px;
}

.pixel-select {
  width: 100%;
  padding: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.pixel-select:hover {
  border-color: var(--primary-color);
}

.pixel-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Play Time Summary */
.play-time-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
}

.total-hours {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 16px;
}

.hours-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.hours-value {
  font-family: 'Press Start 2P', cursive;
  font-size: 24px;
  color: var(--accent-color);
}

/* Session History */
.session-history {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid var(--border-color);
}

.session-history h4 {
  margin-bottom: 15px;
  font-size: 12px;
  color: var(--text-secondary);
}

.session-history-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.session-history-header:hover {
  color: var(--primary-color);
}

.toggle-icon {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.sessions-list.collapsed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.session-item {
  padding: 15px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 4px;
  transition: var(--transition);
}

.session-item:hover {
  border-color: var(--primary-color);
  transform: translateX(2px);
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
}

.session-date {
  color: var(--text-secondary);
}

.session-hours {
  color: var(--accent-color);
  font-weight: bold;
}

.session-notes {
  margin-bottom: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--primary-color);
  font-size: 13px;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.session-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.pixel-button-small {
  padding: 6px 12px;
  font-size: 11px;
}

.pixel-button-small.danger {
  background: var(--error-color);
  border-color: #dc2626;
}

.pixel-button-small.danger:hover {
  background: #dc2626;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.no-sessions {
  text-align: center;
  padding: 30px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Notes Editor */
.notes-editor {
  margin-top: 10px;
}

.pixel-textarea {
  width: 100%;
  padding: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  transition: var(--transition);
}

.pixel-textarea:hover {
  border-color: var(--primary-color);
}

.pixel-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.notes-editor button {
  margin-top: 10px;
}

/* Physical Condition Form */
.condition-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.condition-checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

@media (max-width: 600px) {
  .condition-checkboxes {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.condition-checkbox-item {
  display: flex;
  align-items: center;
}

.condition-checkbox-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  user-select: none;
}

.condition-checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.condition-select {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.condition-select label {
  font-size: 14px;
  color: var(--text-secondary);
}

.condition-notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.condition-notes label {
  font-size: 14px;
  color: var(--text-secondary);
}

.condition-form button {
  align-self: flex-start;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content h3 {
  margin-bottom: 20px;
  font-size: 16px;
  color: var(--primary-color);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.pixel-input {
  width: 100%;
  padding: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  transition: var(--transition);
}

.pixel-input:hover {
  border-color: var(--primary-color);
}

.pixel-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.modal-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 25px;
}

/* Responsive Tracking Sections */
@media (max-width: 768px) {
  .play-time-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .total-hours {
    justify-content: center;
  }

  .session-actions {
    flex-direction: column;
  }

  .pixel-button-small {
    width: 100%;
  }
}

/* Export Options */
.export-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}

.export-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  font-size: 14px;
  transition: var(--transition);
}

.export-option span:first-child {
  font-size: 24px;
}

.export-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Avatar Section */
.avatar-section {
  margin: 30px 0;
  padding: 20px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 4px;
}

.avatar-section h4 {
  font-size: 14px;
  color: var(--primary-color);
  margin-bottom: 15px;
  text-transform: uppercase;
}

.avatar-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border-color);
  background: var(--bg-secondary);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Avatar Crop Modal */
.avatar-crop-modal {
  max-width: 600px;
}

.avatar-crop-modal .modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  font-size: 1.2rem;
  font-family: Arial, sans-serif;
  line-height: 24px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.avatar-crop-modal .modal-close:hover {
  background: var(--error-color);
  border-color: var(--error-color);
  color: var(--text-primary);
  transform: scale(1.1);
}

.avatar-crop-content {
  margin-top: 20px;
}

.crop-container {
  max-width: 100%;
  max-height: 400px;
  margin: 20px 0;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.crop-container img {
  max-width: 100%;
  display: block;
}

.upload-placeholder {
  text-align: center;
  padding: 40px 20px;
  border: 2px dashed var(--border-color);
  border-radius: 4px;
  background: var(--bg-secondary);
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.upload-placeholder p {
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.crop-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

#cropActions {
  margin-top: 20px;
}

/* User Menu Avatar */
.user-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
