/* ========================================
   CrystaliaMC - Base Styles
   ======================================== */

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

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

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

body {
  font-family: 'Nunito', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

/* ========================================
   LAYOUT
   ======================================== */

.page-content {
  position: relative;
  z-index: 1;
}

section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ========================================
   BACKGROUND EFFECTS
   ======================================== */

.bg-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--orb-1);
  top: -100px;
  left: -100px;
  animation-duration: 14s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--orb-2);
  bottom: 100px;
  right: -80px;
  animation-duration: 10s;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--orb-3);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 18s;
  animation-delay: -3s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -40px) scale(1.1); }
}

/* Stars / particles background */
.stars-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ========================================
   WELCOME OVERLAY
   ======================================== */

#welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: var(--bg-primary);
  transition: opacity 0.8s ease;
}

.welcome-logo {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  animation: pulseGlow 2s ease-in-out infinite;
}

.welcome-sub {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.welcome-bar {
  width: 200px;
  height: 3px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
}

.welcome-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-main);
  border-radius: 2px;
  animation: loadBar 2s ease forwards;
}

@keyframes loadBar {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 20px var(--accent-glow)); }
  50% { filter: drop-shadow(0 0 40px var(--accent-glow)); }
}

/* ========================================
   NAVIGATION
   ======================================== */

.main-nav {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--nav-border);
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px var(--nav-shadow);
}

.nav-logo {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-right: 1rem;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  transition: all 0.25s ease;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-primary);
  background: var(--accent-subtle);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.25rem;
  background: none;
  border: none;
  margin-left: 0.5rem;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--nav-border);
  border-radius: 50px;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px var(--nav-shadow);
}

.theme-toggle:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

/* ========================================
   HERO SECTION
   ======================================== */

#inicio {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 8rem;
  padding-bottom: 4rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  color: var(--accent-primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero-title .gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-ip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  width: fit-content;
}

.hero-ip-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.hero-ip-address {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.05em;
}

.copy-btn {
  background: var(--accent-subtle);
  border: none;
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  color: var(--accent-primary);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--accent-primary);
  color: white;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Crystals visual on right */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.crystal-container {
  position: relative;
  width: 340px;
  height: 340px;
}

.crystal-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--accent-border);
  animation: spinRing 20s linear infinite;
}

.crystal-ring-2 {
  inset: 20px;
  border-color: var(--accent-border-2);
  animation-duration: 14s;
  animation-direction: reverse;
}

.crystal-ring-3 {
  inset: 50px;
  border-style: dashed;
  animation-duration: 30s;
}

.crystal-core {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crystal-icon {
  font-size: 8rem;
  filter: drop-shadow(0 0 30px var(--accent-glow));
  animation: floatCrystal 4s ease-in-out infinite;
}

.float-stat {
  position: absolute;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px var(--shadow-sm);
  animation: floatCard 5s ease-in-out infinite;
}

.float-stat span {
  color: var(--accent-primary);
  font-size: 1.1rem;
  display: block;
}

.float-stat:nth-child(2) { top: 20px; right: -10px; animation-delay: -1s; }
.float-stat:nth-child(3) { bottom: 40px; left: -10px; animation-delay: -2.5s; }
.float-stat:nth-child(4) { top: 50%; right: -30px; transform: translateY(-50%); animation-delay: -0.5s; }

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

@keyframes floatCrystal {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-border);
}

.btn-outline:hover {
  background: var(--accent-subtle);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--card-bg);
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
}

.btn-ghost:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* ========================================
   SECTION HEADER
   ======================================== */

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ========================================
   CARDS
   ======================================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 1.75rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--card-shine);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: 0 16px 40px var(--shadow-md);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-subtle);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  color: var(--accent-primary);
}

.card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   INFO SECTIONS (Reglas, Discord, etc.)
   ======================================== */

.info-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.info-section h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rule-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rule-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--hover-bg);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: background 0.2s ease;
}

.rule-list li:hover {
  background: var(--accent-subtle);
  color: var(--text-primary);
}

.rule-num {
  width: 24px;
  height: 24px;
  min-width: 24px;
  background: var(--gradient-main);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
}

/* Social links */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--hover-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.25s ease;
}

.social-card:hover {
  border-color: var(--accent-primary);
  background: var(--accent-subtle);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow-sm);
}

.social-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.social-card-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
}

.social-card-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========================================
   NEWS / NOVEDADES (separate page link)
   ======================================== */

.news-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.news-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: 0 16px 40px var(--shadow-md);
}

.news-card-banner {
  height: 120px;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.news-card-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
}

.news-card-body {
  padding: 1.5rem;
}

.news-tag {
  display: inline-block;
  background: var(--accent-subtle);
  color: var(--accent-primary);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.news-card-body h3 {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.news-card-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.news-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========================================
   TEAM SECTION
   ======================================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.team-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: 0 16px 40px var(--shadow-md);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  border: 3px solid var(--accent-border);
  position: relative;
  overflow: hidden;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.team-role {
  font-size: 0.8rem;
  color: var(--accent-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.team-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--card-border);
  padding: 3rem 2rem 2rem;
  text-align: center;
}

.footer-logo {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ========================================
   ANIMATIONS
   ======================================== */

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-desc {
    margin: 0 auto 2rem;
  }

  .hero-ip {
    margin: 0 auto 2rem;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .crystal-container {
    width: 240px;
    height: 240px;
  }

  .crystal-icon {
    font-size: 5rem;
  }

  .float-stat {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.3rem;
    padding: 0.75rem 2rem;
  }

  .nav-hamburger {
    display: flex;
    z-index: 1001;
  }

  .main-nav {
    padding: 0.6rem 1rem;
    width: calc(100% - 2rem);
    justify-content: space-between;
  }

  section {
    padding: 4rem 1.25rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .social-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .theme-toggle span {
    display: none;
  }
}
