@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #140a1f;
  --bg-secondary: #1f0f2e;
  
  --candy-pink: #ff4da6;
  --candy-purple: #a855f7;
  --sweet-orange: #fb923c;
  --neon-lime: #84cc16;
  --choco-gold: #fbbf24;
  
  --text-primary: #fff7fb;
  --text-secondary: #e9d5ff;
  --text-muted: #c4b5fd;
  
  --grad-candy-pop: linear-gradient(135deg, #ff4da6, #a855f7);
  --grad-sweet-burst: linear-gradient(135deg, #fb923c, #ff4da6);
  --grad-neon-sugar: linear-gradient(135deg, #a855f7, #84cc16);
  --grad-golden-treat: linear-gradient(135deg, #fbbf24, #fb923c);
  
  --glow-pink: rgba(255, 77, 166, 0.45);
  --glow-purple: rgba(168, 85, 247, 0.45);
  --glow-lime: rgba(132, 204, 22, 0.35);
  
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-blur: blur(18px);
  --border-radius: 20px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Quicksand', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: radial-gradient(circle at top left, var(--bg-secondary), transparent 60%),
                    radial-gradient(circle at bottom right, #2a1142, transparent 60%);
  background-attachment: fixed;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

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

/* 
  IMPROVED CONTAINER LAYOUT 
  Using percentage-based padding guarantees the content never touches the screen edges/corners on any device.
*/
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 5%;
}

@media (max-width: 768px) {
  .container {
    padding: 0 6%;
  }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  background: var(--grad-candy-pop);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(255, 77, 166, 0.3);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  background: var(--grad-sweet-burst);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h3 {
  font-size: 1.5rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Glassmorphism */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass-card {
  padding: 2.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 77, 166, 0.4);
  box-shadow: 0 15px 40px var(--glow-pink);
}

@media (max-width: 768px) {
  .glass-card {
    padding: 1.5rem; /* Better scaling on mobile */
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: var(--grad-candy-pop);
  color: #fff;
  box-shadow: 0 0 15px var(--glow-pink);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px var(--glow-purple);
}

.btn-primary:active {
  transform: scale(0.95);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: background 0.3s ease;
}

header.scrolled {
  background: rgba(20, 10, 31, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 77, 166, 0.2);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--grad-candy-pop);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-menu a {
  font-weight: 600;
  position: relative;
  padding: 0.5rem 0;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--grad-candy-pop);
  transition: width 0.3s ease;
}

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

.nav-menu a:hover {
  color: var(--candy-pink);
  text-shadow: 0 0 8px var(--glow-pink);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 5rem 2rem;
    transition: right 0.3s ease;
    border-left: 1px solid rgba(255, 77, 166, 0.2);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  }

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

  .hamburger {
    display: block;
    z-index: 1001;
  }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: url('images/fantasy-candy-land-hero-bg.jpg') center/cover no-repeat;
  animation: zoomBg 20s infinite alternate;
  opacity: 0.4;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(to bottom, transparent, var(--bg-primary));
}

.hero-content {
  text-align: center;
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.legal-disclaimer {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.5rem 1rem;
  background: rgba(0,0,0,0.4);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.1);
}

/* Floating Candies Animation */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.candy-shape {
  position: absolute;
  background: var(--grad-candy-pop);
  border-radius: 50%;
  opacity: 0.6;
  filter: blur(5px);
  animation: float 6s infinite ease-in-out alternate;
}

.candy-1 { width: 50px; height: 50px; top: 20%; left: 10%; animation-delay: 0s; background: var(--grad-candy-pop); }
.candy-2 { width: 80px; height: 80px; top: 60%; right: 15%; animation-delay: 1s; background: var(--grad-neon-sugar); }
.candy-3 { width: 40px; height: 40px; top: 80%; left: 20%; animation-delay: 2s; background: var(--grad-sweet-burst); }

/* Game Section */
.game-section {
  padding: 6rem 0;
  position: relative;
}

.game-container {
  max-width: 1000px;
  margin: 3rem auto 0;
  border: 2px solid var(--candy-purple);
  box-shadow: 0 0 30px var(--glow-purple);
  border-radius: 24px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.5);
  position: relative;
}

.game-container::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: var(--grad-neon-sugar);
  z-index: -1;
  border-radius: 26px;
  animation: borderGlow 3s infinite alternate;
}

.game-iframe-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  border-radius: 16px;
  overflow: hidden;
}

.game-iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

/* Features Section */
.features-section {
  padding: 6rem 0 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  background: var(--grad-golden-treat);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* SEO Content & FAQ Section */
.seo-section {
  padding: 2rem 0 6rem;
}

.faq-section {
  margin-top: 3rem;
}

.faq-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 77, 166, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, background 0.3s ease;
}

.faq-item:hover {
  transform: translateX(5px);
  border-color: var(--candy-pink);
  background: rgba(255, 77, 166, 0.05);
}

.faq-item h3 {
  color: var(--candy-pink);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.faq-item p {
  margin-bottom: 0;
}

/* Inner Pages (About, Contact, Legal) */
.page-header {
  padding: 10rem 0 4rem;
  text-align: center;
  position: relative;
}

.page-content {
  padding: 2rem 0 6rem;
}

.content-card {
  max-width: 900px;
  margin: 0 auto;
}

.content-img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 2rem;
}

/* Contact Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--candy-pink);
  box-shadow: 0 0 10px var(--glow-pink);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* Footer */
footer {
  background: rgba(10, 5, 15, 0.95);
  border-top: 1px solid rgba(255, 77, 166, 0.2);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--candy-pink);
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a:hover {
  color: var(--sweet-orange);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.social-disclaimer {
  margin-top: 1rem;
  color: #ef4444;
  font-weight: 600;
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-20px) scale(1.1); }
}

@keyframes zoomBg {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

@keyframes borderGlow {
  0% { opacity: 0.5; filter: blur(5px); }
  100% { opacity: 1; filter: blur(15px); }
}

.fade-in {
  animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}