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

body {
  font-family: 'Arial', sans-serif;
  background: #1a1a2e;
  color: white;
  overflow-x: hidden;
}

.header {
  background: linear-gradient(135deg, #16213e, #0f3460);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

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

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #ff6b6b;
}

.search-bar {
  flex: 1;
  max-width: 400px;
  margin: 0 2rem;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 25px;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 1rem;
}

.search-bar input::placeholder {
  color: rgba(255,255,255,0.6);
}

.game-count {
  color: #ff6b6b;
  font-weight: bold;
}

.categories {
  background: #16213e;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.category-nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  padding: 0 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-btn {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s;
}

.category-btn.active,
.category-btn:hover {
  background: #ff6b6b;
  color: white;
  border-color: #ff6b6b;
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #ff6b6b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.games-section {
  margin-bottom: 3rem;
}

.games-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 1rem 0;
  scrollbar-width: thin;
  scrollbar-color: #ff6b6b #1a1a2e;
}

.games-scroll::-webkit-scrollbar {
  height: 8px;
}

.games-scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

.games-scroll::-webkit-scrollbar-thumb {
  background: #ff6b6b;
  border-radius: 4px;
}

.game-card {
  min-width: 200px;
  height: 280px;
  background: linear-gradient(135deg, #16213e, #0f3460);
  border-radius: 15px;
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.game-card.juiced {
  border: 2px solid #ffd700;
  background: linear-gradient(135deg, #2a1810, #3d2418);
}

.game-card.juiced:hover {
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.game-thumbnail {
  width: 100%;
  height: 140px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin-bottom: 1rem;
  position: relative;
}

.juiced-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ffd700;
  color: #000;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: bold;
}

.game-info h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: white;
}

.game-info p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
  flex: 1;
}

.game-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
}

.featured-game {
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
}

.close-featured {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0,0,0,0.3);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 10;
}

.close-featured:hover {
  background: rgba(0,0,0,0.6);
}

.featured-content {
  flex: 1;
}

.featured-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.featured-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.play-now-btn {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 2px solid white;
  padding: 1rem 2rem;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.play-now-btn:hover {
  background: white;
  color: #ff6b6b;
}

.featured-thumbnail {
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: rgba(255,255,255,0.7);
}

.ad-banner {
  background: linear-gradient(135deg, #16213e, #0f3460);
  border-radius: 10px;
  padding: 1rem;
  margin: 2rem 0;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ad-content {
  width: 100%;
  height: 100px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  position: relative;
}

.ad-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

.ad-placeholder {
  background: rgba(255,255,255,0.05);
  height: 100px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  border: 2px dashed rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    gap: 1rem;
  }
  
  .search-bar {
    margin: 0;
    max-width: 100%;
  }
  
  .featured-game {
    flex-direction: column;
    text-align: center;
  }
  
  .featured-thumbnail {
    width: 150px;
    height: 150px;
  }
  
  .game-card {
    min-width: 160px;
    height: 240px;
  }
}