:root {
    --bg-page: #c381f8b2;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --primary: #4f46e5;
    --border: #af03ff;
    --accent: #a876c5;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, sans-serif; }
body { background-color: var(--bg-page); color: var(--text-main); padding: 3rem 1rem; }
.container { max-width: 800px; margin: 0 auto; }

.header { text-align: center; margin-bottom: 3rem; }
.header h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.5px; }
.header p { color: var(--text-muted); margin-top: 0.5rem; font-size: 1.05rem; }

/* Acordeón */
.accordion-wrapper { display: flex; flex-direction: column; gap: 0.75rem; }
.accordion-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }

.accordion-trigger {
    width: 100%; padding: 1.25rem 1.5rem; background: none; border: none;
    text-align: left; font-size: 1.05rem; font-weight: 600; color: var(--text-main);
    cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    transition: background 0.2s;
}
.accordion-trigger:hover { background-color: var(--accent); }

.accordion-trigger::after {
    content: '▼'; font-size: 0.75rem; color: var(--text-muted); transition: transform 0.25s;
}
.accordion-item.open .accordion-trigger::after { transform: rotate(180deg); color: var(--primary); }

/* Animación de Despliegue */
.accordion-content {
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}
.accordion-item.open .accordion-content {
    max-height: 1000px; /* Suficiente espacio para el texto */
    transition: max-height 0.35s cubic-bezier(1, 0, 1, 0);
    border-top: 1px solid var(--border);
}

.content-body { padding: 1.5rem; font-size: 1rem; line-height: 1.6; color: #334155; }
.content-body p { margin-bottom: 0.75rem; }
.content-body ul { margin-left: 1.5rem; margin-top: 0.5rem; margin-bottom: 0.75rem; }
.content-body li { margin-bottom: 0.4rem; }
code { background: var(--accent); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 0.9rem; color: #db2777; }
pre { background: #0f172a; color: #f8fafc; padding: 1rem; border-radius: 8px; overflow-x: auto; margin-top: 0.75rem; }
pre code { background: none; color: inherit; padding: 0; }

/* Probador RegEx Interno */
.demo-box { background: var(--accent); padding: 1rem; border-radius: 8px; margin-top: 1.25rem; border: 1px dashed #cbd5e1; }
.demo-box label { display: block; font-size: 0.85rem; margin-bottom: 0.5rem; }
.demo-box input { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; outline: none; font-size: 0.95rem; margin-bottom: 0.5rem; }
.status-badge { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 4px 10px; border-radius: 4px; background: #e2e8f0; color: #475569; }
.status-badge.valid { background: #d1fae5; color: #065f46; }
.status-badge.invalid { background: #ffe4e6; color: #991b1b; }