:root {
    --primary: #6366f1;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --white: #ffffff;
}

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

html {
    scroll-behavior: smooth;
    height: 100%;
}

/* --- 1. ESTRUCTURA BASE (STICKY FOOTER) --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    
    /* Configuración para empujar el footer al fondo */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px; /* Un poco más ancho para mejor distribución */
    margin: 0 auto;
    padding: 1rem 2rem; /* REDUCIDO: Menos aire arriba/abajo */
}

main.container {
    flex: 1; /* Ocupa el espacio disponible */
    width: 100%;
}

/* --- 2. HEADER & NAVBAR --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo { font-size: 1.5rem; font-weight: 800; color: var(--dark); }
.logo span { color: var(--primary); }

.back-link {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
}
.back-link:hover { color: var(--primary); }

/* --- 3. HOME (TARJETAS COMPACTAS) --- */
.hero { 
    text-align: center; 
    padding: 2rem 0 1.5rem 0; /* REDUCIDO: Antes 4rem */
}
.hero h1 { 
    font-size: 2.5rem; /* Título un poco más pequeño */
    margin-bottom: 0.5rem; 
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(90deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Grid optimizado para verse todo junto */
.grid-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px; /* Menos espacio entre tarjetas */
    justify-content: center;
    align-items: stretch;
}

/* Regla para escritorio: Forzar 3 columnas centradas */
@media (min-width: 1024px) {
    .grid-categories {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1000px;
        margin: 0 auto;
    }
}

.card {
    background: var(--white);
    padding: 1.5rem; /* REDUCIDO: Antes 2rem */
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.1);
}

.card-icon { 
    font-size: 2rem; /* Icono ajustado */
    margin-bottom: 0.8rem; 
}
.card h3 { 
    margin-bottom: 0.5rem; 
    font-size: 1.1rem; 
}
.card p { 
    color: var(--gray); 
    font-size: 0.9rem; 
    line-height: 1.4;
    flex-grow: 1; /* Empuja el contenido hacia abajo uniformemente */
}

.disabled { opacity: 0.6; cursor: not-allowed; }

/* --- 4. HERRAMIENTAS GENERALES --- */
.tool-header { text-align: center; margin-bottom: 2rem; }
.tool-controls { margin-bottom: 2rem; text-align: center; }

.tool-box {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* --- 5. MÓDULO TEXTO & TIPOGRAFÍA --- */
textarea {
    width: 100%;
    height: 150px;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    font-family: inherit;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--gray);
}

.btn-secondary {
    background: transparent;
    border: 1px solid #cbd5e1;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.result-item:hover {
    background: #f1f5f9;
    border-color: var(--primary);
}

.preview-text {
    font-size: 1.2rem;
    margin-top: 5px;
    word-break: break-all;
}

.font-name {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    font-weight: 700;
}

.btn-copy {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* --- 6. MÓDULO ÍCONOS & SÍMBOLOS --- */

.main-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1rem;
}

.tab-btn {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    color: var(--gray);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn.active {
    color: var(--primary);
    background: #eef2ff;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.search-container { margin-bottom: 1.5rem; text-align: center; }

.search-input {
    width: 100%;
    max-width: 600px;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    outline: none;
    transition: border-color 0.3s;
}
.search-input:focus { border-color: var(--primary); }

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-btn {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: var(--gray);
}
.filter-btn:hover { background: #f1f5f9; }

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); 
    gap: 10px;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.symbol-card {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
    user-select: none;
}

.symbol-card:hover {
    background: #f8fafc;
    transform: scale(1.1);
    border-color: var(--primary);
}
.symbol-card:active { transform: scale(0.95); }

.symbol-card.emoji {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", sans-serif;
    font-size: 2rem;
}

.symbol-card.symbol {
    font-size: 1.8rem;
    color: var(--dark);
    font-family: 'Courier New', Courier, monospace; 
    font-variant-emoji: text; 
}

/* --- 7. BARRA MULTI-COPIADO (FLOTANTE) --- */
.copy-bar-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 15px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #e2e8f0;
}

.copy-display {
    width: 100%;
    max-width: 600px;
    padding: 12px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1.2rem;
    outline: none;
    transition: border-color 0.2s;
}
.copy-display:focus { border-color: var(--primary); }

.btn-action {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform 0.1s;
    white-space: nowrap;
}
.btn-action:active { transform: scale(0.95); }

.btn-copy-all { background: var(--primary); color: white; }
.btn-clear { background: #f1f5f9; color: var(--dark); border: 1px solid #e2e8f0; }

/* --- 8. FOOTER COMPACTO --- */
footer {
    background: var(--white);
    border-top: 1px solid #e2e8f0;
    padding: 1rem 0; /* REDUCIDO: Antes 2rem */
    text-align: center;
    margin-top: 0; 
    box-shadow: 0 -4px 20px rgba(0,0,0,0.02);
}

footer p {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.5px;
}

footer span {
    font-weight: 700;
    color: var(--primary);
}

footer .company {
    display: block;
    font-size: 0.75rem;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000000;   
    font-weight: 800; 
    opacity: 1;
}

/* --- 9. UTILIDADES & TOAST --- */
.hidden { display: none !important; }

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 2000;
}

.toast.show { opacity: 1; }

body:has(.copy-bar-container) {
    padding-bottom: 90px;
}

/* --- 10. MÓDULO GAMER (NICKS) --- */

.gamer-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.gamer-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.15);
}

.gamer-icon {
    font-size: 2.5rem;
    background: #f1f5f9;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.gamer-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
    margin-top: 2rem;
}

.nick-item {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.nick-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.15);
}

.nick-item.copied {
    background-color: #d1fae5;
    border-color: #10b981;
}

.nick-text {
    font-family: 'Segoe UI Symbol', 'Noto Sans Symbols', 'Arial', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.btn-copy-mini {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.nick-item:hover .btn-copy-mini { opacity: 1; }

.btn-generate {
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    display: block;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-generate:active { transform: scale(0.98); }

.config-panel {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.gamer-input {
    width: 100%;
    max-width: 500px;
    padding: 15px 20px;
    font-size: 1.1rem;
    text-align: center;
    border: 2px solid #cbd5e1;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: var(--dark);
}

.gamer-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.gamer-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

@media (max-width: 600px) {
    .gamer-input { font-size: 1rem; width: 100%; }
}

/* --- 11. MÓDULO WA LINK & COMUNICACIÓN --- */

/* Tabs */
.comm-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 50px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.comm-tab-btn {
    padding: 10px 30px;
    border: none;
    background: transparent;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comm-tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.comm-tab-btn.whatsapp.active { color: #25D366; }
.comm-tab-btn.telegram.active { color: #0088cc; }
.comm-tab-btn svg { margin-right: 5px; display: block; }

/* Formularios */
.comm-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.comm-form.active { display: block; }

.input-group { margin-bottom: 1.5rem; text-align: left; }

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

.comm-input, .comm-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
    background: white;
}

.comm-input:focus, .comm-textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.comm-textarea {
    height: 120px;
    resize: vertical; /* Solo vertical para evitar conflictos */
    padding-right: 50px; /* Espacio para que el texto no tape el botón del emoji */
}

/* Contenedor flexible para País + Número */
.phone-input-container {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    transition: border-color 0.3s;
    overflow: hidden;
}

.phone-input-container:focus-within {
    border-color: var(--primary);
}

/* Selector de País */
.country-select-wrapper {
    position: relative;
    width: 110px;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.country-select {
    width: 100%;
    padding: 15px 5px 15px 15px;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    color: var(--dark);
    font-weight: 600;
}

.dropdown-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    color: var(--gray);
    pointer-events: none;
}

.comm-input.phone-field {
    border: none;
    border-radius: 0;
    padding-left: 15px;
    width: 100%;
}

.comm-input.phone-field:focus { border: none; outline: none; }

/* Eliminar Spinners de números */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; margin: 0; 
}
input[type=number] { -moz-appearance: textfield; }

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.modal-overlay.open .modal-content { transform: translateY(0); }

.btn-close-modal {
    position: absolute;
    top: 15px; right: 15px;
    background: #f1f5f9;
    border: none;
    width: 35px; height: 35px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray);
}

.qr-container {
    margin: 1.5rem auto;
    padding: 15px;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    width: 200px; height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-container img { width: 100%; height: auto; }

.result-link-box {
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    word-break: break-all;
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-family: monospace;
}

.modal-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-modal {
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform 0.1s;
    width: 100%;
}
.btn-primary { background: var(--primary); color: white; }
.btn-outline { background: white; border: 2px solid #e2e8f0; color: var(--dark); }
.btn-modal:active { transform: scale(0.98); }

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

/* --- 12. EMOJI PICKER INTEGRADO --- */

.message-box-wrapper { position: relative; }

/* Botón de la carita: Subido un poco para que no choque con el borde */
.emoji-trigger-btn {
    position: absolute;
    bottom: 25px; /* ANTES: 15px | AHORA: 25px (Más arriba) */
    right: 20px; 
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.6;
    z-index: 10;
    filter: grayscale(100%); 
}

.emoji-trigger-btn:hover {
    transform: scale(1.2);
    opacity: 1;
    filter: grayscale(0%);
}

/* Popup Picker: Ajustado para aparecer encima de la nueva posición del botón */
.emoji-picker-popup {
    display: none;
    position: absolute;
    bottom: 75px; /* ANTES: 60px | AHORA: 75px (Para acompañar al botón) */
    right: 0;
    width: 300px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 100;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.emoji-picker-popup.active {
    display: flex;
    flex-direction: column;
}

.emoji-categories-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    padding: 5px;
    gap: 5px;
}

.emoji-cat-btn {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0.6;
}

.emoji-cat-btn:hover, .emoji-cat-btn.active {
    background: white;
    opacity: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.emoji-grid-scroll {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 5px;
}

/* Scrollbar Personalizado para Emojis */
.emoji-grid-scroll::-webkit-scrollbar { width: 6px; }
.emoji-grid-scroll::-webkit-scrollbar-track { background: transparent; }
.emoji-grid-scroll::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
    border: 2px solid transparent;
}
.emoji-grid-scroll::-webkit-scrollbar-thumb:hover { background-color: var(--primary); }

.emoji-btn-item {
    font-size: 1.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.1s;
    text-align: center;
    line-height: 1.5;
}

.emoji-btn-item:hover {
    background: #f1f5f9;
    transform: scale(1.1);
}

@media (max-width: 400px) {
    .emoji-picker-popup {
        width: 100%;
        right: 0; left: 0;
    }
}

/* --- MÓDULO GENERADOR QR MULTI-USO --- */

/* Layout Principal: Grid de 2 Columnas (Desktop) */
.qr-workspace {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Izquierda form, Derecha preview */
    gap: 30px;
    align-items: start;
    margin-top: 2rem;
}

/* Columna Izquierda: Configuración */
.qr-config-panel {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* Columna Derecha: Vista Previa Sticky (Se queda fija al bajar) */
.qr-preview-panel {
    position: sticky;
    top: 20px; /* Se pega al techo al hacer scroll */
    background: var(--dark);
    color: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

/* Tabs de Navegación (Scrollable en móvil) */
.qr-tabs-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
    scrollbar-width: none; /* Ocultar scrollbar Firefox */
}

.qr-tabs-nav::-webkit-scrollbar { display: none; } /* Ocultar scrollbar Chrome */

.qr-tab-btn {
    white-space: nowrap;
    padding: 10px 20px;
    border: none;
    background: transparent;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qr-tab-btn:hover { background: #f1f5f9; color: var(--dark); }

.qr-tab-btn.active {
    background: #eef2ff;
    color: var(--primary);
}

/* Formularios Dinámicos */
.qr-form-section {
    display: none; /* Ocultos por defecto */
    animation: fadeIn 0.3s ease;
}

.qr-form-section.active { display: block; }

/* El cuadro blanco donde vive el QR */
.qr-canvas-wrapper {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
    width: 230px;
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-canvas-wrapper img {
    width: 100%;
    height: auto;
}

/* Inputs Específicos */
.qr-color-picker {
    width: 100%;
    height: 40px;
    border: none;
    cursor: pointer;
    background: transparent;
}

/* Responsivo para Móvil */
@media (max-width: 768px) {
    .qr-workspace {
        grid-template-columns: 1fr; /* Una sola columna */
    }
    
    .qr-preview-panel {
        position: relative; /* Ya no sticky en móvil */
        top: 0;
        order: -1; /* Poner preview ARRIBA del formulario */
        min-height: auto;
        padding: 1.5rem;
    }
}
/* ... [MANTÉN TODO TU CSS ANTERIOR, DESDE :root HASTA EL FINAL DEL RESPONSIVE @media] ... */
/* COPIA Y PEGA ESTO AL FINAL DE TU CSS EXISTENTE */

/* --- 13. PREPARACIÓN PARA ADSENSE (Monetización) --- */
.ad-slot {
    width: 100%;
    max-width: 728px; /* Estándar Leaderboard */
    height: 90px;     /* Altura mínima reservada para evitar CLS (Cumulative Layout Shift) */
    background-color: #f1f5f9;
    border: 1px dashed #cbd5e1;
    margin: 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.8rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Espacio para anuncio cuadrado en móvil */
@media (max-width: 768px) {
    .ad-slot {
        height: 250px;
        max-width: 300px;
    }
}

/* --- 14. ESTRUCTURA SEO ON-PAGE --- */
.seo-container {
    max-width: 800px;
    margin: 3rem auto;
    color: #334155;
    line-height: 1.8;
    font-size: 1.05rem;
}

.seo-container h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.seo-container h3 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.seo-container p { margin-bottom: 1.2rem; }

.seo-container ul, .seo-container ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.seo-container li { margin-bottom: 0.5rem; }

/* Tabla SEO Optimizada */
.seo-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.seo-table th { background: var(--dark); color: white; padding: 12px; text-align: left; }
.seo-table td { border-bottom: 1px solid #e2e8f0; padding: 12px; background: white; }

/* FAQ Schema Visual */
.faq-section { margin-top: 3rem; border-top: 2px solid #f1f5f9; padding-top: 2rem; }
.faq-item { margin-bottom: 1rem; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.faq-item summary {
    padding: 15px; background: white; cursor: pointer; font-weight: 600;
    display: flex; justify-content: space-between; align-items: center;
}
.faq-item p { padding: 15px; margin: 0; background: #f8fafc; border-top: 1px solid #e2e8f0; font-size: 0.95rem; }

/* --- 15. INTERLINKING (CLUSTER DE NAVEGACIÓN) --- */
.related-tools {
    margin-top: 4rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 1rem;
}
.related-link {
    display: block;
    padding: 12px;
    text-align: center;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.related-link:hover {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.1);
}
