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

:root {
  --primary: #8A2BE2;
  --secondary: #FF3366;
  --accent: #00F0FF;
  --dark: #050505;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #FFFFFF;
  --text-muted: #A0A0B0;
  --glow-primary: rgba(138, 43, 226, 0.5);
  --glow-secondary: rgba(255, 51, 102, 0.5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--dark);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
  /* Dynamic animated background mesh */
  background-image: 
    radial-gradient(at 0% 0%, rgba(138,43,226,0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(255,51,102,0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0,240,255,0.1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(138,43,226,0.1) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Background Animated Blobs */
.bg-blobs {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.4;
  animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.blob-1 { width: 60vw; height: 60vw; background: var(--primary); top: -20%; left: -10%; animation-delay: 0s; }
.blob-2 { width: 50vw; height: 50vw; background: var(--secondary); bottom: -10%; right: -20%; animation-delay: -5s; }
.blob-3 { width: 40vw; height: 40vw; background: var(--accent); top: 30%; left: 40%; animation-delay: -10s; opacity: 0.2; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 10%) scale(1.1); }
  100% { transform: translate(-5%, -5%) scale(0.9); }
}

/* Floating emojis */
.floating-emoji {
  position: absolute; pointer-events: none; opacity: 0.8;
  animation: emojiFloat 4s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}
@keyframes emojiFloat {
  0% { transform: translateY(0) rotate(-10deg) scale(1); }
  100% { transform: translateY(-40px) rotate(10deg) scale(1.1); }
}

/* Confetti & Popup */
.confetti-piece {
  position: fixed; top: -20px; z-index: 9999; opacity: 0;
  animation: confettiFall 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}
.smile-popup {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0);
  font-size: 8rem; z-index: 10000; pointer-events: none;
  animation: smilePop 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  filter: drop-shadow(0 0 30px rgba(255,217,61,0.5));
}
@keyframes smilePop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  80% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* Navbar */
nav {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 100;
  background: rgba(10, 10, 15, 0.6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border); border-radius: 100px;
  padding: 12px 32px; display: flex; justify-content: space-between; align-items: center;
  width: 90%; max-width: 1200px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}
nav.scrolled {
  top: 10px; width: 95%; background: rgba(5, 5, 10, 0.8);
  border-color: rgba(255,255,255,0.15); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.8);
}
.nav-logo {
  font-weight: 900; font-size: 1.5rem; letter-spacing: -0.5px;
  background: linear-gradient(to right, #FFF, #A0A0B0); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-decoration: none; cursor: pointer; transition: transform 0.3s ease;
}
.nav-logo:hover { transform: scale(1.05); }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 1rem;
  transition: all 0.3s ease; position: relative; padding: 5px 0;
}
/* Removed underline effect, added a glow text effect on hover */
.nav-links a:hover { color: var(--text-main); text-shadow: 0 0 10px rgba(255,255,255,0.5); }

/* Typography & Utilities */
.gradient {
  background: linear-gradient(135deg, var(--accent), var(--primary), var(--secondary));
  background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: gradientShine 5s linear infinite;
}
@keyframes gradientShine { to { background-position: 200% center; } }
.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; margin-bottom: 50px; text-align: center; letter-spacing: -1px;
}

/* Hero Section */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 160px 24px 80px; position: relative; z-index: 1;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--card-border); border-radius: 100px;
  padding: 10px 24px; font-size: 1rem; font-weight: 600; color: var(--text-main); margin-bottom: 30px;
  backdrop-filter: blur(10px); box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  animation: slideDown 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}
.hero-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: #00FF66; box-shadow: 0 0 10px #00FF66; animation: pulseDot 2s infinite; }
@keyframes pulseDot { 0%,100%{transform:scale(1);opacity:1;} 50%{transform:scale(1.5);opacity:0.5;} }
@keyframes slideDown { from { opacity:0; transform:translateY(-30px); } to { opacity:1; transform:translateY(0); } }

.hero h1 {
  font-size: clamp(3.5rem, 10vw, 7rem); font-weight: 900; line-height: 1.05; margin-bottom: 24px; letter-spacing: -2px;
  animation: slideUp 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s backwards;
}
.hero p {
  font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--text-muted); max-width: 600px; margin-bottom: 40px; font-weight: 400; line-height: 1.6;
  animation: slideUp 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.4s backwards;
}

/* Buttons */
.hero-buttons { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; animation: slideUp 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.6s backwards; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 36px; border-radius: 100px;
  font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.1rem; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); border: none; text-decoration: none;
  position: relative; overflow: hidden;
}
.btn-primary {
  background: linear-gradient(45deg, var(--primary), var(--secondary)); color: #fff;
  box-shadow: 0 10px 30px var(--glow-primary);
}
.btn-primary::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.5s ease;
}
.btn-primary:hover {
  transform: translateY(-5px) scale(1.02); box-shadow: 0 15px 40px var(--glow-secondary);
}
.btn-primary:hover::before { left: 100%; }

.btn-outline {
  background: rgba(255,255,255,0.05); color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(10px);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1); border-color: #fff;
  transform: translateY(-5px); box-shadow: 0 10px 30px rgba(255,255,255,0.1);
}

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

/* About Section */
.about { padding: 120px 24px; max-width: 1000px; margin: 0 auto; position: relative; z-index: 1; }
.about-card {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 30px;
  padding: 60px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3); position: relative; overflow: hidden;
}
.about-card::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
}
.about-card:hover {
  transform: translateY(-10px) scale(1.01); border-color: rgba(255,255,255,0.2);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 40px var(--glow-primary);
}
.about-card:hover::before { opacity: 1; }
.about-card p { font-size: 1.3rem; line-height: 1.8; color: var(--text-muted); font-weight: 300; }
.about-card p strong { color: var(--text-main); font-weight: 700; }

/* Game Section */
.game-section { padding: 120px 24px; text-align: center; position: relative; z-index: 1; }
.game-container {
  max-width: 600px; margin: 40px auto 0;
  background: rgba(10,10,15,0.8); border: 1px solid var(--card-border);
  border-radius: 30px; padding: 30px; backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,240,255,0.05);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.game-container:hover { border-color: rgba(0,240,255,0.3); transform: translateY(-5px); }
#gameCanvas {
  display: block; margin: 0 auto; border-radius: 16px;
  background: #050505; cursor: none; width: 100%; box-shadow: inset 0 0 30px rgba(0,0,0,0.8);
}
.game-score { font-size: 1.5rem; color: var(--accent); font-weight: 800; margin-top: 20px; letter-spacing: 1px; }
.game-instructions { color: var(--text-muted); font-size: 1rem; margin-top: 10px; font-weight: 500; }

/* Contact Section */
.contact { padding: 120px 24px 160px; text-align: center; position: relative; z-index: 1; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 1000px; margin: 50px auto 0; }
.contact-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 24px; padding: 40px 24px; text-decoration: none; color: var(--text-main);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden; backdrop-filter: blur(10px);
}
.contact-card::after {
  content: ''; position: absolute; inset: 0; border-radius: 24px; padding: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: 0.5; transition: opacity 0.3s;
}
.contact-card:hover {
  transform: translateY(-10px); background: rgba(255,255,255,0.08);
}
.contact-card:hover::after { opacity: 1; background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.contact-card svg { width: 48px; height: 48px; margin-bottom: 20px; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.contact-card:hover svg { transform: scale(1.2) rotate(5deg); }
.contact-card h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.contact-card p { font-size: 1rem; color: var(--text-muted); font-weight: 500; }

/* Contact specific hover colors */
.contact-card.whatsapp:hover { box-shadow: 0 15px 40px rgba(37,211,102,0.2); }
.contact-card.email:hover { box-shadow: 0 15px 40px rgba(138,43,226,0.2); }
.contact-card.web:hover { box-shadow: 0 15px 40px rgba(255,51,102,0.2); }

/* WhatsApp FAB */
.whatsapp-fab {
  position: fixed; bottom: 30px; right: 30px; z-index: 999;
  width: 70px; height: 70px; border-radius: 50%;
  background: #25D366; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(37,211,102,0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: fabPulse 2s infinite;
}
.whatsapp-fab::before {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #25D366;
  animation: ripple 2s infinite; opacity: 0; pointer-events: none;
}
@keyframes ripple { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes fabPulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.05);} }
.whatsapp-fab:hover { transform: scale(1.15) rotate(10deg); box-shadow: 0 15px 40px rgba(37,211,102,0.7); animation: none; }
.whatsapp-fab svg { width: 36px; height: 36px; fill: #fff; }

/* Footer */
footer {
  text-align: center; padding: 40px 24px; color: var(--text-muted); font-size: 1rem; font-weight: 500;
  border-top: 1px solid var(--card-border); background: rgba(5,5,10,0.8); position: relative; z-index: 1;
}

/* Scroll Animations */
.fade-up { opacity: 0; transform: translateY(50px); transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media(max-width: 768px) {
  .nav-links { display: none; } /* Could add a hamburger menu here later */
  nav { padding: 12px 24px; }
  .hero { padding: 120px 20px 60px; }
  .about-card { padding: 30px; }
  .game-container { padding: 15px; }
  .section-title { font-size: 2.5rem; }
  .whatsapp-fab { width: 60px; height: 60px; bottom: 20px; right: 20px; }
  .whatsapp-fab svg { width: 30px; height: 30px; }
}
