/* ============================================================
   Soft & Sweet — Estilos Principales
   ============================================================ */

/* ── Variables ── */
:root {
  --c-bg:           #fef6f0;
  --c-surface:      #fffaf6;
  --c-surface-alt:  #fff2e8;

  --c-brown-lightest: #f7e8d8;
  --c-brown-light:    #eacfac;
  --c-brown:          #c8956c;
  --c-brown-dark:     #8a5c32;

  --c-pink-light:   #fdeaf5;
  --c-pink:         #eca0c4;
  --c-pink-dark:    #c06090;

  --c-lavender:     #ede8ff;
  --c-gold:         #f5c542;
  --c-gold-soft:    #f7e4a8;

  /* role tints */
  --c-owner-bg:   #fff8ec;
  --c-owner:      #e8a030;
  --c-admin-bg:   #fff0f5;
  --c-admin:      #e85080;
  --c-mod-bg:     #f0f4ff;
  --c-mod:        #6080e8;
  --c-helper-bg:  #f0fbf6;
  --c-helper:     #40b890;

  --c-text:         #3a2010;
  --c-text-mid:     #7a5030;
  --c-text-muted:   #a57848;

  --shadow-xs:  0 1px  6px rgba(180, 80, 60, 0.06);
  --shadow-sm:  0 3px 14px rgba(180, 80, 60, 0.09);
  --shadow-md:  0 6px 28px rgba(180, 80, 60, 0.13);
  --shadow-lg:  0 14px 50px rgba(180, 80, 60, 0.17);

  --radius-sm:   0.75rem;
  --radius-md:   1.4rem;
  --radius-lg:   2rem;
  --radius-xl:   2.8rem;
  --radius-full: 9999px;

  --transition: 0.22s ease;
}

/* ── Reset & base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: radial-gradient(ellipse at 30% 0%, #ffe8f5 0%, transparent 50%),
              radial-gradient(ellipse at 80% 100%, #fde8d8 0%, transparent 50%),
              #fef6f0;
  color: var(--c-text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Subtle polka dot texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(200, 149, 108, 0.05) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

img { display: block; }
a { color: inherit; }

/* ── Floating SVG decorations (Lucide icons) ── */
.bg-floaties {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Lucide replaces <i> with <svg> — .floatie lives on the svg */
.floatie {
  position: absolute;
  opacity: 0.10;
  user-select: none;
  stroke-width: 1.5;
  animation: bgFloat 14s ease-in-out infinite;
  fill: none;
  transition: filter 0.38s ease-out, opacity 0.38s ease-out;
}

@keyframes bgFloat {
  0%,  100% { transform: translateY(0px)   rotate(0deg);  }
  30%        { transform: translateY(-22px) rotate(7deg);  }
  65%        { transform: translateY(-10px) rotate(-5deg); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
}

.hero-banner-wrap {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  background: linear-gradient(135deg, #f0c8b0 0%, #f0a8cc 50%, #c8b0f0 100%);
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: opacity 0.6s ease;
}

.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 10, 5, 0.08) 0%,
    rgba(20, 10, 5, 0.60) 100%
  );
}

.hero-content {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  padding-bottom: 2rem;
  margin-top: -80px;
  position: relative;
  z-index: 2;
}

.server-icon-wrap { flex-shrink: 0; }

.server-icon {
  width: 108px;
  height: 108px;
  border-radius: var(--radius-md);
  border: 4px solid #fff;
  box-shadow: var(--shadow-md);
  background: var(--c-brown-lightest);
  object-fit: cover;
  transition: opacity 0.6s ease;
}

.server-meta { padding-bottom: 0.25rem; }

.server-name {
  font-family: 'Comfortaa', cursive;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
  margin-bottom: 0.7rem;
}

/* ── Badges — solid BG for proper contrast ── */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.8rem 0.28rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
}

.badge-icon {
  width: 0.82rem;
  height: 0.82rem;
  flex-shrink: 0;
  stroke-width: 2.5;
}

.badge-rainbow {
  position: relative;
  overflow: hidden;
  background: rgba(35, 15, 10, 0.55);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(8px);
}

.badge-rainbow::after {
  content: '';
  position: absolute;
  bottom: 0; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, #f04040, #f08040, #f0e040, #40d040, #40a8e8, #5050e8, #d040e0);
  border-radius: var(--radius-full);
}

.badge-age {
  background: rgba(175, 25, 45, 0.85);
  color: #fff;
  border: 1.5px solid rgba(255, 140, 140, 0.25);
}

.badge-cafe {
  background: rgba(110, 60, 15, 0.78);
  color: #ffe8cc;
  border: 1.5px solid rgba(220, 155, 70, 0.25);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-section {
  padding: 3rem 0 1.5rem;
  position: relative;
  z-index: 1;
}

.about-card {
  position: relative;
  background: var(--c-surface);
  border: 1.5px solid rgba(230, 160, 120, 0.20);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem 2rem 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3.5px;
  background: linear-gradient(
    90deg,
    #e84040, #e88040, #e8d840,
    #40d840, #40b8e8, #4040e8, #d040e8
  );
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.about-icon-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--c-pink-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
}

.about-icon {
  width: 26px;
  height: 26px;
  color: var(--c-pink);
  stroke-width: 1.8;
}

.about-text {
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--c-text-mid);
  font-weight: 400;
  padding-top: 0.1rem;
}

/* ============================================================
   STATS
   ============================================================ */
.stats-section {
  padding: 2rem 0 3rem;
  position: relative;
  z-index: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
}

.stat-card {
  background: var(--c-surface);
  border: 1.5px solid var(--c-brown-lightest);
  border-radius: var(--radius-lg);
  padding: 2rem 1rem 1.6rem;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  z-index: 1;
}

.stat-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--shadow-md);
}

.stat-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.9rem;
}

.stat-icon-circle svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.8;
}

.stat-ic-members { background: var(--c-lavender);   color: #6060c8; }
.stat-ic-staff   { background: #f7e4a8;              color: #a06010; }
.stat-ic-mod     { background: var(--c-helper-bg);  color: var(--c-helper); }

.stat-number {
  font-family: 'Comfortaa', cursive;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--c-brown-dark);
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.76rem;
  color: var(--c-text-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ============================================================
   STAFF
   ============================================================ */
.staff-section {
  padding: 1rem 0 4rem;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: 'Comfortaa', cursive;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--c-text);
  text-align: center;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  text-align: center;
  color: var(--c-text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.1rem;
}

.role-card {
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.role-card:hover {
  transform: translateY(-7px) scale(1.02);
  box-shadow: var(--shadow-md);
}

.role-owner      { background: var(--c-owner-bg);  border-color: rgba(232, 160, 48,  0.28); }
.role-solo-owner { background: #fff8f0;             border-color: rgba(220, 120, 20,  0.35); }
.role-admin      { background: var(--c-admin-bg);  border-color: rgba(232, 80,  128, 0.22); }
.role-mod        { background: var(--c-mod-bg);    border-color: rgba(96,  128, 232, 0.20); }
.role-helper     { background: var(--c-helper-bg); border-color: rgba(64,  184, 144, 0.22); }

.role-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.role-owner::before      { background: linear-gradient(90deg, #f5c540, #e8901c); }
.role-solo-owner::before { background: linear-gradient(90deg, #ffaa30, #e06010); }
.role-admin::before      { background: linear-gradient(90deg, #f07899, #e84080); }
.role-mod::before        { background: linear-gradient(90deg, #90aaff, #5070e8); }
.role-helper::before     { background: linear-gradient(90deg, #70e0b8, #30b888); }

.role-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.role-icon-wrap svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.8;
}

.role-solo-owner .role-icon-wrap { background: rgba(220, 120, 20,  0.18); color: #cc6010;         }
.role-owner      .role-icon-wrap { background: rgba(232, 160, 48,  0.18); color: var(--c-owner);  }
.role-admin      .role-icon-wrap { background: rgba(232, 80,  128, 0.15); color: var(--c-admin);  }
.role-mod        .role-icon-wrap { background: rgba(96,  128, 232, 0.14); color: var(--c-mod);    }
.role-helper     .role-icon-wrap { background: rgba(64,  184, 144, 0.16); color: var(--c-helper); }

.role-name {
  font-family: 'Comfortaa', cursive;
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-text);
  margin-bottom: 0.3rem;
}

.role-count {
  font-family: 'Comfortaa', cursive;
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-brown-dark);
  display: block;
  line-height: 1;
  margin-bottom: 1rem;
}

/* ── Member avatars ── */
.role-members {
  min-height: 38px;
}

.member-avatars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 0.45rem;
}

/* ── Avatar card ── */
.member-av-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  width: 64px;
  flex-shrink: 0;
}

.member-av {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  border: 2.5px solid #fff;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
  background: var(--c-brown-lightest);
  display: block;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.member-av-wrap:hover .member-av {
  transform: translateY(-4px) scale(1.07);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}

.member-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--c-text-mid);
  text-align: center;
  line-height: 1.2;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.member-av-wrap:hover .member-name {
  color: var(--c-brown-dark);
}

.member-extra {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--c-brown-lightest);
  border: 2.5px solid #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--c-text-mid);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

/* ============================================================
   REGLAS
   ============================================================ */
.rules-section {
  padding: 1rem 0 4rem;
  position: relative;
  z-index: 1;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.rule-card {
  background: var(--c-surface);
  border: 1.5px solid rgba(200, 150, 220, 0.20);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem 1.35rem;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.rule-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.rule-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f7b6d6, #c8b6ff, #b6d6ff);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.rule-heading {
  font-family: 'Comfortaa', cursive;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--c-text);
  margin: 0 0 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.rule-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  stroke-width: 2;
  color: var(--c-pink);
  vertical-align: middle;
}

.rule-title-icon {
  width: 1.15rem;
  height: 1.15rem;
  stroke-width: 2;
  color: var(--c-pink);
  vertical-align: middle;
  margin-right: 0.3rem;
}

.rule-closing .rule-icon,
.rule-farewell .rule-icon {
  vertical-align: middle;
}

.rule-body {
  font-size: 0.875rem;
  color: var(--c-text-mid);
  line-height: 1.75;
  list-style: none;
  padding: 0;
  margin: 0;
}

.rule-body li + li {
  margin-top: 0.15rem;
}

.rule-body li {
  display: block;
}

.rule-body li::before {
  content: '• ';
  color: var(--c-pink);
  font-weight: 700;
}

.rule-closing {
  margin-top: 1.25rem;
  padding: 0.85rem 1.25rem;
  background: rgba(245, 197, 66, 0.08);
  border: 1.5px solid rgba(245, 197, 66, 0.22);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--c-text-mid);
  line-height: 1.65;
}

.rule-farewell {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--c-text-muted);
  line-height: 1.75;
  padding: 0.25rem 0;
}

/* ============================================================
   JOIN CTA
   ============================================================ */
.join-section {
  padding: 2rem 0 6rem;
  position: relative;
  z-index: 1;
}

.join-card {
  background: linear-gradient(145deg, #fffaf6 0%, #fde8f4 100%);
  border: 1.5px solid rgba(236, 160, 196, 0.28);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.join-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -15%, rgba(236, 160, 196, 0.20) 0%, transparent 65%);
  pointer-events: none;
}

.join-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3.5px;
  background: linear-gradient(
    90deg,
    #e84040, #e88040, #e8d840,
    #40d840, #40b8e8, #4040e8, #d040e8
  );
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.join-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.join-deco-icon {
  opacity: 0.45;
  stroke-width: 1.8;
  fill: none;
  display: block;
}

.join-deco-icon:nth-child(1) { color: var(--c-brown); width: 1.7rem; height: 1.7rem; }
.join-deco-icon:nth-child(2) { color: var(--c-gold);  width: 1.2rem; height: 1.2rem; }
.join-deco-icon:nth-child(3) { color: var(--c-pink);  width: 1.6rem; height: 1.6rem; }

.join-title {
  font-family: 'Comfortaa', cursive;
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 0.75rem;
}

.join-subtitle {
  color: var(--c-text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.25rem;
}

.join-button {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #7289da 0%, #5b6eae 100%);
  color: #fff;
  text-decoration: none;
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 1.05rem;
  font-family: 'Nunito', sans-serif;
  box-shadow: 0 4px 20px rgba(114, 137, 218, 0.40);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  position: relative;
  z-index: 1;
}

.join-button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 32px rgba(114, 137, 218, 0.55);
  filter: brightness(1.07);
}

.join-button:active { transform: translateY(0) scale(0.98); }

/* Brillitos del botón de unirse */
.join-sparkle-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.join-sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.join-sparkle.spark-pop {
  animation: sparkFly 1.1s ease-out forwards;
}

@keyframes sparkFly {
  0%   { opacity: 1;   transform: scale(1.4);                                    }
  30%  { opacity: 1;   transform: scale(1.8);                                    }
  70%  { opacity: 0.6; transform: scale(1.2) translate(calc(var(--sx) * 0.6), calc(var(--sy) * 0.6)); }
  100% { opacity: 0;   transform: scale(0.4) translate(var(--sx), var(--sy));    }
}

.discord-icon { flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--c-surface-alt);
  border-top: 1.5px solid var(--c-brown-lightest);
  padding: 2rem 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer p {
  color: var(--c-text-muted);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.footer-icon {
  width: 1rem;
  height: 1rem;
  color: var(--c-brown);
  stroke-width: 2;
  display: inline-block;
  fill: none;
  vertical-align: middle;
}

.footer-author {
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--c-text-muted);
}

.footer-furro {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
  vertical-align: middle;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.footer-sub {
  margin-top: 0.3rem;
  font-size: 0.76rem !important;
  opacity: 0.65;
  display: block !important;
}

/* ============================================================
   SKELETON / LOADING
   ============================================================ */
.stat-number,
.role-count {
  min-width: 2ch;
  transition: color 0.3s ease;
}

body:not(.loaded) .stat-number,
body:not(.loaded) .role-count {
  color: transparent;
  background: linear-gradient(
    90deg,
    var(--c-brown-lightest) 0%,
    var(--c-brown-light)    50%,
    var(--c-brown-lightest) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 0.4rem;
}

@keyframes shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

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

/* ─ tablet ─ */
@media (max-width: 860px) {
  .roles-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .hero-banner-wrap   { height: 220px; }

  .hero-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: -60px;
    padding-bottom: 1.5rem;
  }

  .server-icon { width: 88px; height: 88px; }

  .server-name { font-size: 1.35rem; }

  .badge { font-size: 0.68rem; padding: 0.22rem 0.6rem 0.22rem 0.5rem; }

  .about-card {
    flex-direction: column;
    padding: 1.75rem 1.25rem;
    gap: 0.75rem;
  }

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

  .roles-grid { grid-template-columns: repeat(2, 1fr); }

  .section-title { font-size: 1.5rem; }

  .join-card { padding: 2.5rem 1.25rem; }
  .join-title { font-size: 1.6rem; }

  .member-av { width: 48px; height: 48px; }
  .member-extra { width: 48px; height: 48px; }
}

@media (max-width: 420px) {
  .roles-grid { grid-template-columns: 1fr 1fr; }
  .stat-number { font-size: 2rem; }
  .role-count  { font-size: 1.6rem; }
  .member-av { width: 42px; height: 42px; }
  .member-extra { width: 42px; height: 42px; }
}

/* ============================================================
   JOIN OVERLAY ANIMATION
   ============================================================ */
#joinOverlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

#joinCircle {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8a0c4 0%, #c8a0f0 100%);
  transform: scale(0);
  opacity: 0;
  will-change: transform, opacity;
}

/* Content: heart + text — hidden until shown */
#joinContent {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  opacity: 0;
  pointer-events: none;
}

#joinHeartWrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#joinHeart {
  width: 64px;
  height: 64px;
  color: #fff;
  filter: drop-shadow(0 4px 16px rgba(220, 120, 180, 0.5));
  position: relative;
  z-index: 1;
}

#joinStar {
  width: 28px;
  height: 28px;
  color: #ffe066;
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 0;
  opacity: 0;
  filter: drop-shadow(0 2px 6px rgba(255, 200, 50, 0.6));
}

#joinMsg {
  font-family: 'Comfortaa', cursive;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 14px rgba(100, 0, 60, 0.25);
  opacity: 0;
}

/* ── Keyframes ── */
@keyframes circleIn {
  0%   { transform: scale(0);    opacity: 1; }
  60%  { transform: scale(0.82); opacity: 1; }
  100% { transform: scale(0.92); opacity: 1; }
}

@keyframes circleExpand {
  0%   { transform: scale(0.92); opacity: 1; }
  100% { transform: scale(40);   opacity: 1; }
}

@keyframes starPop {
  0%   { opacity: 0; transform: scale(0)   rotate(-20deg) translate(0, 0);       }
  16%  { opacity: 1; transform: scale(1.4) rotate( 15deg) translate(3px, -6px);  }
  100% { opacity: 0; transform: scale(0.7) rotate(230deg) translate(52px, -46px); }
}

@keyframes heartBeat {
  0%   { transform: scale(0.6); }
  50%  { transform: scale(1.15); }
  75%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

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

/* ── Prefer reduced motion fallback ── */
/* ══════════════════════════════════════════════════════════════
   AUDIO PROMPT
══════════════════════════════════════════════════════════════ */
#audioPrompt {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 9000;
  background: rgba(18, 6, 32, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(180, 120, 255, 0.26);
  border-radius: 14px;
  padding: 0.7rem 0.7rem 0.7rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  user-select: none;
  color: #d0b4ff;
  box-shadow: 0 4px 28px rgba(80, 20, 150, 0.4);
  animation: apSlideIn 0.5s cubic-bezier(0.34, 1.4, 0.64, 1) 0.6s both;
  max-width: clamp(240px, 90vw, 370px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 1, 1), opacity 0.4s ease, border-color 0.2s;
}

@keyframes apSlideIn {
  from { transform: translateX(-50%) translateY(140%); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

#audioPrompt.ap-hide {
  transform: translateX(-50%) translateY(140%) !important;
  opacity: 0 !important;
  pointer-events: none;
}

#audioPrompt:hover { border-color: rgba(200, 150, 255, 0.48); }

#apIcon {
  width: 34px;
  height: 24px;
  flex-shrink: 0;
  color: #b08ef0;
}

#apText {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

#apTitle {
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2d0ff;
  line-height: 1.25;
  white-space: nowrap;
}

#apSub {
  font-family: 'Nunito', sans-serif;
  font-size: 0.68rem;
  color: rgba(186, 148, 255, 0.58);
  letter-spacing: 0.02em;
}

#apDismiss {
  background: none;
  border: none;
  color: rgba(186, 148, 255, 0.38);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.15rem 0.25rem;
  border-radius: 50%;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
  margin-left: 0.1rem;
}

#apDismiss:hover {
  color: rgba(220, 185, 255, 0.88);
  background: rgba(200, 150, 255, 0.12);
}

/* ── Speed-up flash overlay ── */
#speedupFlash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: transparent;
}

@keyframes speedupFlash {
  0%   { background: rgba(230, 190, 255, 0.22); }
  45%  { background: rgba(230, 190, 255, 0.08); }
  100% { background: rgba(230, 190, 255, 0);    }
}

/* ── BPM beat sync — floaties responden a las notas LRC, no al beat ── */
body.note-active .floatie {
  filter: brightness(2.2) drop-shadow(0 0 7px currentColor);
  opacity: 0.32;
  transition: filter 0s, opacity 0s;
}

.bg-floaties .floatie {
  transition: filter 0.38s ease-out, opacity 0.38s ease-out;
}

body.note-active .server-icon,
body.beat-active .server-icon {
  filter: drop-shadow(0 0 10px rgba(200, 155, 245, 0.55));
  transition: filter 0s;
}

.server-icon { transition: filter 0.38s ease-out; }

/* ══════════════════════════════════════════════════════════════
   MUSIC TOGGLE
══════════════════════════════════════════════════════════════ */
#musicToggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(200, 160, 240, 0.35);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c8a0f0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease, background 0.2s, transform 0.15s,
              box-shadow 0.35s ease-out, border-color 0.35s ease-out;
}

#musicToggle.mt-visible {
  opacity: 1;
  visibility: visible;
}

#musicToggle:hover  { background: rgba(200, 160, 240, 0.22); transform: scale(1.1); }
#musicToggle:active { transform: scale(0.93); }

#musicToggle svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
  flex-shrink: 0;
}

#musicToggle .mt-icon-off            { display: none; }
#musicToggle.mt-muted .mt-icon-on    { display: none; }
#musicToggle.mt-muted .mt-icon-off   { display: block; }

body.note-active #musicToggle {
  box-shadow: 0 0 0 3px rgba(200, 155, 240, 0.4), 0 4px 22px rgba(130, 50, 230, 0.5);
  border-color: rgba(200, 155, 240, 0.65);
  transition: box-shadow 0s, border-color 0s;
}

/* ══════════════════════════════════════════════════════════════
   PRE-AUDIO — página oculta hasta aceptar permisos
══════════════════════════════════════════════════════════════ */
.hero,
main,
footer,
.bg-floaties {
  transition: opacity 0.75s ease;
}

body.pre-audio .hero,
body.pre-audio main,
body.pre-audio footer,
body.pre-audio .bg-floaties {
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

/* ══════════════════════════════════════════════════════════════
   LRC REVEAL SYSTEM
══════════════════════════════════════════════════════════════ */
.lrc-hidden {
  opacity: 0 !important;
  pointer-events: none;
}

.lrc-pop {
  animation: lrcPop 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

@keyframes lrcPop {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

.lrc-fade {
  animation: lrcFade 0.55s ease forwards;
}

@keyframes lrcFade {
  from { opacity: 0; }
  to   { opacity: 0.10; }
}

.lrc-in {
  animation: lrcIn 0.5s ease forwards;
}

@keyframes lrcIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── LRC Sección 2: destello en floaties e íconos ────────── */
.s2-pop-anim {
  animation: s2Pop 0.38s ease-out forwards !important;
}

@keyframes s2Pop {
  0%  { filter: brightness(1); }
  28% { filter: brightness(2.8) drop-shadow(0 0 9px var(--pop-color, #ffb6c1)); }
  100%{ filter: brightness(1); }
}

@media (prefers-reduced-motion: reduce) {
  .floatie,
  body:not(.loaded) .stat-number,
  body:not(.loaded) .role-count { animation: none; }

  * { transition-duration: 0.01ms !important; }
}
