/* Base Styles */
:root {
  --primary-color: #6a1b9a;
  --secondary-color: #9c27b0;
  --accent-color: #ff9800;
  --dark-bg: #1a1a2e;
  --darker-bg: #16213e;
  --text-color: #e6e6e6;
  --text-light: #ffffff;
  --text-dark: #333333;
  --card-bg: #2a2a3a;
  --card-hover: #3a3a4a;
  --success-color: #4caf50;
  --warning-color: #ff5722;
  --info-color: #2196f3;
}

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

body {
  font-family: 'Poppins', 'Comic Neue', sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Luckiest Guy', cursive;
  letter-spacing: 1px;
  color: var(--text-light);
}

h1 {
  font-size: 2.2rem;
  background: linear-gradient(to right, var(--accent-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
}

/* Header Styles */
.main-header {
  background: linear-gradient(135deg, var(--darker-bg), var(--primary-color));
  color: var(--text-light);
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 100;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.logo-container {
  text-align: center;
}

.tagline {
  font-family: 'Comic Neue', cursive;
  font-size: 1rem;
  color: var(--accent-color);
  margin-top: -0.5rem;
}

#player-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.auth-buttons {
  display: flex;
  gap: 0.5rem;
}

.auth-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.auth-btn i {
  font-size: 1rem;
}

.auth-btn:not(.primary) {
  background-color: transparent;
  color: var(--text-light);
  border: 2px solid var(--accent-color);
}

.auth-btn.primary {
  background-color: var(--accent-color);
  color: var(--text-dark);
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Category Navigation */
.category-nav {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.5rem 0;
  scrollbar-width: none; /* Firefox */
}

.category-nav::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.category-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 50px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.category-btn.active {
  background-color: var(--accent-color);
  color: var(--text-dark);
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
}

.category-btn:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--darker-bg));
  text-align: center;
  overflow: hidden;
  margin-bottom: 2rem;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.search-container {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#game-search {
  flex-grow: 1;
  padding: 0.8rem 1.2rem;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.9);
}

.search-btn {
  padding: 0 1.2rem;
  border: none;
  background-color: var(--accent-color);
  color: var(--text-dark);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-btn:hover {
  background-color: #ffab2d;
}

/* Cartoon Decorations */
.cartoon-cloud {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 1;
}

.cartoon-cloud:nth-child(1) {
  width: 100px;
  height: 60px;
  top: 20px;
  left: 10%;
  animation: float 8s infinite ease-in-out;
}

.cartoon-cloud:nth-child(2) {
  width: 150px;
  height: 90px;
  bottom: 30px;
  right: 15%;
  animation: float 10s infinite ease-in-out 2s;
}

.cartoon-star {
  position: absolute;
  width: 30px;
  height: 30px;
  background-color: var(--accent-color);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  top: 40%;
  right: 20%;
  animation: twinkle 3s infinite alternate;
  z-index: 1;
}

.cartoon-bubble {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(156, 39, 176, 0.2);
  z-index: -1;
}

.cartoon-bubble:nth-child(1) {
  width: 80px;
  height: 80px;
  bottom: -20px;
  left: 10%;
}

.cartoon-bubble:nth-child(2) {
  width: 120px;
  height: 120px;
  top: -40px;
  right: 5%;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes twinkle {
  0% {
    opacity: 0.6;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Games Grid */
.all-games {
  padding: 1rem;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
}

.section-title i {
  margin-right: 0.5rem;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.game-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  aspect-ratio: 1/1;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  background-color: var(--card-hover);
}

.game-card img {
  width: 100%;
  height: 70%;
  object-fit: cover;
  border-bottom: 2px solid var(--primary-color);
}

.game-info {
  padding: 0.8rem;
}

.game-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-category {
  font-size: 0.7rem;
  color: var(--accent-color);
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background-color: rgba(106, 27, 154, 0.2);
  border-radius: 50px;
}

/* Size Classes */
.size-small {
  grid-column: span 1;
}

.size-medium {
  grid-column: span 1;
}

.size-big {
  grid-column: span 2;
}

@media (min-width: 480px) {
  .size-medium {
    grid-column: span 1;
  }
}

@media (min-width: 768px) {
  .header-content {
    flex-direction: row;
    justify-content: space-between;
  }
  
  #player-info {
    flex-direction: row;
    align-items: center;
  }
  
  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  
  .size-medium {
    grid-column: span 1;
  }
  
  .size-big {
    grid-column: span 2;
  }
}

/* Footer Styles */
.main-footer {
  background: linear-gradient(135deg, var(--darker-bg), var(--primary-color));
  color: var(--text-light);
  padding: 2rem 1rem 1rem;
  margin-top: auto;
  position: relative;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-section {
  margin-bottom: 1rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--accent-color);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--text-light);
  font-size: 1.5rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  padding: 1rem 0;
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-decoration {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: linear-gradient(90deg, var(--accent-color), var(--secondary-color), var(--primary-color));
  opacity: 0.7;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Cookie Consent Banner Styles */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2c3e50;
  color: white;
  padding: 15px 20px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  display: none;
  font-family: 'Poppins', sans-serif;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.cookie-content p {
  margin: 0;
  flex: 1;
  min-width: 250px;
  font-size: 14px;
  line-height: 1.4;
}

.cookie-content a {
  color: #f1c40f;
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
}

.cookie-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.cookie-btn.accept {
  background: #f1c40f;
  color: #2c3e50;
}

.cookie-btn.reject {
  background: transparent;
  color: white;
  border: 1px solid white;
}

.cookie-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }
}


/* Floating Install Button */
.install-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 24px;
  background-color: #ff6600;
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

.install-btn:hover {
  background-color: #e65c00;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Responsive Button Adjustments */
@media (max-width: 768px) {
  .install-btn {
    bottom: 70px;
    right: 15px;
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Install Banner (Bottom Bar) */
.install-banner {
  display: none; /* Set to 'flex' via JavaScript to show */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ff6b00;
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  font-family: 'Poppins', sans-serif;
}

/* Buttons inside banner */
.banner-btn {
  padding: 8px 16px;
  margin-left: 10px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.3s ease;
}

/* Primary style for the main call-to-action button */
.banner-btn.primary {
  background: #000000;
  color: #ff6b00;
  font-weight: bold;
}

.banner-btn.primary:hover {
  background: #222;
}
