/* =========================================================
   Botixito · tema visual
   Capa de diseño que se carga después de style.css.
   Nunca uses emojis en la interfaz: usa los iconos SVG de /static/js/icons.js
   ========================================================= */
:root {
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bg: #090b12;
  --bg-2: #0d1019;
  --panel: #121622;
  --panel-2: #1a1f2e;
  --border: #232a3b;
  --border-2: #303a52;
  --text: #eef0f7;
  --muted: #8d95ab;
  --primary: #6c63ff;
  --primary-2: #5a51f0;
  --accent: #b44cff;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --grad: linear-gradient(135deg, #6c63ff 0%, #b44cff 55%, #f472b6 100%);
  --grad-soft: linear-gradient(135deg, rgba(108, 99, 255, .18), rgba(180, 76, 255, .12));
  --ring: 0 0 0 3px rgba(108, 99, 255, .28);
  --glow: 0 10px 40px -10px rgba(108, 99, 255, .55);
  --radius: 16px;
}

/* ---------- Fondo general ---------- */
body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(108, 99, 255, .14), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(180, 76, 255, .10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  letter-spacing: -.005em;
}
::selection { background: rgba(108, 99, 255, .45); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
h1, h2, h3 { letter-spacing: -.02em; }
.accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Botones ---------- */
.btn { border-radius: 11px; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; }
.btn-primary { background: var(--grad); background-size: 140% 140%; box-shadow: 0 6px 20px -8px rgba(108, 99, 255, .8); }
.btn-primary:hover:not(:disabled) { background: var(--grad); background-size: 140% 140%; background-position: 100% 0; transform: translateY(-1px); box-shadow: var(--glow); }
.btn-ghost { background: rgba(255, 255, 255, .03); border-color: var(--border-2); backdrop-filter: blur(6px); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .07); border-color: #3d4864; }
.btn-dashed { border-radius: 12px; background: rgba(108, 99, 255, .04); }
.btn-dashed:hover { background: rgba(108, 99, 255, .1); }
.btn-glow { position: relative; }
.btn-lg { padding: 14px 26px; border-radius: 13px; }

/* ---------- Topbar ---------- */
.topbar { background: rgba(9, 11, 18, .7); backdrop-filter: saturate(160%) blur(14px); border-bottom-color: rgba(255, 255, 255, .06); }
.brand img { box-shadow: 0 0 0 2px rgba(108, 99, 255, .5); }
.topnav a { border-radius: 10px; }
.topnav a.active { color: #fff; background: rgba(255, 255, 255, .06); }

/* ---------- Tarjetas con borde degradado ---------- */
.card, .feature, .step, .stat, .guild-card, .cmd-card, .status-grid .card, .faq details, .rank-row, .podium-item {
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .02) 40%, rgba(108, 99, 255, .18)) border-box;
  border: 1px solid transparent;
}
.card { border-radius: var(--radius); box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 40px -30px rgba(0, 0, 0, .8); }
.sub-card, .list-item, .cat, .question, .module, .rule, .ticket-row { border-radius: 13px; background: rgba(9, 11, 18, .55); }
.input { background: rgba(9, 11, 18, .7); border-color: var(--border); border-radius: 10px; }
.input:hover { border-color: var(--border-2); }
.input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.switch { background: #3a4155; }
.switch:checked { background: linear-gradient(135deg, #22c55e, #16a34a); }
.chip { background: rgba(255, 255, 255, .05); }
.note { border-radius: 13px; }
.note-info { background: linear-gradient(135deg, rgba(108, 99, 255, .12), rgba(34, 211, 238, .05)); border-color: rgba(108, 99, 255, .35); }

/* ---------- Animación de entrada ---------- */
/* Solo desplaza (nunca oculta): si el navegador congela la animación, el contenido sigue visible */
@keyframes fade-up { from { transform: translateY(10px); } to { transform: none; } }
#app > * { animation: fade-up .35s ease both; }
#app > *:nth-child(2) { animation-delay: .04s; }
#app > *:nth-child(3) { animation-delay: .08s; }
#app > *:nth-child(4) { animation-delay: .12s; }
#app > *:nth-child(n + 5) { animation-delay: .16s; }
.reveal { transform: translateY(18px); transition: transform .6s ease; }
.reveal.visible { transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   INICIO
   ========================================================= */
.hero { position: relative; overflow: hidden; padding: 96px 16px 72px; background: none; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; animation: orb 14s ease-in-out infinite; }
.orb-1 { width: 420px; height: 420px; background: #6c63ff; top: -120px; left: -80px; }
.orb-2 { width: 360px; height: 360px; background: #b44cff; top: 40px; right: -100px; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: #22d3ee; bottom: -160px; left: 40%; opacity: .25; animation-delay: -9s; }
@keyframes orb { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(40px, 30px) scale(1.08); } 66% { transform: translate(-30px, 20px) scale(.95); } }
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(36px, 5.6vw, 64px); font-weight: 800; line-height: 1.04; }
.lead { font-size: 18.5px; color: #c4c9d8; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(108, 99, 255, .12); border: 1px solid rgba(108, 99, 255, .35); color: #d4d1ff; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; backdrop-filter: blur(6px); }
.pill .icon { color: #b9b4ff; }
.hero-trust { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust .icon { color: #4ade80; }

/* Ventana de ejemplo del panel */
.mock-window { border-radius: 18px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(18, 22, 34, .85); backdrop-filter: blur(10px); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), var(--glow); animation: float 7s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: perspective(1200px) rotateY(-9deg) rotateX(5deg) translateY(0); } 50% { transform: perspective(1200px) rotateY(-9deg) rotateX(5deg) translateY(-12px); } }
.mock-side .on { background: var(--grad-soft); }
.mock-stats b { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); }
.mock-chart { background: rgba(255, 255, 255, .03); }
.mock-chart i { background: var(--grad); }
.mock-toast { position: absolute; right: -14px; bottom: 28px; display: flex; align-items: center; gap: 8px; background: rgba(18, 22, 34, .95); border: 1px solid rgba(74, 222, 128, .4); color: #d1fae5; padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 600; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .9); animation: float-small 5s ease-in-out infinite; }
.mock-toast .icon { color: #4ade80; }
@keyframes float-small { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero-card { position: relative; }

/* Cifras */
.stats-strip { margin-top: -10px; position: relative; z-index: 2; }
.stats-strip div { background: rgba(18, 22, 34, .7); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .07); border-radius: 18px; padding: 22px; }
.stats-strip b { font-size: 34px; font-weight: 800; background: linear-gradient(180deg, #fff, #b8b3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Secciones */
.section-head { margin: 80px 0 30px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
.eyebrow { align-self: center; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #a5a0ff; }
.feature { padding: 24px; border-radius: 18px; transition: transform .25s, box-shadow .25s; position: relative; overflow: hidden; }
.feature::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 180px; height: 180px; border-radius: 50%; background: var(--tone, #6c63ff); opacity: 0; filter: blur(50px); transition: opacity .3s; }
.feature:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .9); }
.feature:hover::after { opacity: .25; }
.feature-icon { width: 48px; height: 48px; border-radius: 14px; color: #fff; background: var(--tone, #6c63ff); box-shadow: 0 10px 24px -10px var(--tone, #6c63ff); }
.feature-icon .icon { width: 24px; height: 24px; }
.feature b { font-size: 16.5px; }
.tone-1 { --tone: #6c63ff; } .tone-2 { --tone: #ef4444; } .tone-3 { --tone: #22c55e; } .tone-4 { --tone: #06b6d4; } .tone-5 { --tone: #f59e0b; }
.tone-6 { --tone: #b44cff; } .tone-7 { --tone: #ec4899; } .tone-8 { --tone: #3b82f6; } .tone-9 { --tone: #14b8a6; }

/* Pasos */
.steps { counter-reset: step; position: relative; }
.step { border-radius: 18px; padding: 26px; }
.step span { background: var(--grad); box-shadow: var(--glow); width: 38px; height: 38px; font-size: 16px; }

/* Bloque destacado del panel */
.showcase { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.showcase-list { display: flex; flex-direction: column; gap: 14px; }
.showcase-item { display: flex; gap: 14px; align-items: flex-start; }
.showcase-item .feature-icon { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.showcase-item .feature-icon .icon { width: 20px; height: 20px; }
.showcase-item p { color: var(--muted); font-size: 14.5px; }
.showcase-frame { border-radius: 20px; padding: 18px; background: rgba(18, 22, 34, .7); border: 1px solid rgba(255, 255, 255, .08); box-shadow: var(--glow); }
.showcase-frame .preview { border-radius: 14px; }

.faq details { border-radius: 14px; padding: 16px 20px; }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .2s; color: var(--muted); }
.faq details[open] summary .icon { transform: rotate(180deg); }

.cta { position: relative; overflow: hidden; background: radial-gradient(600px 240px at 50% 0%, rgba(180, 76, 255, .35), transparent 70%), linear-gradient(135deg, rgba(108, 99, 255, .25), rgba(18, 22, 34, .9)); border: 1px solid rgba(108, 99, 255, .35); border-radius: 26px; padding: 56px 20px; }
.cta h2 { font-size: clamp(24px, 3.4vw, 36px); font-weight: 800; }

.footer { background: rgba(9, 11, 18, .8); border-top-color: rgba(255, 255, 255, .06); }

/* =========================================================
   LISTA DE SERVIDORES
   ========================================================= */
.guild-card { position: relative; overflow: hidden; padding: 0 0 18px; border-radius: 18px; transition: transform .2s, box-shadow .2s; }
.guild-card::before { content: ""; display: block; width: 100%; height: 64px; background: var(--grad); opacity: .55; margin-bottom: -36px; }
.guild-card.is-missing::before { background: linear-gradient(135deg, #2a3145, #1a1f2e); }
.guild-card .guild-icon, .guild-card .guild-icon-fallback { position: relative; border: 4px solid var(--panel); width: 76px; height: 76px; }
.guild-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(108, 99, 255, .4); }
.guild-card .guild-name, .guild-card .muted, .guild-card .btn { margin: 0 14px; }

/* =========================================================
   PANEL DEL SERVIDOR
   ========================================================= */
.sidebar { background: rgba(13, 16, 25, .85); backdrop-filter: blur(12px); border-right-color: rgba(255, 255, 255, .06); }
.side-nav a { position: relative; border-radius: 10px; transition: background .15s, color .15s; }
.side-nav a:hover { background: rgba(255, 255, 255, .04); }
.side-nav a.active { background: var(--grad-soft); color: #fff; }
.side-nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.side-nav a.active .side-ico { color: #c7c3ff; }
.sidebar-guild { background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .05); }

/* Cabecera de cada sección con icono */
.page-head { align-items: center; padding: 6px 0 4px; }
.page-title { display: flex; gap: 16px; align-items: center; }
.page-icon { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: var(--glow); }
.page-icon .icon { width: 26px; height: 26px; }
.page-head h1 { font-size: 26px; font-weight: 800; }

/* Tarjeta Publicar en Discord */
.publish-card { border-radius: var(--radius); }
.card.publish-card {
  background:
    linear-gradient(135deg, rgba(108, 99, 255, .14), rgba(18, 22, 34, .96) 45%) padding-box,
    linear-gradient(135deg, rgba(108, 99, 255, .7), rgba(180, 76, 255, .35), rgba(255, 255, 255, .05)) border-box;
  border: 1px solid transparent;
}
.publish-card.compact { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: linear-gradient(135deg, rgba(108, 99, 255, .12), rgba(9, 11, 18, .6)); border: 1px solid rgba(108, 99, 255, .35); }
.publish-head { display: flex; gap: 14px; align-items: center; }
.publish-head h2 { font-size: 18px; }
.publish-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; box-shadow: var(--glow); }
.compact .publish-icon { width: 32px; height: 32px; border-radius: 10px; }
.publish-icon .icon { width: 18px; height: 18px; }
.publish-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.publish-select { position: relative; display: flex; align-items: center; }
.publish-select > .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.publish-select select { padding-left: 34px; }
.published-list { display: flex; flex-direction: column; gap: 6px; }
.published-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 10px 8px 12px; border-radius: 10px; background: rgba(9, 11, 18, .55); border: 1px solid var(--border); }
.published-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .15); }
.published-channel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Paneles de servicio */
.duty-list { display: flex; flex-direction: column; gap: 8px; }
.duty-item { display: grid; grid-template-columns: 10px auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(9, 11, 18, .55); border: 1px solid var(--border); }
.duty-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .15); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(74, 222, 128, .15); } 50% { box-shadow: 0 0 0 7px rgba(74, 222, 128, .05); } }
.hbar { grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) auto; }
.hbar-wide { min-width: 70px; }

/* Resumen */
.stat { border-radius: 16px; transition: transform .2s, box-shadow .2s; }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(108, 99, 255, .45); }
.stat-icon { border-radius: 12px; }
.bar i { background: var(--grad); }
.progress i { background: linear-gradient(90deg, #6c63ff, #22c55e); }

/* Barra de guardar y avisos */
.savebar { background: rgba(13, 16, 25, .92); backdrop-filter: blur(14px); border: 1px solid rgba(108, 99, 255, .4); border-radius: 16px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9), var(--glow); }
.toast { background: rgba(26, 31, 46, .96); backdrop-filter: blur(10px); border-radius: 12px; }

/* Vista previa de Discord con un poco más de profundidad */
.preview { border: 1px solid rgba(255, 255, 255, .06); box-shadow: 0 20px 40px -30px rgba(0, 0, 0, .9); }

/* Páginas públicas */
.status-hero { border-radius: 18px; }
.legal { border-radius: 18px; }
.cmd-card { border-radius: 14px; transition: transform .2s; }
.cmd-card:hover { transform: translateY(-2px); }
.pill-btn.active { background: var(--grad); border-color: transparent; }

@media (max-width: 1000px) {
  .showcase { grid-template-columns: 1fr; }
  .mock-toast { right: 8px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 64px; }
  .publish-row { grid-template-columns: 1fr; }
  .published-item { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .published-item a { display: none; }
  .page-icon { width: 44px; height: 44px; border-radius: 13px; }
}

.showcase-title { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; margin: 10px 0 18px; }
.page-title p { margin-top: 4px; max-width: 760px; }

/* ---------- Registro de actividad de servicio ---------- */
.register-filters { grid-template-columns: minmax(0, 1fr) 220px auto; }
.day-bars { height: 120px; gap: 3px; }
.day-bars .bar span { font-size: 10px; }
.user-bars { height: 90px; }
.user-bars .bar i { background: linear-gradient(#22d3ee, #6c63ff); }
.service-row summary { grid-template-columns: minmax(0, 1.4fr) 90px 80px 110px 110px 90px; }
.service-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.service-user b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duty-item-wide { grid-template-columns: 10px auto minmax(0, 1fr) auto; }
@media (max-width: 760px) {
  .register-filters { grid-template-columns: 1fr; }
  .service-row summary { grid-template-columns: minmax(0, 1fr) auto; }
  .service-row summary > span:nth-child(n+3) { display: none; }
  .duty-item-wide { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .duty-item-wide .muted { display: none; }
}
