:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --secondary: #06b6d4;
  --accent: #fbbf24;
  --bg: #ffffff;
  --bg-soft: #eff6ff;
  --card-bg: #ffffff;
  --text: #1e3a8a;
  --text-muted: #64748b;
  --border: #bfdbfe;
  --shadow: rgba(59, 130, 246, 0.15);
  --font-main: 'Nunito', sans-serif;
  --font-display: 'Fredoka One', cursive;
  --navbar-bg: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --card-bg: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: rgba(0, 0, 0, 0.3);
  --navbar-bg: rgba(15, 23, 42, 0.95);
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 5%; position: fixed; width: 100%; top: 0;
  background: var(--navbar-bg); backdrop-filter: blur(10px);
  z-index: 100; border-bottom: 3px solid var(--primary);
  box-shadow: 0 4px 15px var(--shadow);
  transition: background 0.3s;
}

.logo { 
  font-size: 1.5rem; 
  font-weight: 800; 
  font-family: var(--font-display);
  color: var(--primary);
}
.logo i { color: var(--secondary); margin-right: 5px; }
.highlight { color: var(--primary-dark); }

[data-theme="dark"] .highlight { color: var(--primary-light); }

.nav-links { display: flex; list-style: none; gap: 2rem; align-items: center; }
.nav-links a { 
  color: var(--text); 
  text-decoration: none; 
  font-weight: 700; 
  transition: 0.3s;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}
.nav-links a:hover { 
  color: var(--primary);
  background: var(--bg-soft);
}

.btn-nav {
  background: var(--primary); 
  color: white !important;
  padding: 0.6rem 1.5rem; 
  border-radius: 25px;
  font-weight: 800 !important;
  box-shadow: 0 4px 10px var(--shadow);
}
.btn-nav:hover { 
  background: var(--primary-dark); 
  transform: translateY(-2px); 
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.clock {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-soft);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  color: var(--primary);
  border: 2px solid var(--border);
  font-size: 0.9rem;
}

.clock i {
  animation: tick 1s infinite;
}

@keyframes tick {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.theme-toggle {
  background: var(--bg-soft);
  border: 2px solid var(--border);
  color: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
  font-size: 1.1rem;
}

.theme-toggle:hover {
  background: var(--primary);
  color: white;
  transform: rotate(180deg);
}

.hamburger { display: none; font-size: 1.5rem; cursor: pointer; color: var(--primary); }

.hero {
  min-height: 100vh; 
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  padding: 0 10%; 
  padding-top: 120px; 
  gap: 3rem;
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg) 100%);
  transition: background 0.3s;
}

.hero-content { max-width: 600px; }

.badge {
  background: var(--primary); 
  color: white; 
  padding: 8px 16px;
  border-radius: 25px; 
  font-size: 0.9rem; 
  font-weight: 700; 
  margin-bottom: 1.5rem; 
  display: inline-block;
  box-shadow: 0 4px 10px var(--shadow);
}

h1 { 
  font-size: 3.5rem; 
  font-weight: 800; 
  line-height: 1.1; 
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  color: var(--text);
}
h1 .highlight { 
  color: var(--primary);
  text-shadow: 2px 2px 0px var(--primary-light);
}

.subtitle { 
  color: var(--text-muted); 
  font-size: 1.2rem; 
  line-height: 1.6; 
  margin-bottom: 2rem;
  font-weight: 600;
}

.hero-btns { 
  display: flex; 
  gap: 1rem; 
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.btn-primary, .btn-secondary {
  padding: 1rem 2rem; 
  border-radius: 30px; 
  text-decoration: none; 
  font-weight: 800;
  display: inline-flex; 
  align-items: center; 
  gap: 0.5rem; 
  transition: 0.3s;
  font-size: 1rem;
}

.btn-primary { 
  background: var(--primary); 
  color: white;
  box-shadow: 0 6px 20px var(--shadow);
}
.btn-primary:hover { 
  background: var(--primary-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.btn-secondary { 
  background: var(--card-bg); 
  color: var(--primary); 
  border: 3px solid var(--primary);
}
.btn-secondary:hover { 
  background: var(--bg-soft);
  transform: translateY(-3px) scale(1.05);
}

.hero-visual {
  display: flex; 
  justify-content: center; 
  flex: 1;
}

.cartoon-box {
  background: var(--card-bg);
  border: 4px solid var(--primary);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 8px 8px 0 var(--primary);
  max-width: 400px;
  width: 100%;
  transition: background 0.3s;
}

.cartoon-header {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #fbbf24; }
.dot.green { background: #10b981; }

.cartoon-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.character {
  font-size: 5rem;
  color: var(--primary);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.speech-bubble {
  background: var(--bg-soft);
  padding: 1rem 1.5rem;
  border-radius: 15px;
  border: 3px solid var(--primary-light);
  position: relative;
}

.speech-bubble p {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1.1rem;
}

.speech-bubble::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid var(--primary-light);
}

.features { 
  padding: 5rem 10%; 
  background: var(--bg-soft);
  transition: background 0.3s;
}

.section-title { 
  text-align: center; 
  font-size: 2.5rem; 
  margin-bottom: 3rem;
  font-family: var(--font-display);
  color: var(--text);
}
.section-title .highlight {
  color: var(--primary);
}

.cards-container {
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 2rem;
}

.card {
  background: var(--card-bg); 
  padding: 2rem; 
  border-radius: 20px; 
  border: 3px solid var(--border);
  transition: 0.3s; 
  position: relative; 
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow);
}

.card:hover { 
  transform: translateY(-10px) rotate(1deg); 
  border-color: var(--primary);
  box-shadow: 0 8px 25px var(--shadow);
}

.card::before {
  content: ''; 
  position: absolute; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.icon-box {
  font-size: 3rem; 
  color: var(--primary); 
  margin-bottom: 1rem;
  background: var(--bg-soft);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 3px solid var(--border);
}

.card h3 { 
  margin-bottom: 0.5rem; 
  font-size: 1.5rem; 
  font-family: var(--font-display);
  color: var(--text);
}

.card p { 
  color: var(--text-muted); 
  line-height: 1.6;
  font-weight: 600;
}

.events {
  padding: 5rem 10%;
  background: var(--bg);
  transition: background 0.3s;
}

.events-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 3rem;
}

.event-card {
  background: var(--card-bg);
  border: 3px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 25px var(--shadow);
  transition: 0.3s;
  display: grid;
  grid-template-columns: 350px 1fr;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px var(--shadow);
  border-color: var(--primary);
}

.event-image {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 300px;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s;
}

.event-card:hover .event-image img {
  transform: scale(1.1);
}

.event-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.event-badge.featured {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.event-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-content h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.event-date {
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.event-desc {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1rem;
}

.event-requirements {
  background: var(--bg-soft);
  padding: 1.5rem;
  border-radius: 15px;
  border: 2px dashed var(--border);
}

.event-requirements h4 {
  color: var(--primary-dark);
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.event-requirements ul {
  list-style: none;
  padding: 0;
}

.event-requirements ul li {
  padding: 0.4rem 0;
  color: var(--text-muted);
  font-weight: 600;
  position: relative;
  padding-left: 1.5rem;
}

.event-requirements ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: 800;
}

.event-info {
  display: flex;
  gap: 2rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 10px;
  border: 2px solid var(--border);
}

.event-info span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
}

.event-info i {
  color: var(--primary);
}

.btn-event {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 800;
  margin-top: auto;
  transition: 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-event:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--shadow);
}

.cta-section {
  padding: 5rem 10%; 
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-family: var(--font-display);
}

.cta-content .highlight {
  color: var(--accent);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

.join-form {
  margin-top: 2rem; 
  display: flex; 
  gap: 0.5rem; 
  justify-content: center; 
  flex-wrap: wrap;
}

.join-form input {
  padding: 1rem 1.5rem; 
  border-radius: 30px; 
  border: 3px solid white;
  background: white; 
  color: var(--text); 
  width: 350px; 
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-main);
}

.join-form input::placeholder {
  color: var(--text-muted);
}

.join-form button {
  padding: 1rem 2rem; 
  border-radius: 30px; 
  border: none;
  background: var(--accent); 
  color: var(--text); 
  font-weight: 800; 
  cursor: pointer;
  transition: 0.3s;
  font-size: 1rem;
  font-family: var(--font-main);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.join-form button:hover { 
  background: #f59e0b;
  transform: translateY(-3px) scale(1.05);
}

.social-links {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 3px solid rgba(255,255,255,0.3);
}

.social-links p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.social-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-btn {
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: 0.3s;
  color: white;
}

.social-btn.discord {
  background: #5865F2;
}

.social-btn.instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-btn.github {
  background: #333;
}

.social-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

footer { 
  padding: 2rem 10%; 
  border-top: 3px solid var(--border); 
  text-align: center; 
  background: var(--bg-soft);
  transition: background 0.3s;
}

.footer-content p {
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 1rem;
}

.socials { 
  display: flex; 
  justify-content: center; 
  gap: 1.5rem; 
}

.socials a { 
  color: var(--primary); 
  font-size: 1.8rem; 
  transition: 0.3s; 
}

.socials a:hover { 
  color: var(--primary-dark); 
  transform: scale(1.3) rotate(10deg); 
}

@media (max-width: 900px) {
  .event-card {
    grid-template-columns: 1fr;
  }
  
  .event-image {
    min-height: 250px;
  }
  
  .nav-right {
    gap: 1rem;
  }
  
  .clock {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero { 
    flex-direction: column; 
    text-align: center; 
    padding-top: 120px; 
  }
  .hero-content { 
    max-width: 100%; 
  }
  .hero-btns { 
    justify-content: center; 
  }
  .cartoon-box { 
    display: none; 
  }
  
  .hamburger { 
    display: block; 
  }
  .nav-links {
    position: fixed; 
    top: 70px; 
    right: -100%; 
    width: 70%; 
    height: 100vh;
    background: var(--card-bg); 
    flex-direction: column; 
    padding: 2rem; 
    transition: 0.3s;
    border-left: 3px solid var(--primary);
    box-shadow: -5px 0 20px var(--shadow);
  }
  .nav-links.active { 
    right: 0; 
  }
  h1 { 
    font-size: 2.5rem; 
  }
  
  .join-form input {
    width: 100%;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .event-info {
    flex-direction: column;
    gap: 1rem;
  }
  
  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .event-content {
    padding: 1.5rem;
  }
  
  .event-content h3 {
    font-size: 1.5rem;
  }
}