:root{
  --sky:#BEE6FF;
  --teal-800:#0E7C73;
  --forest-700:#2E6A3A;
  --leaf-400:#8AD36A;
  --meadow-300:#A1DC76;
  --earth-600:#8C5E3A;
  --sand-300:#EED7AA;
  --charcoal-800:#2B2F35;
  --banner-olive:#5BA36A;
  --banner-text:#2E0C0C;
  --sun-300:#F7C74A;
  --coral-400:#F5956F;
  --slate-500:#6A747D;
  --river-500:#69B7FF;
  --accent-cyan:#00E1FF;
  --font-head: 'Poppins', sans-serif;
  --dark-bg: #1a1a1a;
  --card-bg: #2d2d2d;
  --card-border: #3d3d3d;
  --gold: #FFD700;
  --pumpkin: #F5956F;
  --pumpkin-dark: #F5956F;
  --pumpkin-light: #F7C74A;
  --ghost: #6A747D;
  --bone: #EED7AA;
  --transition: all 0.3s ease;
}

/* Base styles for all devices */
* {
  box-sizing: border-box;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--pumpkin);
  color: white;
  padding: 8px;
  z-index: 1000;
  text-decoration: none;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Mobile-first approach - base styles for mobile */
body {
  background: var(--sky);
  color: var(--charcoal-800);
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 16px 12px 0;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -2;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Typography improvements */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  color: var(--teal-800);
}

h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--forest-700);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: var(--teal-800);
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Badge improvements */
.badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 50px;
  background: rgba(255,255,255,.2);
  color: var(--banner-text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.badge:hover {
  transform: translateY(-3px);
  background: rgba(142, 230, 255, 0.4);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Card improvements */
.card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  position: relative;
  z-index: 1;
  transition: var(--transition);
  border: 1px solid var(--leaf-400);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(14, 124, 115, 0.3);
}

/* Button improvements */
.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  z-index: 2;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(245, 149, 111, 0.3);
  width: 100%;
  max-width: 280px;
  color: var(--banner-text);
  background: linear-gradient(45deg, var(--sun-300), var(--coral-400));
  font-weight: 700;
  letter-spacing: 0.5px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(245, 149, 111, 0.5);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus {
  outline: 2px solid var(--forest-700);
  outline-offset: 2px;
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-3px);
}

/* Footer improvements */
.footer {
  margin-top: 40px;
  color: var(--charcoal-800);
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
  padding: 20px 0;
  text-align: center;
}

.footer a {
  color: var(--teal-800);
  text-decoration: none;
  position: relative;
  font-weight: 600;
  transition: var(--transition);
}

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

.footer a:after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -1px;
  left: 0;
  background-color: var(--coral-400);
  transition: width 0.3s ease;
}

.footer a:hover:after {
  width: 100%;
}

/* Floating Animal Elements */
.floating-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating {
  position: absolute;
  font-size: 2rem;
  animation-duration: 25s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  opacity: 0.8;
  z-index: 0;
  text-shadow: 0 0 15px rgba(245, 149, 111, 0.7);
  filter: drop-shadow(0 0 5px rgba(0,0,0,0.3));
  transition: var(--transition);
}

.floating:hover {
  transform: scale(1.2) !important;
  opacity: 1;
  z-index: 10;
}

.ghost {
  animation-name: floatGhost;
  top: 10%;
  left: 5%;
}

.bat {
  animation-name: floatBat;
  top: 20%;
  right: 5%;
}

.pumpkin {
  animation-name: floatPumpkin;
  bottom: 30%;
  left: 10%;
}

.candy {
  animation-name: floatCandy;
  bottom: 20%;
  right: 10%;
}

.spider {
  animation-name: floatSpider;
  top: 30%;
  right: 20%;
}

.moon {
  animation-name: floatMoon;
  top: 15%;
  left: 20%;
}

.web {
  animation-name: floatWeb;
  bottom: 25%;
  left: 15%;
}

.skull {
  animation-name: floatSkull;
  top: 25%;
  right: 15%;
}

/* Animation keyframes for floating elements */
@keyframes floatGhost {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-20px, -20px) rotate(10deg);
  }
  50% {
    transform: translate(0, -40px) rotate(0deg);
  }
  75% {
    transform: translate(20px, -20px) rotate(-10deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes floatBat {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(25px, 20px) rotate(20deg);
  }
  50% {
    transform: translate(0, 40px) rotate(0deg);
  }
  75% {
    transform: translate(-25px, 20px) rotate(-20deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes floatPumpkin {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-15px, -25px) rotate(-15deg);
  }
  50% {
    transform: translate(0, -50px) rotate(0deg);
  }
  75% {
    transform: translate(15px, -25px) rotate(15deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes floatCandy {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(25px, 25px) rotate(25deg);
  }
  50% {
    transform: translate(0, 50px) rotate(0deg);
  }
  75% {
    transform: translate(-25px, 25px) rotate(-25deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes floatSpider {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-30px, 30px) rotate(30deg);
  }
  50% {
    transform: translate(0, 60px) rotate(0deg);
  }
  75% {
    transform: translate(30px, 30px) rotate(-30deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes floatMoon {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(10px, -10px) rotate(10deg);
  }
  50% {
    transform: translate(0, -20px) rotate(0deg);
  }
  75% {
    transform: translate(-10px, -10px) rotate(-10deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes floatWeb {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(20px, -20px) rotate(20deg);
  }
  50% {
    transform: translate(0, -40px) rotate(0deg);
  }
  75% {
    transform: translate(-20px, -20px) rotate(-20deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@keyframes floatSkull {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-25px, 25px) rotate(-25deg);
  }
  50% {
    transform: translate(0, 50px) rotate(0deg);
  }
  75% {
    transform: translate(25px, 25px) rotate(25deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* Pulsing effect for header badge */
.badge:first-child {
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 149, 111, 0.6);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(245, 149, 111, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 149, 111, 0);
  }
}

/* Animated background elements */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(91, 163, 106, 0.1) 0%, transparent 70%);
  animation: rotate 40s linear infinite;
  z-index: -1;
}

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

/* Header title animation */
h1 {
  position: relative;
  display: inline-block;
  margin: 15px 0;
  animation: fadeInUp 1s ease;
}

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

h1:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--sun-300), var(--coral-400));
  border-radius: 4px;
  animation: titleUnderline 4s infinite;
}

@keyframes titleUnderline {
  0% {
    width: 0;
  }
  50% {
    width: 120px;
  }
  100% {
    width: 0;
  }
}

/* Card entrance animations */
.card {
  opacity: 0;
  transform: translateY(30px);
  animation: cardEntrance 0.8s forwards;
}

@keyframes cardEntrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

/* Countdown timer styles */
.countdown-container {
  margin: 30px auto;
  padding: 25px;
  background: linear-gradient(135deg, rgba(91, 163, 106, 0.8), rgba(46, 106, 58, 0.8));
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  backdrop-filter: blur(10px);
  max-width: 800px;
}

.countdown-container h3 {
  margin-top: 0;
  color: var(--banner-text);
  font-family: var(--font-head);
  font-size: 1.8rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.countdown-item {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 15px 10px;
  min-width: 80px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  transition: var(--transition);
}

.countdown-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.countdown-item span {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--teal-800);
  margin-bottom: 5px;
}

.countdown-item small {
  display: block;
  font-size: 0.8rem;
  color: var(--charcoal-800);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Event info banner */
.event-info {
  margin: 25px auto;
  background: linear-gradient(135deg, rgba(91, 163, 106, 0.9), rgba(46, 106, 58, 0.9));
  color: var(--banner-text);
  padding: 20px;
  border-radius: 16px;
  display: inline-block;
  text-align: center;
  max-width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  backdrop-filter: blur(10px);
}

.event-info p {
  margin: 0;
  font-weight: 600;
  font-size: 1.3rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.event-info p:first-child {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.event-info p:last-child {
  font-size: 1.2rem;
  margin-top: 5px;
  opacity: 0.9;
}

/* Theme gallery */
.theme-gallery {
  margin-top: 20px;
}

.theme-gallery h3 {
  text-align: center;
  margin-bottom: 20px;
}

.theme-images {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 15px;
}

.theme-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  min-width: 100px;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.theme-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.theme-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* FAQ Styles */
.faq-container {
  margin-top: 20px;
}

.faq-item {
  margin-bottom: 15px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.05);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.7);
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--teal-800);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.9);
}

.faq-toggle {
  font-size: 1.5rem;
  transition: var(--transition);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer p {
  margin: 15px 0;
  color: var(--charcoal-800);
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding: 15px 20px;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

/* Schedule Styles */
.schedule {
  margin-top: 20px;
}

.schedule-item {
  display: flex;
  padding: 15px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.schedule-item:last-child {
  border-bottom: none;
}

.time {
  min-width: 100px;
  font-weight: 700;
  color: var(--teal-800);
  padding-right: 20px;
}

.event {
  flex: 1;
  color: var(--charcoal-800);
}

/* Form header */
.form-header {
  background: linear-gradient(135deg, var(--banner-olive), var(--forest-700));
  color: var(--banner-text);
  padding: 25px;
  text-align: center;
  border-radius: 16px 16px 0 0;
}

.form-header h2 {
  margin: 0;
  color: var(--banner-text);
  font-size: 2rem;
}

.form-header p {
  margin: 10px 0 0;
  opacity: 0.9;
  font-size: 1.1rem;
}

/* Divider */
.divider {
  height: 3px;
  background: linear-gradient(to right, var(--sun-300), var(--coral-400));
  width: 100px;
  margin: 15px auto;
  border-radius: 3px;
}

/* Invitation section */
.invitation-card {
  text-align: center;
  padding: 30px;
}

.invitation-header h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.invitation-image-container {
  margin: 25px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border: 5px solid white;
}

.invitation-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.invitation-footer {
  margin-top: 20px;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .countdown {
    gap: 8px;
  }
  
  .countdown-item {
    min-width: 60px;
    padding: 10px 5px;
  }
  
  .countdown-item span {
    font-size: 1.3rem;
  }
  
  .theme-images {
    gap: 10px;
  }
  
  .theme-item {
    min-width: 80px;
    padding: 10px;
  }
  
  .schedule-item {
    flex-direction: column;
  }
  
  .time {
    padding-right: 0;
    margin-bottom: 5px;
  }
  
  .floating {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .countdown-item {
    min-width: 50px;
  }
  
  .countdown-item span {
    font-size: 1.1rem;
  }
  
  .countdown-item small {
    font-size: 0.7rem;
  }
  
  .theme-item {
    min-width: 70px;
  }
  
  .theme-icon {
    font-size: 1.5rem;
  }
  
  h1:after {
    width: 60px;
  }
}