:root {
  /* Brand Colors */
  --color-primary: red;
  --color-secondary: darkorange;
  --color-tertiary: orange;
  --color-dark: black;
  --color-light: white;
  --color-action: coral;
  
  /* Transparent Overlays */
  --overlay-light: rgba(255, 255, 255, 0.75);
  --overlay-dark: rgba(0, 0, 0, 0.95);
  --overlay-medium: rgba(0, 0, 0, 0.4);
  --overlay-text: rgba(255, 255, 255, 0.9);
  
  /* Shadows */
  --shadow-dark: rgba(0, 0, 0, 0.5);
  --shadow-text: rgba(0, 0, 0, 0.3);
  
  /* Hamburger */
  --hamburger-color: rgba(0, 0, 0, 1);
  
  /* Grain Texture */
  --grain-overlay: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-light);
  overflow-x: hidden;
}

/* Page Gradients */
.home-page {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-tertiary) 100%);
  min-height: 100vh;
}

.games-page {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-tertiary) 50%, var(--color-primary) 100%);
  min-height: 100vh;
}

.about-page {
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-primary) 50%, var(--color-secondary) 100%);
  min-height: 100vh;
}

/* Grain Texture Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--grain-overlay);
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

/* Navigation */
.navbar {
  padding: 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--overlay-light);
  backdrop-filter: blur(0.625rem);
  z-index: 1000;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
}

.nav-brand {
  display: flex;
  align-items: center;
  flex-grow: 1;
}

.nav-brand span {
  color: var(--color-primary);
  font-size: 1.75rem;
  font-weight: bold;
  letter-spacing: -0.03125rem;
  flex-grow: 1;
  text-align: center;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-logo {
  height: 3.5rem;
  width: auto;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger span {
  width: 1.5625rem;
  height: 0.1875rem;
  background: var(--color-secondary);
  transition: all 0.3s ease;
  border-radius: 0.125rem;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(0.3125rem, 0.3125rem);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(0.4375rem, -0.4375rem);
}

.nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 18.75rem;
  height: 100vh;
  background: var(--overlay-dark);
  display: flex;
  flex-direction: column;
  padding: 5rem 2rem 2rem;
  gap: 2rem;
  transition: right 0.3s ease;
  backdrop-filter: blur(0.625rem);
}

.nav-menu.active {
  right: 0;
}

.nav-menu a {
  color: var(--color-light);
  text-decoration: none;
  font-size: 1.75rem;
  font-weight: 600;
  transition: color 0.3s ease;
  opacity: 0;
  transform: translateX(3rem);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.nav-menu.active a {
  opacity: 1;
  transform: translateX(0);
}

.nav-menu.active a:nth-child(1) {
  transition-delay: 0.1s;
}

.nav-menu.active a:nth-child(2) {
  transition-delay: 0.2s;
}

.nav-menu.active a:nth-child(3) {
  transition-delay: 0.3s;
}

.nav-menu a:hover {
  color: var(--color-tertiary);
}

/* Hero Section */
.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 0 2rem;
  max-width: 40rem;
  margin: 0 auto;
}

.hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 1.25rem 3.75rem var(--shadow-dark);
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Content Section */
.content {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.5rem 4rem;
  gap: 2rem;
  max-width: 40rem;
  margin: 0 auto;
}

.content h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  line-height: 1.2;
  font-weight: 900;
  text-shadow: 0.125rem 0.125rem 0.5rem var(--shadow-text);
}

.description {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  line-height: 1.6;
  text-shadow: 0.0625rem 0.0625rem 0.25rem var(--shadow-text);
}

/* Scroll Animations */
.slide-left,
.slide-right {
  opacity: 0;
  transition: all 0.8s ease;
}

.slide-left {
  transform: translateX(-6.25rem);
}

.slide-right {
  transform: translateX(6.25rem);
}

.slide-left.visible,
.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Page Content */
.page-content {
  min-height: 100vh;
  padding: 8rem 1.5rem 4rem;
  max-width: 40rem;
  margin: 0 auto;
}

.page-content h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  margin-bottom: 3rem;
  text-align: center;
  text-shadow: 0.125rem 0.125rem 0.5rem var(--shadow-text);
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Games Grid */
.games-grid {
  display: grid;
  gap: 2rem;
  max-width: 40rem;
  margin: 0 auto;
}

.game-card {
  background: var(--overlay-medium);
  backdrop-filter: blur(0.625rem);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: scale(0.9);
  animation: fadeInScale 0.6s ease forwards;
  box-shadow: 0 0.5rem 1.5rem var(--shadow-dark);
}

@keyframes fadeInScale {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.game-card:nth-child(1) {
  animation-delay: 0.1s;
}

.game-card:nth-child(2) {
  animation-delay: 0.2s;
}

.game-card:nth-child(3) {
  animation-delay: 0.3s;
}

.game-card:nth-child(4) {
  animation-delay: 0.4s;
}

.game-card:hover {
  transform: translateY(-0.625rem) scale(1);
  box-shadow: 0 1.5rem 3rem var(--shadow-dark);
}

.game-card img {
  width: 100%;
  height: auto;
  display: block;
}

.game-card h2 {
  font-size: 1.75rem;
  margin: 1.5rem 1.5rem 0.75rem;
  color: var(--color-light);
  text-shadow: 0.125rem 0.125rem 0.5rem var(--shadow-text);
}

.game-card p {
  font-size: 1.25rem;
  margin: 0 1.5rem 1.5rem;
  color: var(--overlay-text);
  text-shadow: 0.0625rem 0.0625rem 0.25rem var(--shadow-text);
}

/* About Content */
.about-content {
  max-width: 40rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.large-text {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  line-height: 1.8;
  text-shadow: 0.0625rem 0.0625rem 0.25rem var(--shadow-text);
}

/* Tablet and Desktop */
@media (min-width: 44rem) {
  .hamburger {
    display: none;
  }
  
  .nav-menu {
    position: static;
    width: auto;
    height: auto;
    background: none;
    backdrop-filter: none;
    flex-direction: row;
    padding: 0;
    gap: 2rem;
  }
  
  .nav-menu a {
    font-size: 1.125rem;
    color: var(--color-dark);
    opacity: 1;
    transform: translateX(0);
  }
  
  .nav-menu a:hover {
    color: var(--color-primary);
  }
  
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero {
    padding: 8rem 1.5rem 3rem;
  }
  
  .hero-card {
    border-radius: 1rem !important;
  }
  
  .content {
    padding: 3rem 1.5rem 4rem;
  }
}

/* Footer */
.footer {
  padding: 1.5rem;
  background: var(--overlay-light);
  backdrop-filter: blur(0.625rem);
  position: relative;
  bottom: 0;
  left: 0;
  right: 0;
}

.footer-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  max-width: 40rem;
  margin: 0 auto;
}

.footer p {
  margin: 0;
  color: var(--color-dark);
  font-size: 0.875rem;
}

.footer a {
  color: var(--color-dark);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--color-primary);
}

@media (min-width: 44rem) {
  .footer-container {
    flex-direction: row;
    gap: 2rem;
  }
}

/* Download Button */
.download-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--color-action);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0.5rem 1.5rem var(--shadow-dark);
  border: 2px solid white;
}

.download-button::before {
  content: '🎮';
  font-size: 2.5rem;
  line-height: 1;
}

.download-button:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 0.75rem 2rem var(--shadow-dark);
}

.button-container {
  text-align: center;
  margin-top: 2rem;
}

.content-image {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1.5rem var(--shadow-dark);
  margin: 1rem 0;
}

.about-image {
  max-width: 100%;
  height: auto;
  margin-top: 2rem;
  border-radius: 1rem;
}

/* Hero Card */
.hero-card {
  width: 100%;
  display: block;
  background-image: url('assets/solar-hero-background.png');
  background-size: cover;
  background-position: center;
  border-radius: 0;
  box-shadow: 0 1.25rem 3.75rem var(--shadow-dark);
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-card:hover {
  transform: translateY(-0.3125rem);
  box-shadow: 0 1.5rem 4rem var(--shadow-dark);
}

.hero-card-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  min-height: 18rem;
}

.hero-card-text {
  flex: 1;
}

.hero-card-text h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: white;
  margin: 0 0 0.5rem 0;
  font-weight: bold;
}

.hero-card-text p {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  color: white;
  margin: 0;
}

.hero-card-icon {
  width: clamp(7.5rem, 30vw, 12rem);
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1.5rem var(--shadow-dark);
}

/* Hero Card with Store Buttons */
.hero-card-with-buttons {
  cursor: default;
}

.hero-card-with-buttons:hover {
  transform: none;
  box-shadow: 0 1.25rem 3.75rem var(--shadow-dark);
}

.hero-card-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem 1.5rem 1rem;
  flex-wrap: nowrap;
}

.hero-card-buttons a {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.store-badge {
  height: 3rem;
  width: auto;
  transition: transform 0.2s ease;
}

.store-badge-google {
  height: 4.5rem;
}

.store-badge:hover {
  transform: scale(1.05);
}

@media (min-width: 44rem) {
  .hero-card-buttons {
    gap: 1rem;
    padding: 0 2rem 2rem 2rem;
  }
  
  .store-badge {
    height: 3.75rem;
  }
  
  .store-badge-google {
    height: 5.625rem;
  }
}

/* Heading Font */
h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.nav-brand span {
  letter-spacing: 0.0625rem;
}
