:root {
    /* Paleta inspirada en Kanade / 25-ji Nightcord de. — azules de medianoche,
       un acento helado tipo luz de luna, nada de morado genérico de SaaS. */
    --bg: #0a0f1a;
    --bg-glow: radial-gradient(ellipse 900px 500px at 50% -10%, rgba(122, 214, 255, 0.10), transparent 60%);
    --surface: #111826;
    --surface-raised: #182234;
    --border: #223047;
    --text: #eaf2fb;
    --text-muted: #7d8ba3;
    --accent: #7ad6ff;
    --accent-soft: rgba(122, 214, 255, 0.14);
    --accent-hover: #9be2ff;
    --accent-text: #071019;
    --moon: #cdeeff;
    --green: #74fc66;
    --purple: #a888ff;
    --orange: #f3ab3c;
    --pink: #f9b6ff;
    --danger: #ff6b7a;
    /* Colores de Kanade (rosa) y de Nightcord (morado), aclarados para leerse sobre fondo oscuro */
    --kanade: #e58fb6;
    --nightcord: #a57ad8;
    --radius: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: linear-gradient(180deg, #0b0d1f 0%, #0c1024 45%, var(--bg) 100%);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: 'Baloo 2', 'Inter', sans-serif;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: 0.2px;
}

p { color: var(--text-muted); line-height: 1.55; }
code {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.88em;
    color: var(--moon);
}

.hidden { display: none !important; }

.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border: none;
    border-radius: 11px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn,
.btn:link,
.btn:visited,
.btn:hover,
.btn:active,
.btn:focus {
    text-decoration: none !important;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: linear-gradient(180deg, var(--accent-hover), var(--accent));
    color: var(--accent-text);
    box-shadow: 0 0 0 1px rgba(122, 214, 255, 0.35), 0 8px 24px -8px rgba(122, 214, 255, 0.55);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.btn-large { padding: 15px 30px; font-size: 1.05rem; }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(255, 107, 122, 0.4); }
.btn-danger:hover { background: rgba(255, 107, 122, 0.1); border-color: var(--danger); }
.btn-small { padding: 6px 13px; font-size: 0.85rem; }

/* --- Login --- */
.view-login {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
/* Todas las vistas van por encima del fondo fijo */
.view { position: relative; z-index: 1; }

/* --- Fondo de toda la web: cielo de las 25:00 --- */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.bg-aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: aurora-drift 26s ease-in-out infinite alternate;
}
.bg-aurora-1 { width: 620px; height: 420px; top: -160px; left: -120px; background: rgba(136, 68, 153, 0.55); }
.bg-aurora-2 { width: 560px; height: 380px; bottom: -180px; right: -100px; background: rgba(187, 102, 136, 0.4); animation-delay: -9s; }
.bg-aurora-3 { width: 480px; height: 320px; top: 30%; left: 38%; background: rgba(122, 214, 255, 0.14); animation-delay: -17s; }
@keyframes aurora-drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(60px, 40px) scale(1.15); }
}

.bg-stars { position: absolute; inset: 0; }
.bg-star {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px rgba(205, 238, 255, 0.8);
    animation: star-twinkle var(--tw, 4s) ease-in-out infinite;
    animation-delay: var(--tw-d, 0s);
}
@keyframes star-twinkle {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.9; }
}

.bg-shooting-star {
    position: absolute;
    top: 12%;
    left: 70%;
    width: 120px;
    height: 1.5px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), transparent);
    border-radius: 999px;
    transform: rotate(155deg);
    opacity: 0;
    animation: shooting-star 9s ease-in infinite;
    animation-delay: 3s;
}
.bg-shooting-star-2 { top: 34%; left: 30%; animation-delay: 7.5s; animation-duration: 13s; }
@keyframes shooting-star {
    0% { opacity: 0; translate: 0 0; }
    2% { opacity: 1; }
    8% { opacity: 0; translate: -260px 120px; }
    100% { opacity: 0; translate: -260px 120px; }
}

.bg-item {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.26;
    filter: drop-shadow(0 0 10px currentColor);
    animation: bg-float var(--t, 16s) ease-in-out infinite;
    animation-delay: var(--d, 0s);
}
.bg-item .bg-fill { fill: currentColor; }
.bg-pink { color: var(--kanade); }
.bg-purple { color: var(--nightcord); }
.bg-ice { color: var(--accent); }
.bg-noodle { opacity: 0.34; }
.bg-steam { animation: steam-rise 3.2s ease-in-out infinite; }
.bg-steam-2 { animation-delay: -1.1s; }
.bg-steam-3 { animation-delay: -2.2s; }
@keyframes steam-rise {
    0% { opacity: 0; transform: translateY(4px); }
    40% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-7px); }
}
.bg-clock {
    height: auto;
    width: auto;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 800;
    font-size: 2.6rem;
    letter-spacing: 2px;
    color: var(--nightcord);
    opacity: 0.22;
}
@keyframes bg-float {
    0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50% { transform: translateY(-18px) rotate(calc(var(--r, 0deg) * -1)); }
}

.login-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 75% 65% at 50% 45%, transparent 45%, rgba(10, 15, 26, 0.85) 100%);
    pointer-events: none;
}
.login-topbar {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    padding: 18px 120px 0 24px;
}
.login-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    width: 100%;
    max-width: 1120px;
    padding: 8px 8px 8px 16px;
    background: rgba(17, 24, 38, 0.72);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 999px;
}
.login-brand { display: flex; align-items: center; gap: 10px; }
.login-brand-name { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.15rem; color: var(--moon); }
.bot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    box-shadow: 0 0 14px rgba(122, 214, 255, 0.45);
}
.login-mascot {
    font-size: 22px;
    filter: drop-shadow(0 0 10px rgba(122, 214, 255, 0.5));
}
.login-nav-links { display: flex; gap: 4px; margin-right: auto; }
.nav-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font: 600 0.92rem 'Inter', sans-serif;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover { color: var(--text); background: var(--accent-soft); }
.login-nav .btn-small { border-radius: 999px; padding: 8px 20px; }

.login-hero {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: calc(100vh - 80px);
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 24px;
}
.hero-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(122, 214, 255, 0.25);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 18px;
}
.hero-title {
    display: flex;
    flex-direction: column;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.02;
    margin-bottom: 18px;
}
.hero-title-accent {
    /* El degradado se repite (empieza y termina en el mismo color) y se desliza
       un ancho completo por ciclo, así el color va recorriendo las letras sin saltos. */
    background: linear-gradient(90deg, var(--moon), var(--accent), var(--purple), var(--accent), var(--moon));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: title-shimmer 6s linear infinite;
}
@keyframes title-shimmer {
    from { background-position: 0% 50%; }
    to { background-position: 200% 50%; }
}
.hero-sub { font-size: 1.05rem; max-width: 460px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn-ghost { color: var(--text); background: rgba(17, 24, 38, 0.6); }
.hero-stats { display: flex; gap: 28px; margin-top: 38px; }
.hero-stat + .hero-stat { padding-left: 28px; border-left: 1px solid var(--border); }
.hero-stat-value { font-variant-numeric: tabular-nums; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.9rem; line-height: 1.1; color: var(--text); }
.hero-stat-label { font-size: 0.82rem; color: var(--text-muted); }

/* --- Escenario del personaje (Kanade + tarjetas flotantes) --- */
.hero-stage {
    position: relative;
    height: min(78vh, 640px);
    min-height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-glow {
    position: absolute;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 214, 255, 0.32), rgba(168, 136, 255, 0.12) 45%, transparent 70%);
    filter: blur(20px);
    animation: glow-pulse 6s ease-in-out infinite;
}
.hero-character {
    position: relative;
    z-index: 2;
    height: 88%;
    width: auto;
    filter: drop-shadow(0 0 24px rgba(122, 214, 255, 0.28)) drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5));
    animation: character-float 7s ease-in-out infinite;
    user-select: none;
    -webkit-user-drag: none;
}
.hero-spark {
    position: absolute;
    z-index: 1;
    color: var(--accent);
    filter: drop-shadow(0 0 8px rgba(122, 214, 255, 0.7));
    animation: avatar-twinkle 3s ease-in-out infinite;
}
.hero-spark-1 { top: 12%; left: 22%; font-size: 1.4rem; }
.hero-spark-2 { top: 30%; right: 18%; font-size: 1rem; animation-delay: 1s; }
.hero-spark-3 { bottom: 20%; left: 14%; font-size: 1.5rem; animation-delay: 2s; }

.float-card {
    position: absolute;
    z-index: 3;
    width: 230px;
    padding: 14px 16px;
    background: rgba(17, 24, 38, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(122, 214, 255, 0.22);
    border-radius: 16px;
    box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.7), 0 0 30px -12px rgba(122, 214, 255, 0.35);
    animation: card-float 6s ease-in-out infinite;
}
.float-card-body { transition: opacity 0.35s ease, transform 0.35s ease; }
.float-card.is-swapping .float-card-body { opacity: 0; transform: translateY(6px); }
.rotating-card { min-height: 128px; display: flex; flex-direction: column; }
.rotating-card .float-card-body { flex: 1; }
.float-card-dots { display: flex; justify-content: flex-end; gap: 4px; margin-top: 10px; }
.float-card-dot { width: 5px; height: 5px; border-radius: 999px; background: var(--border); transition: width 0.3s ease, background 0.3s ease; }
.float-card-dot.active { width: 16px; background: var(--accent); }
.float-card p { margin: 0; font-size: 0.82rem; line-height: 1.45; color: #b6c3d6; }
.float-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.float-card-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 1px solid rgba(122, 214, 255, 0.3);
    font-size: 0.95rem;
}
.float-card-title { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 0.98rem; color: var(--text); }
.float-card-1 { top: 4%; left: calc(50% + 70px); }
.float-card-2 { top: 60%; right: calc(50% + 100px); animation-delay: -2s; }
.float-card-3 { bottom: 4%; left: calc(50% + 90px); animation-delay: -4s; }
.float-card.mini-widget { background: rgba(17, 24, 38, 0.82); }

@keyframes character-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes card-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes glow-pulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.06); }
}
@keyframes avatar-twinkle {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

@media (max-width: 900px) {
    /* minmax(0, 1fr): sin esto la columna crece al ancho de su contenido y se sale de la pantalla */
    .login-hero { grid-template-columns: minmax(0, 1fr); text-align: center; padding-top: 28px; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-actions, .hero-stats { justify-content: center; }
    .hero-stage { height: 520px; min-height: 0; }
}
@media (max-width: 600px) {
    .login-topbar { padding: 70px 16px 0; }
    .login-nav { gap: 10px; }
    .login-nav-links .nav-link { padding: 8px; font-size: 0.85rem; }
    /* En móvil no cabe; el enlace a soporte sigue en la tarjeta del FAQ y en el chatbot */
    .login-nav-links #support-server-btn,
    .login-nav-links .nav-link-terms { display: none; }
    .login-brand-name { display: none; }
    .hero-stats { gap: 14px; }
    .hero-stat + .hero-stat { padding-left: 14px; }
    .hero-stat-value { font-size: 1.45rem; }
    .hero-stat-label { font-size: 0.74rem; }
    .hero-stage { height: 440px; }
    .float-card { width: 200px; padding: 11px 12px; }
    .float-card-1, .float-card-2 { display: none; }
    .bg-desktop-only { display: none; }
    .bg-item:not(.bg-clock) { width: 44px; height: 44px; }
    .bg-clock { font-size: 1.8rem; }
    .float-card-3 { left: calc(50% - 100px); bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-character, .float-card, .hero-glow, .hero-spark, .hero-title-accent,
    .bg-aurora, .bg-star, .bg-item, .bg-steam { animation: none; }
    .bg-shooting-star { display: none; }
}

/* --- Language switcher --- */
.lang-switcher {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 200;
}
.lang-current {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}
.lang-current:hover { border-color: var(--accent); }
.lang-chevron { color: var(--text-muted); font-size: 0.7rem; margin-left: 2px; }
.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px;
    min-width: 160px;
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}
.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.88rem;
    text-align: left;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.lang-option:hover { background: var(--accent-soft); }
.lang-option.active { color: var(--accent); font-weight: 700; }

/* --- Vistas de la app (selector, panel y comandos) --- */
/* Mismo lenguaje que el inicio: paneles de cristal sobre el cielo de fondo. */
.app-layout {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    min-height: 100vh;
    padding: 16px 16px 16px 16px;
}
.app-sidebar {
    position: sticky;
    top: 16px;
    width: 272px;
    flex-shrink: 0;
    height: calc(100vh - 32px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 18px;
    background: rgba(17, 24, 38, 0.72);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.8);
}
.app-sidebar-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 2px 4px;
}
.app-sidebar-section { display: flex; flex-direction: column; gap: 10px; }
.app-sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.app-sidebar-bottom .btn { width: 100%; }
.app-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 2px 4px; }
.app-brand-name { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.3rem; color: var(--moon); }
.app-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(165, 122, 216, 0.16), rgba(122, 214, 255, 0.08));
    border: 1px solid rgba(165, 122, 216, 0.3);
}
.app-user-avatar { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--accent); object-fit: cover; }
.app-user-info { display: flex; flex-direction: column; min-width: 0; }
.app-user-hello { font-size: 0.75rem; color: var(--text-muted); }
.app-user-name { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-logout:hover { color: var(--danger); border-color: var(--danger); }

.app-main { flex: 1; min-width: 0; max-width: 1000px; margin: 0 auto; padding: 34px 20px 110px; }
.app-header { margin-bottom: 28px; }
.app-title {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.3em;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 8px;
}
.app-sub { margin: 0; max-width: 620px; }
.app-empty {
    text-align: center;
    padding: 40px 20px;
    border: 1px dashed var(--border);
    border-radius: 20px;
    background: rgba(17, 24, 38, 0.5);
}
.app-empty-icon { font-size: 2.4rem; display: block; margin-bottom: 6px; filter: drop-shadow(0 6px 14px rgba(229, 143, 182, 0.4)); }
.app-empty p { max-width: 440px; margin: 0 auto 14px; }
.app-input {
    flex: 1;
    min-width: 0;
    background: rgba(10, 15, 26, 0.7);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 12px;
    color: var(--text);
    font: 0.88rem 'Inter', sans-serif;
}
.app-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Estadísticas (selector) */
.stat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(24, 34, 52, 0.6);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 11px 14px;
}
.stat-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--accent-soft);
    font-size: 1.05rem;
}
.stat-value { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--text); line-height: 1.2; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); }

/* Tarjetas de servidor */
.guild-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.guild-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 18px 18px;
    /* Sin backdrop-filter: con muchas tarjetas a la vez es muy pesado de dibujar */
    background: rgba(17, 24, 38, 0.86);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    animation: card-rise 0.4s ease both;
}
.guild-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 70px;
    background: linear-gradient(135deg, rgba(165, 122, 216, 0.28), rgba(122, 214, 255, 0.18));
    opacity: 0.8;
}
.guild-card:hover { transform: translateY(-4px); border-color: rgba(122, 214, 255, 0.55); box-shadow: 0 16px 40px -18px rgba(122, 214, 255, 0.55); }
.guild-card > * { position: relative; }
.guild-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--surface-raised);
    border: 3px solid rgba(13, 18, 32, 0.95);
    box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.7);
}
.guild-icon-initials {
    display: grid;
    place-items: center;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--moon);
    background: linear-gradient(135deg, var(--nightcord), #3b4f7a);
}
.guild-card-name { font-weight: 700; font-size: 0.98rem; line-height: 1.3; word-break: break-word; }
.guild-card-cta {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    transition: background 0.15s ease;
}
.guild-card:hover .guild-card-cta { background: rgba(122, 214, 255, 0.25); }
/* Servers sin Shiru: tarjeta en tono rosa con "Añadir a Shiru" */
a.guild-card { text-decoration: none; }
.guild-card-invite::before { background: linear-gradient(135deg, rgba(255, 143, 177, 0.22), rgba(165, 122, 216, 0.16)); }
.guild-card-invite .guild-icon { filter: grayscale(0.35); opacity: 0.85; transition: filter 0.18s ease, opacity 0.18s ease; }
.guild-card-invite .guild-card-cta { color: #ff9fbf; background: rgba(255, 143, 177, 0.14); }
.guild-card-invite:hover { border-color: rgba(255, 143, 177, 0.55); box-shadow: 0 16px 40px -18px rgba(255, 143, 177, 0.55); }
.guild-card-invite:hover .guild-card-cta { background: rgba(255, 143, 177, 0.26); }
.guild-card-invite:hover .guild-icon { filter: none; opacity: 1; }
/* Shiru está, pero con solo "Gestionar servidor" no se puede configurar */
.guild-card-locked { cursor: not-allowed; opacity: 0.55; }
.guild-card-locked:hover { transform: none; border-color: var(--border); box-shadow: none; }
.guild-card-locked .guild-card-cta { color: var(--text-muted); background: rgba(255, 255, 255, 0.06); }
@keyframes card-rise { from { opacity: 0; transform: translateY(10px); } }

/* Barra lateral del panel */
.back-link {
    align-self: flex-start;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font: 600 0.85rem 'Inter', sans-serif;
    padding: 6px 10px;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease;
}
.back-link:hover { color: var(--text); background: var(--accent-soft); }
.current-guild {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(165, 122, 216, 0.16), rgba(122, 214, 255, 0.08));
    border: 1px solid rgba(165, 122, 216, 0.3);
}
.current-guild .guild-icon { width: 46px; height: 46px; border-width: 2px; }
.current-guild-info { display: flex; flex-direction: column; min-width: 0; }
.current-guild-label { font-size: 0.72rem; color: var(--text-muted); }
#current-guild-name { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1.02rem; line-height: 1.2; word-break: break-word; }
.system-nav { display: flex; flex-direction: column; gap: 6px; }
.system-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: 1px solid transparent;
    color: var(--text-muted);
    font: 600 0.93rem 'Inter', sans-serif;
    text-align: left;
    padding: 11px 13px;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.system-btn:hover { background: rgba(122, 214, 255, 0.07); color: var(--text); }
.system-btn.active { background: var(--accent-soft); color: var(--moon); border-color: rgba(122, 214, 255, 0.35); }
.system-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(24, 34, 52, 0.8);
    font-size: 0.95rem;
}
.system-btn.active .system-icon { background: rgba(122, 214, 255, 0.2); }
.panel { animation: view-fade-in 0.3s ease both; }

/* Tarjetas del panel (bienvenida, despedida) */
.welcome-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.card {
    /* Sin backdrop-filter: con muchas tarjetas a la vez es muy pesado de dibujar */
    background: rgba(17, 24, 38, 0.86);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    transition: border-color 0.2s ease;
}
.card:focus-within { border-color: rgba(122, 214, 255, 0.45); }
.card-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.card-title-row h3 { margin: 0; font-size: 1.2rem; }
.card-title-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); }
.card label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin: 15px 0 6px; }
.card textarea, .card input[type="text"] {
    width: 100%;
    background: rgba(10, 15, 26, 0.7);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 10px 12px;
    color: var(--text);
    font: 0.9rem 'Inter', sans-serif;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card textarea:focus, .card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.card-hint { font-size: 0.78rem; margin: 12px 0 0; }
.card .btn { margin-top: 16px; width: 100%; }

/* Salas del teléfono */
.room-list { display: flex; flex-direction: column; gap: 14px; }
.room-card {
    /* Sin backdrop-filter: con muchas tarjetas a la vez es muy pesado de dibujar */
    background: rgba(17, 24, 38, 0.86);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px;
    animation: card-rise 0.35s ease both;
}
.room-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.room-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.2px;
    color: var(--tag, var(--moon));
    background: color-mix(in srgb, var(--tag, var(--moon)) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--tag, var(--moon)) 38%, transparent);
}
.tag-general { --tag: var(--moon); }
.tag-gaming { --tag: var(--green); }
.tag-roleplay { --tag: var(--purple); }
.tag-community { --tag: var(--orange); }
.tag-anime { --tag: var(--kanade); }
.tag-status-on { --tag: var(--green); }
.tag-status-off { --tag: var(--danger); }
.room-meta { font-size: 0.85rem; color: var(--text-muted); margin: 4px 0; }
.room-actions { display: flex; gap: 10px; flex-shrink: 0; align-items: center; }
.room-bans { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.room-section-title { font-size: 0.85rem; margin-bottom: 8px; }
.ban-row { display: flex; gap: 8px; align-items: center; font-size: 0.85rem; margin-bottom: 6px; }
.ban-row code { flex: 1; }
.ban-row-input { margin-top: 10px; }
.connection-icon { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.connection-name { flex: 1; }

/* --- Página de comandos --- */
.category-nav { display: flex; flex-direction: column; gap: 4px; }
.category-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: none;
    border: 1px solid transparent;
    color: var(--text-muted);
    font: 600 0.9rem 'Inter', sans-serif;
    text-align: left;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.category-btn:hover { background: rgba(122, 214, 255, 0.07); color: var(--text); }
.category-btn.active { background: var(--accent-soft); color: var(--moon); border-color: rgba(122, 214, 255, 0.35); }
.category-count {
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(24, 34, 52, 0.9);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}
.category-btn.active .category-count { background: rgba(122, 214, 255, 0.25); color: var(--moon); }

.commands-search-wrap { margin-bottom: 12px; }
.commands-search-wrap .faq-search { padding-right: 16px; }
.commands-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.commands-count { color: var(--text-muted); font-size: 0.86rem; }
.commands-count strong { color: var(--accent); }
.commands-legend { display: flex; gap: 8px; }
.commands-legend code { font-size: 0.78rem; }
.commands-page-title { font-size: 1.3rem; margin-bottom: 14px; }

.command-list { display: flex; flex-direction: column; gap: 12px; }
.command-card {
    /* Sin backdrop-filter: con muchas tarjetas a la vez es muy pesado de dibujar */
    background: rgba(17, 24, 38, 0.86);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    animation: card-rise 0.3s ease both;
}
.command-card:hover { border-color: rgba(122, 214, 255, 0.4); }
.command-card.expanded { border-color: rgba(122, 214, 255, 0.55); box-shadow: 0 0 36px -14px rgba(122, 214, 255, 0.5); }
.command-card-head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: none;
    border: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}
.command-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 1.35rem;
    background: linear-gradient(135deg, rgba(122, 214, 255, 0.28), rgba(165, 122, 216, 0.3));
    border: 1px solid rgba(122, 214, 255, 0.35);
    box-shadow: 0 8px 22px -10px rgba(122, 214, 255, 0.6);
}
.command-card-info { flex: 1; min-width: 0; }
.command-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-family: 'Baloo 2', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    line-height: 1.2;
    color: var(--text);
}
.command-slash { color: var(--accent); margin-right: 2px; }
.command-desc { font-size: 0.88rem; color: var(--text-muted); margin-top: 3px; }
.vote-tag, .sub-tag {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
}
.vote-tag { background: rgba(229, 143, 182, 0.16); color: var(--kanade); border: 1px solid rgba(229, 143, 182, 0.35); }
.sub-tag { background: rgba(165, 122, 216, 0.16); color: var(--nightcord); border: 1px solid rgba(165, 122, 216, 0.35); }
.command-toggle {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--accent-soft);
    border: 1px solid rgba(122, 214, 255, 0.3);
    color: var(--accent);
    transition: transform 0.25s ease, background 0.2s ease;
}
.command-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.command-card.expanded .command-toggle { transform: rotate(180deg); background: var(--accent); color: var(--accent-text); }
.command-card-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.command-card.expanded .command-card-body { grid-template-rows: 1fr; }
.command-card-body-inner { overflow: hidden; }
.command-card.expanded .command-card-body-inner { border-top: 1px solid var(--border); margin: 0 20px; padding: 18px 0 20px; }
.command-usage + .command-usage { margin-top: 18px; padding-top: 18px; border-top: 1px dashed rgba(34, 48, 71, 0.9); }
.command-sub-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 0.86rem; color: var(--text-muted); }
.command-sub-title code { font-size: 0.85rem; color: var(--moon); }
.command-usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.usage-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--accent);
}
.usage-label-icon { font-family: ui-monospace, monospace; font-size: 0.8rem; }
.code-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 14px;
    border-radius: 13px;
    background: rgba(6, 10, 18, 0.75);
    border: 1px solid var(--border);
}
.code-line code {
    flex: 1;
    min-width: 0;
    padding: 0;
    background: none;
    border: none;
    color: var(--text);
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: 0.86rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.code-dollar { color: var(--accent); font-family: ui-monospace, monospace; font-weight: 700; }
.copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 9px;
    border: 1px solid rgba(122, 214, 255, 0.3);
    background: var(--accent-soft);
    color: var(--moon);
    font: 600 0.78rem 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.copy-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.copy-btn:hover { background: rgba(122, 214, 255, 0.25); }
.copy-btn.copied { background: rgba(116, 252, 102, 0.16); border-color: rgba(116, 252, 102, 0.45); color: var(--green); }
.command-no-usage { margin: 0; font-size: 0.88rem; }
.command-details { margin-top: 16px; }
.command-details summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.command-details summary:hover { color: var(--text); }
.command-details-text { margin-top: 10px; font-size: 0.86rem; line-height: 1.6; color: #b6c3d6; }
.command-details-text code { color: var(--moon); }

@media (max-width: 900px) {
    .app-layout { flex-direction: column; padding: 12px; gap: 12px; }
    .app-sidebar { position: static; width: 100%; height: auto; }
    .app-sidebar-bottom { margin-top: 0; }
    .app-main { padding: 18px 8px 100px; width: 100%; }
    .welcome-grid { grid-template-columns: 1fr; }
    /* En el selector, primero los servidores (lo que se viene a buscar) y luego las estadísticas */
    .view-picker .app-main { order: -1; padding-bottom: 12px; }
    .view-picker .app-sidebar-section { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .view-picker .app-sidebar-title { grid-column: 1 / -1; }
    .view-picker .stat-row { flex-direction: column; text-align: center; gap: 6px; padding: 10px 6px; }
    .category-nav { flex-direction: row; flex-wrap: wrap; }
    .category-btn { padding: 7px 11px; }
}
@media (max-width: 600px) {
    /* Deja sitio arriba para el selector de idioma, que va fijo en la esquina */
    .app-layout { padding-top: 64px; }
    .command-usage-grid { grid-template-columns: 1fr; }
    .command-card-head { gap: 12px; padding: 16px; }
    .command-icon { width: 42px; height: 42px; font-size: 1.15rem; }
    .command-card.expanded .command-card-body-inner { margin: 0 16px; }
    .guild-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .guild-card { padding: 18px 12px 14px; }
    .guild-icon { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
    .guild-card, .command-card, .room-card, .panel { animation: none; }
}

/* --- Issue banners (falta de permisos, jerarquía de roles, etc) --- */
.issue-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255, 107, 122, 0.1);
    border: 1px solid var(--danger);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    line-height: 1.5;
}
.issue-banner-icon { font-size: 1.1rem; flex-shrink: 0; }
.issue-banner strong { color: var(--danger); }
.room-issue-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 107, 122, 0.18);
    color: var(--danger);
    margin-top: 6px;
}

/* --- Toggle switch --- */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--border); border-radius: 999px; transition: 0.15s;
}
.switch-slider::before {
    content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
    background: white; border-radius: 50%; transition: 0.15s;
}
.switch input:checked + .switch-slider { background: var(--accent); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }

/* --- Transición entre páginas --- */
.page-transition-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}
.page-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.page-transition-spinner {
    font-size: 2.4rem;
    filter: drop-shadow(0 0 20px rgba(122, 214, 255, 0.6));
    animation: page-transition-spin 1.1s ease-in-out infinite;
}
@keyframes page-transition-spin {
    0%, 100% { transform: scale(0.85) rotate(-8deg); opacity: 0.7; }
    50% { transform: scale(1.05) rotate(8deg); opacity: 1; }
}

/* Entrada suave del contenido de cada página una vez que se muestra. */
.view.view-animate-in {
    animation: view-fade-in 0.35s ease both;
}
@keyframes view-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Toast --- */
.toast {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-raised);
    border: 1px solid var(--accent);
    color: var(--text);
    padding: 12px 22px;
    border-radius: 11px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 12px 30px -10px rgba(122, 214, 255, 0.35);
    z-index: 100;
}

/* --- Mini widget (servidor: en línea / miembros) --- */
.mini-widget {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}
.mini-widget-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mini-widget-icon {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--border);
    object-fit: cover; flex-shrink: 0;
}
.mini-widget-name { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 0.92rem; }
.mini-widget-stats { display: flex; gap: 8px; }
.mini-widget-stat {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 8px 6px;
    text-align: center;
}
.mini-widget-stat-value { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1rem; }
.mini-widget-stat-label { font-size: 0.65rem; color: var(--text-muted); margin-top: 1px; }
.mini-widget-loading, .mini-widget-error { font-size: 0.78rem; color: var(--text-muted); text-align: center; padding: 6px 0; }
.online-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 4px; box-shadow: 0 0 7px var(--green); }

/* --- FAQ del login --- */
.faq-section {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 24px 110px;
}
.faq-heading { text-align: center; max-width: 620px; margin: 0 auto 36px; }
.faq-title {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 0.3em;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
}
.faq-sub { margin: 10px auto 0; }
.faq-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }

.faq-search-wrap { position: relative; margin-bottom: 14px; }
.faq-search-icon {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    left: 16px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 2;
    stroke-linecap: round;
}
.faq-search {
    width: 100%;
    height: 52px;
    padding: 0 120px 0 46px;
    background: rgba(17, 24, 38, 0.78);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font: 500 0.95rem 'Inter', sans-serif;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.faq-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.faq-count {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.faq-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.faq-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: rgba(17, 24, 38, 0.7);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font: 600 0.84rem 'Inter', sans-serif;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.faq-chip:hover { color: var(--text); border-color: var(--accent); }
.faq-chip.active { background: linear-gradient(180deg, var(--accent-hover), var(--accent)); border-color: transparent; color: var(--accent-text); }
.faq-chip-count { font-size: 0.72rem; opacity: 0.7; }

.faq-item {
    background: rgba(17, 24, 38, 0.72);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item:hover { border-color: rgba(122, 214, 255, 0.35); }
.faq-item.open { border-color: rgba(122, 214, 255, 0.5); box-shadow: 0 0 30px -12px rgba(122, 214, 255, 0.45); }
.faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: none;
    border: none;
    color: var(--text);
    font: 600 1rem 'Inter', sans-serif;
    text-align: left;
    cursor: pointer;
}
.faq-num { font-family: 'Baloo 2', sans-serif; font-weight: 800; color: var(--accent); opacity: 0.7; min-width: 24px; }
.faq-q-text { flex: 1; line-height: 1.4; }
.faq-q-text mark { background: rgba(122, 214, 255, 0.25); color: inherit; border-radius: 3px; padding: 0 1px; }
.faq-tag {
    flex-shrink: 0;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    color: var(--tag, var(--accent));
    background: color-mix(in srgb, var(--tag, var(--accent)) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--tag, var(--accent)) 35%, transparent);
}
.faq-tag-general { --tag: var(--accent); }
.faq-tag-setup { --tag: var(--green); }
.faq-tag-phone { --tag: var(--kanade); }
.faq-tag-moderation { --tag: var(--danger); }
.faq-tag-vote { --tag: var(--orange); }
.faq-tag-dashboard { --tag: var(--nightcord); }
.faq-chevron {
    position: relative;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-soft);
    transition: transform 0.3s ease, background 0.2s ease;
}
.faq-chevron::before,
.faq-chevron::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: translate(-50%, -50%);
}
.faq-chevron::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.open .faq-chevron { transform: rotate(45deg); background: rgba(122, 214, 255, 0.25); }
/* Truco de grid para animar la altura sin saber cuánto mide la respuesta */
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; }
.faq-a p { margin: 0; padding: 0 20px 18px 56px; color: #b6c3d6; font-size: 0.93rem; }
.faq-a strong { color: var(--text); }
.faq-empty { text-align: center; padding: 28px 16px; border: 1px dashed var(--border); border-radius: 16px; }
.faq-empty p { margin: 0 0 14px; }

.faq-side-card {
    position: sticky;
    top: 24px;
    text-align: center;
    padding: 26px 22px;
    border-radius: 20px;
    border: 1px solid rgba(229, 143, 182, 0.3);
    background:
        radial-gradient(circle at 50% 0%, rgba(229, 143, 182, 0.2), transparent 60%),
        linear-gradient(180deg, rgba(40, 26, 60, 0.85), rgba(17, 24, 38, 0.85));
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 50px -25px rgba(165, 122, 216, 0.6);
}
.faq-side-card h3 { font-size: 1.3rem; }
.faq-side-card p { font-size: 0.88rem; margin: 0 0 18px; }
.faq-side-card .btn { width: 100%; margin-top: 8px; }
.faq-side-art { position: relative; height: 90px; display: grid; place-items: center; margin-bottom: 6px; }
.faq-side-emoji { font-size: 3.4rem; filter: drop-shadow(0 8px 18px rgba(229, 143, 182, 0.45)); animation: character-float 4s ease-in-out infinite; }
.faq-side-steam { position: absolute; top: 0; font-size: 1.4rem; color: rgba(255, 255, 255, 0.5); animation: steam-rise 2.6s ease-in-out infinite; }

@media (max-width: 900px) {
    .faq-layout { grid-template-columns: 1fr; }
    .faq-side-card { position: static; }
}
@media (max-width: 600px) {
    .faq-section { padding: 24px 16px 100px; }
    .faq-q { gap: 10px; padding: 14px; font-size: 0.93rem; }
    .faq-tag { display: none; }
    .faq-a p { padding: 0 16px 16px 48px; }
    .faq-search { padding-right: 16px; }
    .faq-count { display: none; }
}

/* --- Chatbot --- */
.chatbot { position: fixed; right: 22px; bottom: 22px; z-index: 300; display: none; }
body[data-view="view-login"] .chatbot,
body[data-view="view-commands"] .chatbot { display: block; }

.chat-launcher {
    position: relative;
    width: 64px;
    height: 64px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--surface);
    cursor: pointer;
    box-shadow: 0 0 0 5px var(--accent-soft), 0 10px 30px -6px rgba(122, 214, 255, 0.55);
    transition: transform 0.2s ease;
}
.chat-launcher:hover { transform: scale(1.06); }
.chat-launcher::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    animation: launcher-ping 2.8s ease-out infinite;
    pointer-events: none;
}
.chatbot.open .chat-launcher::after { animation: none; opacity: 0; }
@keyframes launcher-ping {
    0% { transform: scale(1); opacity: 0.7; }
    80%, 100% { transform: scale(1.45); opacity: 0; }
}
.chat-avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.chat-launcher-img { background: var(--surface-raised); }

/* La sopa instantánea gira alrededor del botón; se contra-rota para quedarse derecha */
.chat-orbit { position: absolute; inset: -13px; pointer-events: none; animation: orbit-spin 6s linear infinite; }
.chat-orbit-noodle {
    position: absolute;
    top: -4px;
    left: 50%;
    width: 26px;
    height: 26px;
    margin-left: -13px;
    overflow: visible;
    filter: drop-shadow(0 2px 6px rgba(229, 143, 182, 0.7));
    animation: orbit-spin 6s linear infinite reverse;
}
.orbit-cup { fill: var(--kanade); stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; }
.orbit-rim { fill: #fff6fb; }
.orbit-band { stroke: rgba(255, 255, 255, 0.85); stroke-width: 1.6; stroke-linecap: round; }
.orbit-chop { stroke: #e9c48a; stroke-width: 1.6; stroke-linecap: round; }
.orbit-steam { fill: none; stroke: #fff; stroke-width: 1.3; stroke-linecap: round; animation: steam-rise 2.4s ease-in-out infinite; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }

.chat-teaser {
    position: absolute;
    right: 82px;
    bottom: 16px;
    white-space: nowrap;
    padding: 9px 14px;
    background: var(--text);
    color: var(--accent-text);
    font-weight: 600;
    font-size: 0.86rem;
    border-radius: 14px 14px 4px 14px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    animation: teaser-in 0.4s ease both;
}
@keyframes teaser-in { from { opacity: 0; transform: translateX(10px) scale(0.9); } }

.chat-panel {
    position: absolute;
    right: 0;
    bottom: 84px;
    width: 370px;
    height: 540px;
    max-height: calc(100vh - 130px);
    display: flex;
    flex-direction: column;
    background: rgba(13, 18, 32, 0.96);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(122, 214, 255, 0.28);
    border-radius: 22px;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.8), 0 0 40px -15px rgba(122, 214, 255, 0.4);
    overflow: hidden;
    transform-origin: bottom right;
    opacity: 0;
    transform: translateY(12px) scale(0.92);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}
.chatbot.open .chat-panel {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(165, 122, 216, 0.14), transparent);
}
.chat-header-avatar { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--accent); flex-shrink: 0; }
.chat-online-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--green);
    border: 2px solid #0d1220;
}
.chat-header-info { flex: 1; min-width: 0; }
.chat-title { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.chat-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    font-weight: 800;
    vertical-align: 2px;
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--accent);
    color: var(--accent-text);
}
.chat-subtitle { font-size: 0.76rem; color: var(--accent); }
.chat-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-raised);
    color: var(--text-muted);
    display: grid;
    place-items: center;
    cursor: pointer;
}
.chat-icon-btn:hover { color: var(--text); border-color: var(--accent); }
.chat-icon-btn svg, .chat-send svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { display: flex; flex-direction: column; max-width: 86%; animation: msg-in 0.25s ease both; }
.chat-msg-bot { align-self: flex-start; }
.chat-msg-user { align-self: flex-end; align-items: flex-end; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }
.chat-bubble { padding: 10px 13px; font-size: 0.88rem; line-height: 1.5; overflow-wrap: anywhere; }
.chat-msg-bot .chat-bubble { background: var(--surface-raised); border: 1px solid var(--border); border-radius: 16px 16px 16px 5px; color: #d3dded; }
.chat-msg-user .chat-bubble { background: linear-gradient(180deg, var(--accent-hover), var(--accent)); color: var(--accent-text); border-radius: 16px 16px 5px 16px; font-weight: 500; }
.chat-bubble strong { color: var(--text); }
.chat-msg-user .chat-bubble strong { color: inherit; }
.chat-time { font-size: 0.68rem; color: var(--text-muted); margin: 4px 4px 0; }
.chat-link { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 600; text-decoration: none; }
.chat-link:hover { text-decoration: underline; }
.chat-typing .chat-bubble { display: flex; gap: 4px; padding: 13px 14px; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); animation: typing-dot 1.2s ease-in-out infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-dot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.chat-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.chat-suggestions:empty { display: none; }
.chat-suggestion {
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(122, 214, 255, 0.35);
    background: var(--accent-soft);
    color: var(--moon);
    font: 500 0.78rem 'Inter', sans-serif;
    cursor: pointer;
}
.chat-suggestion:hover { border-color: var(--accent); color: var(--text); }
.chat-input-row { display: flex; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--border); }
.chat-input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font: 0.88rem 'Inter', sans-serif;
}
.chat-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chat-send {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    border: none;
    background: linear-gradient(180deg, var(--accent-hover), var(--accent));
    color: var(--accent-text);
    display: grid;
    place-items: center;
    cursor: pointer;
}
.chat-send:hover { filter: brightness(1.08); }

@media (max-width: 600px) {
    .chatbot { right: 14px; bottom: 14px; }
    .chat-panel { width: calc(100vw - 28px); height: min(560px, calc(100vh - 110px)); bottom: 80px; }
    .chat-teaser { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .chat-orbit, .chat-orbit-noodle, .orbit-steam, .chat-launcher::after, .faq-side-emoji, .faq-side-steam { animation: none; }
}


/* --- Pie de página (login y términos) --- */
.site-footer {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 22px;
    padding: 22px 24px 34px;
    border-top: 1px solid rgba(34, 48, 71, 0.7);
    font-size: 0.85rem;
    color: var(--text-muted);
}
.site-footer a { color: var(--text-muted); text-decoration: none; transition: color 0.15s ease; }
.site-footer a:hover { color: var(--accent); }

/* --- Términos y privacidad (/terms) --- */
.terms-page {
    background: linear-gradient(180deg, #0b0d1f 0%, #0c1024 40%, var(--bg) 100%);
    background-attachment: fixed;
}
.terms-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.terms-topbar { padding-right: 24px; }
.terms-brand { text-decoration: none; }
.terms-lang-btn { border-radius: 999px; }

.terms-wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 48px 24px 60px; }
.terms-hero { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.terms-title { font-size: clamp(2.3rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.05; margin-bottom: 10px; }
.terms-updated { margin: 0 0 16px; font-size: 0.85rem; color: var(--accent); }
.terms-intro { margin: 0; font-size: 1rem; }

.terms-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 48px; }
.terms-summary-card {
    padding: 18px;
    border-radius: 16px;
    background: rgba(17, 24, 38, 0.72);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
}
.terms-summary-card span { font-size: 1.5rem; }
.terms-summary-card h3 { font-size: 1.02rem; margin: 8px 0 4px; }
.terms-summary-card p { margin: 0; font-size: 0.84rem; }

.terms-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; align-items: start; }
.terms-toc { position: sticky; top: 24px; }
.terms-toc-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.terms-toc nav { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--border); }
.terms-toc a {
    padding: 6px 12px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.86rem;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.terms-toc a:hover { color: var(--text); }
.terms-toc a.active { color: var(--accent); border-left-color: var(--accent); }

.terms-content section {
    scroll-margin-top: 24px;
    padding: 26px 28px;
    margin-bottom: 16px;
    border-radius: 18px;
    background: rgba(17, 24, 38, 0.72);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
}
.terms-content h2 { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; margin-bottom: 12px; }
.terms-num { font-size: 0.95rem; font-weight: 800; color: var(--accent); opacity: 0.75; }
.terms-content p, .terms-content li { color: #b6c3d6; font-size: 0.94rem; line-height: 1.65; }
.terms-content p { margin: 0 0 12px; }
.terms-content p:last-child { margin-bottom: 0; }
.terms-content ul { margin: 0 0 12px; padding-left: 20px; }
.terms-content li { margin-bottom: 6px; }
.terms-content li::marker { color: var(--kanade); }
.terms-content strong { color: var(--text); }
.terms-content a:not(.btn) { color: var(--accent); }
.terms-content .btn { margin-top: 8px; }
.terms-content .terms-note { margin-top: 14px; }

.terms-table-wrap { overflow-x: auto; margin-top: 6px; border: 1px solid var(--border); border-radius: 12px; }
.terms-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.terms-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--surface-raised);
    color: var(--text);
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
}
.terms-table td { padding: 11px 14px; border-top: 1px solid var(--border); color: #b6c3d6; vertical-align: top; line-height: 1.55; }
.terms-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.terms-table tr:hover td { background: rgba(122, 214, 255, 0.04); }

@media (max-width: 900px) {
    .terms-summary { grid-template-columns: repeat(2, 1fr); }
    .terms-layout { grid-template-columns: minmax(0, 1fr); }
    .terms-toc { display: none; }
}
@media (max-width: 600px) {
    .terms-topbar { padding: 18px 16px 0; }
    .terms-wrap { padding: 32px 16px 40px; }
    .terms-summary { grid-template-columns: 1fr; }
    .terms-content section { padding: 20px 18px; }
    .terms-table td:first-child { white-space: normal; }
}
