/* Games Page Styles - Optimized for Performance */

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', sans-serif;
  background: #f5f7fa;
  color: #333;
}

.navbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #667eea;
}

.page-header p {
  font-size: 1.1rem;
  color: #666;
}

.search-section {
  max-width: 800px;
  margin: 0 auto 60px;
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.search-method {
  margin-bottom: 40px;
}

.search-method h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #667eea;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.search-box input {
  flex: 1;
  padding: 15px 20px;
  font-size: 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 50px;
  outline: none;
}

.search-box input:focus {
  border-color: #667eea;
}

.search-btn {
  padding: 15px 30px;
  font-size: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s;
}

.search-btn:hover {
  transform: translateY(-2px);
}

.search-hint {
  font-size: 0.9rem;
  color: #999;
  margin-top: 10px;
}

.divider {
  text-align: center;
  margin: 40px 0;
  color: #999;
  font-size: 0.9rem;
}

.games-category {
  margin-bottom: 50px;
}

.games-category h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #333;
  padding-bottom: 10px;
  border-bottom: 3px solid #667eea;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.game-item {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: all 0.3s;
  text-decoration: none;
  color: #333;
  display: block;
}

.game-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.game-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #667eea;
}

.game-item .english-name {
  font-size: 0.9rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.game-item .meta {
  font-size: 0.85rem;
  color: #666;
}

.footer {
  background: #2c3e50;
  color: white;
  padding: 40px 20px;
  text-align: center;
  margin-top: 60px;
}

.info-box {
  background: #e8f5e9;
  border-left: 4px solid #4caf50;
  padding: 15px 20px;
  border-radius: 8px;
  margin-top: 20px;
}

.info-box h3 {
  color: #2e7d32;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.info-box ul {
  list-style: none;
  padding-left: 0;
}

.info-box li {
  padding: 5px 0;
  color: #555;
}

.info-box li:before {
  content: "✓ ";
  color: #4caf50;
  font-weight: bold;
  margin-right: 5px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  background: #667eea;
  color: white;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 10px;
}

.games-list-section {
  margin-top: 60px;
}

.games-list-section h2 {
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: #333;
  padding-bottom: 10px;
  border-bottom: 3px solid #667eea;
}

.games-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 40px;
}

.game-link {
  padding: 12px 15px;
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  text-decoration: none;
  color: #667eea;
  transition: all 0.2s;
  font-size: 0.95rem;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-link:hover {
  background: #667eea;
  color: white;
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding: 20px;
}

.page-btn {
  padding: 10px 15px;
  background: white;
  border: 2px solid #667eea;
  color: #667eea;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
}

.page-btn:hover {
  background: #667eea;
  color: white;
}

.page-btn.active {
  background: #667eea;
  color: white;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  color: #666;
  font-size: 0.95rem;
  padding: 0 10px;
}

/* Loading Skeleton Animation */
@keyframes shimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}

.skeleton {
  animation: shimmer 1.2s ease-in-out infinite;
  background: linear-gradient(to right, #f0f0f0 8%, #f8f8f8 18%, #f0f0f0 33%);
  background-size: 800px 104px;
  height: 50px;
  border-radius: 8px;
  margin-bottom: 10px;
}



