/* Rule34dle Game Styles */

.game-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  min-height: 500px;
  width: 100%;
}

#game-container {
  padding: 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* Game Header */
.game-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.game-modes {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mode-btn {
  background: var(--bg-gray);
  border: 2px solid transparent;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-light);
}

.mode-btn:hover {
  background: var(--bg-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

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

.game-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 0;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
}

#daily-progress {
  font-weight: 600;
  color: var(--secondary-color);
  margin-top: 0.5rem;
}

/* Game Controls */
.game-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filters label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-light);
  cursor: pointer;
}

.filters input[type="checkbox"] {
  margin: 0;
}

.btn-new-game {
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-new-game:hover {
  background: #0891b2;
  transform: translateY(-1px);
}

/* VS Section */
.vs-section {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
}

.character-section {
  display: flex;
  justify-content: center;
}

.vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 50%;
  font-weight: bold;
  font-size: 1.25rem;
  box-shadow: var(--shadow);
  z-index: 2;
}

/* Character Cards */
.character-card {
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  max-width: 280px;
  width: 100%;
  box-shadow: var(--shadow);
}

.character-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.character-image {
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
}

.character-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-info h3 {
  margin: 0 0 0.5rem;
  color: var(--text-dark);
  font-size: 1.125rem;
  font-weight: 600;
}

.character-source {
  color: var(--text-light);
  font-size: 0.875rem;
  margin: 0 0 0.5rem;
}

.post-count {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* Result Section */
.result-section {
  text-align: center;
  margin: 2rem 0;
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.result-correct {
  background: #dcfce7;
  color: #166534;
  border: 2px solid #22c55e;
  border-radius: 0.5rem;
  padding: 1rem;
}

.result-incorrect {
  background: #fef2f2;
  color: #dc2626;
  border: 2px solid #ef4444;
  border-radius: 0.5rem;
  padding: 1rem;
}

.result-daily-complete {
  background: #f0f9ff;
  color: #0369a1;
  border: 2px solid #3b82f6;
  border-radius: 0.5rem;
  padding: 1rem;
}

.result-error {
  background: #fef3c7;
  color: #92400e;
  border: 2px solid #f59e0b;
  border-radius: 0.5rem;
  padding: 1rem;
}

.result-section h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.result-section p {
  margin: 0.25rem 0;
}

/* Instructions */
.instructions {
  text-align: center;
  color: var(--text-light);
  font-size: 0.875rem;
  margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  #game-container {
    padding: 1rem;
  }
  
  .vs-section {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }
  
  .vs-divider {
    width: 50px;
    height: 50px;
    font-size: 1rem;
    margin: 0 auto;
  }
  
  .character-card {
    max-width: 100%;
  }
  
  .character-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
  }
  
  .game-stats {
    gap: 1rem;
  }
  
  .game-controls {
    flex-direction: column;
    text-align: center;
  }
  
  .filters {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .character-card {
    padding: 1rem;
  }
  
  .character-image {
    width: 80px;
    height: 80px;
    border-radius: 6px;
  }
  
  .character-info h3 {
    font-size: 1rem;
  }
  
  .game-modes {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .mode-btn {
    padding: 0.5rem 1rem;
  }
  
  .game-stats {
    flex-direction: row;
    gap: 1rem;
  }
}

/* Loading Animation */
.game-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
  color: var(--text-light);
}

.loading-text {
  font-size: 1.125rem;
}

/* Accessibility */
.character-card:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .character-card {
    transition: none;
  }
  
  .character-card:hover {
    transform: none;
  }
}