/* Base Styles and Reset */
:root {
  --primary: #101B2D;
  --primary-light: #1e3354;
  --primary-dark: #050d17;
  --accent-blue: #A0E9FF;
  --accent-blue-light: #c5f2ff;
  --accent-blue-dark: #7ddbff;
  --accent-gold: #F5C542;
  --accent-gold-light: #f7d670;
  --accent-gold-dark: #f3b714;
  --white: #FFFFFF;
  --light-gray: #F0F4F8;
  --medium-gray: #CFD8DC;
  --dark-gray: #546E7A;
  --black: #121212;
  
  --header-height: 160px;
  --header-height-mini: 120px;
  --footer-height: 300px;
  
  --font-heading: 'Cinzel Decorative', serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.2);
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--white);
  background-color: var(--primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--white);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-blue-light);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Background Elements */
.stars-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
  z-index: -2;
  overflow: hidden;
}

.stars-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, var(--white) 50%, transparent),
    radial-gradient(2px 2px at 40px 70px, var(--white) 50%, transparent),
    radial-gradient(3px 3px at 550px 150px, var(--white) 50%, transparent),
    radial-gradient(2px 2px at 200px 350px, var(--white) 50%, transparent),
    radial-gradient(2px 2px at 320px 360px, var(--white) 50%, transparent),
    radial-gradient(3px 3px at 360px 50px, var(--white) 50%, transparent),
    radial-gradient(3px 3px at 420px 280px, var(--white) 50%, transparent),
    radial-gradient(2px 2px at 280px 120px, var(--white) 50%, transparent),
    radial-gradient(2px 2px at 140px 200px, var(--white) 50%, transparent);
  background-repeat: repeat;
  background-size: 800px 800px;
  animation: stars-rotate 200s linear infinite;
  opacity: 0.5;
}

@keyframes stars-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.floating-clouds {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(70px 70px at 50px 160px, rgba(160, 233, 255, 0.2) 50%, transparent),
    radial-gradient(100px 100px at 150px 230px, rgba(160, 233, 255, 0.15) 50%, transparent),
    radial-gradient(150px 150px at 300px 350px, rgba(160, 233, 255, 0.1) 50%, transparent),
    radial-gradient(80px 80px at 450px 50px, rgba(160, 233, 255, 0.2) 50%, transparent),
    radial-gradient(120px 120px at 650px 200px, rgba(160, 233, 255, 0.15) 50%, transparent);
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  animation: clouds-float 30s ease-in-out infinite alternate;
}

@keyframes clouds-float {
  0% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-20px) translateX(10px);
  }
  100% {
    transform: translateY(0) translateX(-10px);
  }
}

/* Header & Navigation */
.celestial-header {
  height: var(--header-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  z-index: 10;
  transition: height var(--transition-normal), background-color var(--transition-normal);
}

.celestial-header.mini {
  height: var(--header-height-mini);
}

.logo-orb {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--primary-light) 0%, var(--primary) 70%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(160, 233, 255, 0.4);
  position: relative;
  margin-bottom: 1rem;
  transition: all var(--transition-normal);
}

.logo-orb::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: transparent;
  border-radius: 50%;
  border: 2px solid var(--accent-blue);
  opacity: 0.5;
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.3;
  }
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

.logo-orb img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.celestial-header.mini .logo-orb {
  width: 80px;
  height: 80px;
}

.celestial-header.mini .logo-orb img {
  width: 50px;
  height: 50px;
}

.curved-nav {
  position: relative;
  width: 100%;
  max-width: 800px;
}

.curved-nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 1rem;
  position: relative;
}

.curved-nav ul::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 100%;
  background-color: rgba(16, 27, 45, 0.7);
  border-radius: 40px;
  backdrop-filter: blur(5px);
  z-index: -1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-link {
  color: var(--white);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-gold);
  transition: width var(--transition-normal);
}

.nav-link:hover {
  color: var(--accent-gold-light);
}

.nav-link:hover::after {
  width: 100%;
}

/* Buttons */
.btn-arcade {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%);
  color: var(--primary);
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 15px rgba(245, 197, 66, 0.4);
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1rem;
  z-index: 1;
}

.btn-arcade::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.7s;
  z-index: -1;
}

.btn-arcade:hover {
  box-shadow: 0 6px 20px rgba(245, 197, 66, 0.6);
  transform: translateY(-2px);
  color: var(--primary-dark);
}

.btn-arcade:hover::before {
  left: 100%;
}

.btn-play {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-dark) 100%);
  color: var(--primary);
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-normal);
  box-shadow: 0 2px 10px rgba(160, 233, 255, 0.4);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-play:hover {
  box-shadow: 0 4px 15px rgba(160, 233, 255, 0.6);
  transform: translateY(-2px);
  color: var(--primary-dark);
}

.btn-submit {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%);
  color: var(--primary);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 15px rgba(245, 197, 66, 0.4);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  width: 100%;
}

.btn-submit:hover {
  box-shadow: 0 6px 20px rgba(245, 197, 66, 0.6);
  transform: translateY(-2px);
  color: var(--primary-dark);
}

.btn-all-games, .btn-return {
  display: inline-block;
  background: rgba(16, 27, 45, 0.6);
  color: var(--accent-blue);
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-normal);
  border: 1px solid var(--accent-blue);
  cursor: pointer;
  font-size: 0.9rem;
  backdrop-filter: blur(5px);
}

.btn-all-games:hover, .btn-return:hover {
  background: rgba(16, 27, 45, 0.8);
  border-color: var(--accent-blue-light);
  transform: translateY(-2px);
}

/* Dividers */
.divider-wave {
  position: relative;
  height: 80px;
  width: 100%;
  margin-top: -1px;
}

.divider-wave svg {
  position: absolute;
  width: 100%;
  height: 100%;
  fill: var(--primary-light);
}

.divider-wave.reverse {
  transform: rotate(180deg);
}

/* Footer */
footer {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: 4rem 2rem 2rem;
  position: relative;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo img {
  width: 60px;
  height: 60px;
}

.footer-logo p {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
}

.link-group h4 {
  color: var(--accent-gold);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.link-group ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.link-group a {
  color: var(--light-gray);
  transition: color var(--transition-fast);
  font-size: 0.9rem;
}

.link-group a:hover {
  color: var(--accent-blue);
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  .curved-nav ul {
    gap: 1rem;
    flex-wrap: wrap;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
    gap: 2rem;
  }
  
  .link-group {
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .celestial-header {
    height: auto;
    padding: 1rem 0.5rem;
  }
  
  .logo-orb {
    width: 80px;
    height: 80px;
    margin-bottom: 0.5rem;
  }
  
  .logo-orb img {
    width: 50px;
    height: 50px;
  }
  
  .curved-nav ul::before {
    left: 2%;
    right: 2%;
    border-radius: 20px;
  }
  
  .nav-link {
    font-size: 0.8rem;
  }
  
  .btn-arcade {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* Loading Animation */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(160, 233, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-blue);
  animation: spin 1s ease-in-out infinite;
  margin: 1rem auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}