/* 
 * Family Event: Funfair Vibes
 * Theme: Bright, playful, bouncy
 */

 :root {
    --clr-red: #FF4A5A;
    --clr-blue: #4A90E2;
    --clr-yellow: #FFB703;
    --clr-purple: #9D4EDD;
    --clr-green: #2EC4B6;
    --clr-light: #F8F9FA;
    --clr-dark: #2B2D42;
    
    --bg-lightb: #EDF6F9;
    
    --font-head: 'Fredoka One', cursive; /* playful bold head */
    --font-body: 'Nunito', sans-serif; /* rounded body */
    
    --shadow-fun: 6px 6px 0px rgba(43, 45, 66, 0.2);
    --shadow-hover: 10px 10px 0px rgba(43, 45, 66, 0.3);
    --transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* bouncy ease */
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: var(--font-body);
    background-color: var(--clr-light);
    color: var(--clr-dark);
}

h1, h2, h3, h4 { font-family: var(--font-head); letter-spacing: 1px; }

a { text-decoration: none; transition: var(--transition); }
img { max-width: 100%; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 90px 0; }
.text-center { text-align: center; }

/* Text colors */
.text-red { color: var(--clr-red); }
.text-blue { color: var(--clr-blue); }
.text-yellow { color: var(--clr-yellow); }
.text-white { color: white; }

.bg-lightb { background-color: var(--bg-lightb); }
.bg-red-light { background-color: #ffe5e7; }
.bg-blue-light { background-color: #e5f1ff; }
.bg-yellow-light { background-color: #fff6e0; }
.bg-purple-light { background-color: #f4e8ff; }

/* Confetti setup */
#confetti-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
    pointer-events: none;
}

/* Nav */
nav {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 20px 0; z-index: 1000;
    transition: var(--transition);
}
nav.scrolled {
    background-color: var(--clr-white);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 10px 0;
}
.nav-container {
    display: flex; justify-content: space-between; align-items: center;
}
.logo {
    font-size: 2rem; font-family: var(--font-head); color: var(--clr-blue);
    display: flex; align-items: center; gap: 8px;
}
.hl-yellow { color: var(--clr-yellow); }
.logo i { color: var(--clr-red); }

.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { font-weight: 700; color: var(--clr-dark); font-size: 1.1rem; }

.hover-bounce:hover { transform: translateY(-5px); color: var(--clr-red); }

.nav-btn {
    background-color: var(--clr-yellow);
    padding: 8px 24px;
    border-radius: 50px;
    border: 2px solid var(--clr-dark);
    box-shadow: 4px 4px 0 var(--clr-dark);
}
.nav-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--clr-dark);
}

.mobile-menu-btn { display: none; font-size: 2rem; cursor: pointer; color: var(--clr-dark); }
.mobile-nav {
    position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
    background-color: var(--clr-yellow); z-index: 1001;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 25px;
    transition: all 0.4s ease;
}
.mobile-nav.active { right: 0; }
.close-menu { position: absolute; top: 20px; right: 20px; font-size: 3rem; cursor: pointer; }
.mobile-nav a { font-family: var(--font-head); font-size: 2rem; color: var(--clr-dark); }

/* Buttons */
.btn {
    display: inline-block; padding: 15px 35px;
    font-family: var(--font-head); font-size: 1.2rem;
    border-radius: 50px; border: 3px solid var(--clr-dark);
    box-shadow: var(--shadow-fun); cursor: pointer;
}
.btn-bounce:hover {
    transform: translate(-3px, -3px) rotate(-2deg);
    box-shadow: var(--shadow-hover);
}
.btn-red { background: var(--clr-red); color: white; }
.btn-yellow { background: var(--clr-yellow); color: var(--clr-dark); }
.btn-green { background: var(--clr-green); color: white; }
.btn-block { display: block; width: 100%; text-align: center; }
.text-xl { font-size: 1.4rem; padding: 18px; }

/* Hero */
.hero {
    min-height: 100vh; position: relative;
    display: flex; align-items: center; justify-content: center; text-align: center;
    background-color: #ffecd2;
    background-image: radial-gradient(circle at center, #ffecd2 0%, #fcb69f 100%);
    overflow: hidden; padding-top: 80px;
}
.hero-content {
    position: relative; z-index: 3; max-width: 800px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px); padding: 50px; border-radius: 40px;
    border: 3px dashed rgba(255, 255, 255, 0.6);
}
.ticket-badge {
    display: inline-block; background: var(--clr-dark); color: white;
    font-family: var(--font-head); padding: 8px 20px;
    border-radius: 20px; transform: rotate(-5deg); margin-bottom: 20px;
}
.hero h1 { font-size: 5rem; margin-bottom: 20px; text-shadow: 4px 4px 0 white; line-height: 1.1; }
.hero p { font-size: 1.4rem; font-weight: 700; color: var(--clr-dark); margin-bottom: 30px; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; }

/* Decor icons */
.decor { position: absolute; width: 120px; z-index: 2; opacity: 0.9; }
.d1 { top: 15%; left: 10%; transform: rotate(-15deg); }
.d2 { bottom: 15%; right: 10%; transform: rotate(20deg); }

.floating { animation: float 4s ease-in-out infinite; }
.floating-delay { animation: float 4s ease-in-out infinite 2s; }
@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* Info Cards */
.section-title h2 { font-size: 2.8rem; margin-bottom: 10px; color: var(--clr-dark); }
.section-title p { font-size: 1.2rem; font-weight: 600; color: #555; margin-bottom: 40px; }

.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.fun-card {
    background: white; border: 3px solid var(--clr-dark);
    border-radius: 20px; padding: 40px 20px;
    box-shadow: var(--shadow-fun); transition: var(--transition);
}
.fun-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }
.fun-card i { font-size: 4rem; margin-bottom: 15px; }

.card-blue { border-bottom: 10px solid var(--clr-blue); }
.card-blue i { color: var(--clr-blue); }
.card-yellow { border-bottom: 10px solid var(--clr-yellow); }
.card-yellow i { color: var(--clr-yellow); }
.card-red { border-bottom: 10px solid var(--clr-red); }
.card-red i { color: var(--clr-red); }

/* Games */
.games-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.game-item {
    border: 3px solid var(--clr-dark); border-radius: 20px;
    overflow: hidden; box-shadow: var(--shadow-fun); transition: var(--transition);
}
.game-item:hover { transform: scale(1.02) rotate(1deg); }
.game-img { height: 250px; overflow: hidden; border-bottom: 3px solid var(--clr-dark); }
.game-img img { width: 100%; height: 100%; object-fit: cover; }
.game-info { padding: 25px; }
.game-info h4 { font-size: 1.5rem; margin-bottom: 10px; }
.game-info p { font-weight: 600; }

/* Food section */
.bg-waves {
    background-color: var(--clr-purple);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.1' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover; background-position: bottom;
}
.food-slider { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.food-card {
    background: white; border-radius: 15px; padding: 30px 20px; text-align: center;
    border: 3px solid transparent; transition: var(--transition);
}
.food-card:hover { border-color: var(--clr-yellow); transform: translateY(-10px); }
.food-card i { font-size: 3rem; color: var(--clr-purple); margin-bottom: 15px; }
.food-card h4 { font-family: var(--font-head); font-size: 1.3rem; margin-bottom: 10px; color: var(--clr-dark); }
.food-card p { font-weight: 600; color: #666; font-size: 0.95rem; }

/* Prizes */
.prize-container {
    background: var(--bg-lightb); border: 4px dashed var(--clr-red);
    border-radius: 30px; padding: 50px; position: relative;
}
.prize-list { display: flex; justify-content: center; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.prize-item {
    background: white; padding: 30px; border-radius: 15px; border: 3px solid var(--clr-dark);
    box-shadow: var(--shadow-fun); width: 280px; transition: var(--transition);
}
.prize-item:hover { transform: scale(1.05); }
.gold-prize { background: var(--clr-yellow); border-color: white; transform: scale(1.1); }
.gold-prize:hover { transform: scale(1.15); }
.prize-item i { font-size: 4rem; color: var(--clr-dark); margin-bottom: 15px; }

/* Countdown */
.ctd-bg { background-color: var(--clr-blue); }
.fun-countdown { display: flex; justify-content: center; gap: 20px; margin-top: 30px; flex-wrap: wrap; }
.cd-box {
    background: var(--clr-yellow); border: 4px solid var(--clr-dark); border-radius: 15px;
    width: 120px; height: 120px; display: flex; flex-direction: column; justify-content: center;
    align-items: center; box-shadow: var(--shadow-fun); color: var(--clr-dark);
}
.cd-box span { font-family: var(--font-head); font-size: 3rem; line-height: 1; }
.cd-box small { font-weight: 800; font-size: 1.2rem; }

/* RSVP */
.rsvp-fun-box {
    background: white; border: 5px solid var(--clr-dark); border-radius: 40px;
    padding: 60px; text-align: center; position: relative; box-shadow: 15px 15px 0 rgba(43,45,66,0.1);
}
.form-wrapper { max-width: 400px; margin: 30px auto 0; }
.decor-stamp { position: absolute; bottom: -30px; right: 20px; width: 120px; opacity: 0.8; transform: rotate(15deg); }

footer { background: var(--clr-dark); color: white; padding: 40px 0; }
.footer-logo { font-size: 2.5rem; margin-bottom: 10px; }

/* Responsive */
@media (max-width: 900px) {
    .games-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3.5rem; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .hero-content { padding: 30px 20px; }
    .hero h1 { font-size: 2.8rem; }
    .gold-prize { transform: scale(1); }
    .gold-prize:hover { transform: scale(1.05); }
    .hero-buttons { flex-direction: column; }
    .cd-box { width: 90px; height: 90px; }
    .cd-box span { font-size: 2rem; }
}
