/* =========================================
   NATURIZE AI - HOME MASTER CSS
   ========================================= */

:root {
    --bg: #0f1220; 
    --card: #171a2b; 
    --card-light: #1f2340;
    --primary: #7c8cff; 
    --primary-hover: #6a7cff;
    --text: #e6e8f0; 
    --muted: #a0a4c0;
    --border: rgba(255, 255, 255, 0.08); 
    --radius: 16px;
}

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

/* --- 1. ESTRUCTURA BASE & SCROLL --- */
@media (min-width: 769px) {
    html { scrollbar-gutter: stable; }
}

html { 
    overflow-x: hidden; 
    width: 100%;
}

body {
    min-height: 100vh; 
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
    background: radial-gradient(1200px 600px at 20% -10%, #1a1f3d 0%, transparent 60%),
                radial-gradient(1000px 500px at 80% 10%, #22286b 0%, transparent 55%), var(--bg);
    color: var(--text); 
    display: flex; 
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto; 
}

.container {
    flex: 1; 
    width: 100%; 
    max-width: 1000px; 
    margin: 0 auto;
    display: flex; 
    flex-direction: column; 
    padding: 32px 24px;
    box-sizing: border-box;
}

/* --- 2. HEADER & LOGO --- */
.header { text-align: center; margin-bottom: 28px; }
.logo { font-size: 36px; font-weight: 700; letter-spacing: -0.5px; }
.tagline { margin-top: 8px; color: var(--muted); font-size: 16px; }

/* --- 3. EDITOR CARD --- */
.card {
    width: 100%; 
    background: linear-gradient(180deg, var(--card-light), var(--card));
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.select-group label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
    display: block;
}

.custom-select {
    background: #0c0f1f;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.custom-select:hover { border-color: rgba(124, 140, 255, 0.4); }
.custom-select:focus { border-color: var(--primary); }

textarea {
    width: 100%; min-height: 200px; resize: vertical; background: #0c0f1f;
    border: 1px solid var(--border); border-radius: 12px; padding: 16px;
    color: var(--text); font-size: 15px; line-height: 1.6; outline: none; font-family: inherit;
    margin-top: 5px;
}
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(124,140,255,0.15); }

/* --- 4. ACCIONES & BOTONES --- */
.actions {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 16px; gap: 12px; flex-wrap: wrap;
}

.btn-group { display: flex; align-items: center; gap: 15px; }
.hint { font-size: 13px; color: var(--muted); }

.btn {
    display: inline-flex; align-items: center; gap: 10px; 
    background: linear-gradient(135deg, var(--primary), #9aa7ff);
    color: #0b0e1a; border: none; border-radius: 999px; padding: 12px 24px; 
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; 
    box-shadow: 0 8px 30px rgba(124,140,255,0.35); text-decoration: none;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 36px rgba(124,140,255,0.45); }

.btn-spinner {
    display: none; width: 20px; height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1); 
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- 5. RESULTADO & BOTÓN COPIAR --- */
.output-box { 
    background: #0c0f1f; border: 1px solid var(--border); 
    border-radius: 12px; padding: 24px 28px; margin-top: 10px; 
    white-space: pre-wrap; word-break: break-word; line-height: 1.6; color: var(--text);
}

.btn-copy {
    appearance: none; -webkit-appearance: none; background: transparent; 
    border: 1px solid rgba(124, 140, 255, 0.3); 
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; 
    border-radius: 999px; color: var(--primary); font-size: 13px; 
    font-weight: 600; cursor: pointer; outline: none; transition: all 0.2s ease;
}

.btn-copy:hover {
    background: rgba(124, 140, 255, 0.1); border-color: var(--primary);
    transform: translateY(-1px); box-shadow: 0 4px 12px rgba(124, 140, 255, 0.15);
}

.btn-copy.copied { background: rgba(124, 240, 170, 0.1); border-color: #7cf0aa; color: #7cf0aa; }


/* =================================================================
   COOKED SECTION: SEO & MARKETING
   (Enhanced visuals, better readability, no layout breakage)
   ================================================================= */

/* --- 6. SECCIÓN SEO PREMIUM --- */
.seo-container {
    margin-top: 80px;
    padding: 80px 0;
    /* Added a subtle radial light to highlight the content */
    background: radial-gradient(circle at center top, rgba(124, 140, 255, 0.08) 0%, transparent 60%);
    border-top: 1px solid var(--border);
    width: 100%;
    position: relative;
}

.seo-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 70px auto;
    padding: 0 20px;
}

.badge-premium {
    background: rgba(124, 140, 255, 0.08);
    color: #9aa7ff;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 1px solid rgba(124, 140, 255, 0.2);
    box-shadow: 0 0 20px rgba(124, 140, 255, 0.05); /* Subtle Glow */
    display: inline-block;
    margin-bottom: 24px;
}

.seo-title {
    font-size: clamp(2rem, 5vw, 2.8rem); /* Responsive typography */
    color: #fff;
    margin-bottom: 24px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.seo-title strong {
    color: var(--primary);
    /* Better gradient for the keyword */
    background: linear-gradient(135deg, #fff 10%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.seo-subtitle {
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 650px;
    margin: 0 auto;
}

.seo-grid {
    display: grid;
    /* Maintained your responsiveness logic */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 80px;
    padding: 0 24px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.seo-card {
    background: rgba(31, 35, 64, 0.4); /* More transparent for glass feel */
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 32px;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: left;
    position: relative;
    overflow: hidden;
}

/* Hover effect to make it feel premium */
.seo-card:hover {
    transform: translateY(-8px);
    background: rgba(31, 35, 64, 0.7);
    border-color: rgba(124, 140, 255, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Optional: Top glow line on hover */
.seo-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.seo-card:hover::before { opacity: 1; }

.seo-icon-box { 
    font-size: 2.5rem; 
    margin-bottom: 24px; 
    filter: drop-shadow(0 0 15px rgba(124, 140, 255, 0.2)); /* Icon glow */
}

.seo-card h3 { 
    color: #fff; 
    margin-bottom: 12px; 
    font-size: 1.25rem; 
    font-weight: 700;
}

.seo-card p { 
    color: var(--muted); 
    line-height: 1.65; 
    font-size: 0.95rem; 
}

/* --- 7. TRUST BANNER --- */
.trust-banner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(90deg, rgba(124, 140, 255, 0.03), rgba(124, 140, 255, 0.08), rgba(124, 140, 255, 0.03));
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(124, 140, 255, 0.1);
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.trust-item { 
    text-align: center; 
    flex: 1;
    min-width: 150px;
}

.trust-stat { 
    display: block; 
    font-size: 2.2rem; 
    font-weight: 800; 
    color: #fff;
    margin-bottom: 5px;
    text-shadow: 0 0 30px rgba(124, 140, 255, 0.3);
}

.trust-label { 
    color: var(--primary); 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 1.2px; 
    font-weight: 700;
}

.trust-divider { 
    width: 1px; 
    height: 50px; 
    background: linear-gradient(to bottom, transparent, var(--border), transparent); 
}

/* --- 8. FOOTER & OTROS --- */
footer { 
    text-align: center; padding: 40px 0; color: var(--muted); 
    font-size: 13px; border-top: 1px solid var(--border); width: 100%;
}

.error { 
    margin-top: 20px; background: rgba(255, 80, 80, 0.1); 
    border: 1px solid rgba(255, 80, 80, 0.3); color: #ffb4b4; 
    padding: 14px; border-radius: 12px; 
}

/* --- 9. RESPONSIVE --- */
@media (max-width: 768px) {
    .seo-container { padding: 50px 0; }
    .seo-title { font-size: 2rem; }
    .trust-divider { display: none; }
    .trust-banner { flex-direction: column; gap: 40px; padding: 30px 20px; }
    .seo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .logo { font-size: 30px; }
    .container { padding: 32px 16px; }
    .actions { flex-direction: column; align-items: stretch; }
    .btn-group { flex-direction: column-reverse; } 
    .btn { width: 100%; justify-content: center; }
    .hint { text-align: center; order: 2; }
    .config-grid { grid-template-columns: 1fr; }
}

/* --- SECCIÓN FAQ (ACORDEÓN) --- */
.faq-container {
    max-width: 800px;
    margin: 0 auto 100px auto; /* Espacio antes del footer */
    padding: 0 24px;
}

.faq-title {
    text-align: center;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 40px;
    font-weight: 800;
}

.faq-item {
    background: var(--card-light);
    border: 1px solid var(--border);
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(124, 140, 255, 0.3);
}

.faq-item[open] {
    background: rgba(124, 140, 255, 0.05);
    border-color: var(--primary);
}

summary {
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
    position: relative;
    list-style: none; /* Ocultar flecha por defecto */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary::-webkit-details-marker { display: none; }

/* Icono de + animado */
summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s ease;
    font-weight: 400;
}

details[open] summary::after {
    transform: rotate(45deg);
}

details[open] summary {
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-answer {
    padding: 20px 24px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}