﻿/* ============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================ */
:root {
    /* Colores de acento */
    --accent-primary: #8a2be2;
    --accent-secondary: #39ff14;
    --accent-gradient: linear-gradient(135deg, #8a2be2, #39ff14);

    /* Fondos */
    --bg-base: #0a0a0f;
    --bg-surface: #13131a;
    --bg-surface-elevated: #1a1a24;

    /* Texto */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;

    /* Bordes */
    --border-subtle: rgba(255,255,255,0.08);

    /* Efectos */
    --glass-bg: rgba(10,10,15,0.85);
}

/* ============================================
   RESET Y ESTILOS BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, .logo {
    font-family: 'Space Grotesk', sans-serif;
}

.accent {
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    background-image: var(--accent-gradient);
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-page {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.about-photo-col {
    flex: 1 1 300px;
    max-width: 350px;
}

.about-photo-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(138,43,226,0.2);
    border: 1px solid var(--border-subtle);
}

.about-photo-frame img {
    width: 100%;
    display: block;
    filter: contrast(1.1);
}

.about-linkedin {
    margin-top: 2rem;
    text-align: center;
}

.linkedin-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: bold;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(138,43,226,0.3);
    font-size: 1.1rem;
}

.linkedin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(138,43,226,0.4);
}

.about-bio-col {
    flex: 2 1 600px;
    min-width: 0;
}

.about-name {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    font-family: 'Space Grotesk', sans-serif;
}

.about-role {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
}

.about-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-section-title {
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5rem;
    font-size: 1.8rem;
}

.about-milestones {
    margin-left: 0;
    padding-left: 0;
    margin-bottom: 3rem;
    list-style-type: none;
}

.about-milestones li {
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 2rem;
}

.milestone-icon {
    color: var(--accent-primary);
    position: absolute;
    left: 0;
    top: 2px;
}

.about-certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.cert-card {
    background: rgba(255,255,255,0.03);
    padding: 1.5rem;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-3px);
}

.cert-neon {
    border-left: 4px solid var(--accent-secondary);
}

.cert-violet {
    border-left: 4px solid var(--accent-primary);
}

.cert-card strong {
    color: white;
    display: block;
    margin-bottom: 0.5rem;
}

.cert-card span {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ============================================
   SINGLE ARTICLE - Clases adicionales
   ============================================ */
.article-summary {
    font-size: 1.2rem;
    color: var(--text-secondary);
    border-left: 4px solid var(--accent-secondary);
    padding-left: 1rem;
    margin-bottom: 2rem;
}

.article-cover {
    margin-bottom: 3rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: #0a0a0f;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.article-cover img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* ============================================
   CLASES DE UTILIDAD PARA ADMIN
   ============================================ */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-tabs {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
    flex-wrap: wrap;
}

.admin-tabs-spacer {
    flex: 1;
    min-width: 0;
}

.admin-actions-bar {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-sm {
    width: auto !important;
    padding: 0.8rem 1.5rem !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-danger {
    border-color: #ff4444 !important;
    color: #ff4444 !important;
    background: rgba(255,68,68,0.08) !important;
}

.btn-danger:hover {
    background: rgba(255,68,68,0.2) !important;
    border-color: #ff6666 !important;
    color: #ff6666 !important;
}

/* Disabled state for .btn-danger */
.btn-danger:disabled,
.btn-danger.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255,68,68,0.04) !important;
    border-color: rgba(255,68,68,0.3) !important;
    color: rgba(255,68,68,0.5) !important;
    pointer-events: none;
}

.btn-neon {
    border-color: var(--accent-secondary) !important;
    color: var(--accent-secondary) !important;
}

.card {
    background: var(--bg-surface-elevated);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.card h3 {
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    margin: 0;
}

.alert-success {
    background: rgba(57, 255, 20, 0.1);
    border-left: 4px solid var(--accent-secondary);
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #ccffcc;
}

.alert-error {
    background: rgba(255, 68, 68, 0.1);
    border-left: 4px solid #ff4444;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #ffcccc;
}

.alert-info {
    background: rgba(57, 255, 20, 0.1);
    border-left: 4px solid var(--accent-secondary);
    padding: 1rem;
    color: #ccffcc;
}

.tag-type {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 10px;
}

.action-link-edit {
    color: var(--accent-secondary);
    text-decoration: none;
}

.action-link-delete {
    color: #ff4444;
    text-decoration: none;
}

.action-cell {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-max-w {
    max-width: 500px;
}

.flex-center {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Text & display utilities */
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.d-block { display: block; }
.d-none { display: none; }
.w-auto { width: auto; }
.w-full { width: 100%; }
.cursor-pointer { cursor: pointer; }
.fw-bold { font-weight: bold; }
.fs-small { font-size: 0.85rem; }
.fs-09 { font-size: 0.9rem; }
.fs-1 { font-size: 1rem; }
.fs-12 { font-size: 1.2rem; }
.fs-15 { font-size: 1.5rem; }
.p-0 { padding: 0; }
.p-1 { padding: 1rem; }
.pb-1 { padding-bottom: 1rem; }
.pt-1 { padding-top: 1rem; }
.border-top-dashed { border-top: 1px dashed var(--border-subtle); }
.border-none { border: none; }
.bg-transparent { background: transparent; }
.bg-base { background: var(--bg-base); }
.accent-primary-text { color: var(--accent-primary); }
.accent-secondary-text { color: var(--accent-secondary); }
.rounded-8 { border-radius: 8px; }
.overflow-x-auto { overflow-x: auto; }
.line-height-15 { line-height: 1.5; }
.text-decoration-none { text-decoration: none; }
.flex-col { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-05 { gap: 0.5rem; }
.gap-08 { gap: 0.8rem; }
.m-0 { margin: 0; }
.ml-1 { margin-left: 10px; }
.inline { display: inline; }
.text-primary { color: var(--text-primary); }
.btn-xs { padding: 4px 8px !important; font-size: 0.9rem; }
.btn-danger-outline { border-color: #ff4444 !important; color: #ff4444 !important; }

/* Selector de nivel de acceso a prompts en gesti�n de usuarios */
.prompt-access-form {
    display: inline-flex;
    align-items: center;
    margin: 0 4px;
}

.prompt-access-select {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle, #2a2a3e);
    color: var(--text-primary, #e0e0e0);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease;
    max-width: 150px;
}

.prompt-access-select:hover,
.prompt-access-select:focus {
    border-color: var(--accent-primary, #8a2be2);
    outline: none;
}

.prompt-access-select option {
    background: var(--bg-surface, #13131a);
    color: var(--text-primary, #e0e0e0);
}
.category-badge {
    background: var(--accent-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
}
.preview-thumb {
    height: 60px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
}

.btn-lg-padding {
    padding: 1rem 3rem;
}

.file-label {
    padding: 0.8rem 1.5rem;
    display: inline-block;
}

/* ============================================
   USERS PAGE
   ============================================ */
.users-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* ============================================
   NEWS FORM
   ============================================ */
.news-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.news-form-type-selector {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.news-form-type-selector label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-form-type-selector label span {
    font-size: 1.1rem;
    font-weight: bold;
}

/* ============================================
   CHAT IA - INTERFAZ MODERNA
   ============================================ */
.ia-chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 72vh;
    background: var(--bg-surface-elevated);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    margin-top: 1.5rem;
}

/* ---- Cabecera ---- */
.ia-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.25);
    flex-shrink: 0;
    gap: 0.75rem;
}

.ia-chat-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.ia-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.ia-chat-header-info {
    min-width: 0;
}

.ia-chat-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.ia-chat-subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: block;
}

.ia-chat-header-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

/* ---- Estado ---- */
.ia-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    white-space: nowrap;
}

.ia-status-connected {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.ia-status-generating {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.ia-status-error {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

/* ---- Selector de modelo ---- */
.ia-model-select {
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: #fff;
    font-size: 0.82rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.ia-model-select:hover,
.ia-model-select:focus {
    border-color: var(--accent-secondary);
}

/* ---- Bot�n icono ---- */
.ia-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ia-btn-icon:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(138, 43, 226, 0.1);
}

/* ---- �rea de mensajes ---- */
.ia-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scroll-behavior: smooth;
}

.ia-messages::-webkit-scrollbar {
    width: 6px;
}

.ia-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ia-messages::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
}

/* ---- Bienvenida ---- */
.ia-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    padding: 2rem 1rem;
    gap: 0.75rem;
}

.ia-welcome-icon {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.ia-welcome-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.ia-welcome-text {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0 0 1rem 0;
}

/* ---- Sugerencias ---- */
.ia-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    max-width: 500px;
}

.ia-suggestion-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.2s;
}

.ia-suggestion-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(138, 43, 226, 0.08);
}

/* ---- Mensajes ---- */
.ia-msg {
    display: flex;
    max-width: 88%;
    animation: iaFadeIn 0.25s ease;
}

@keyframes iaFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ia-msg-user {
    align-self: flex-end;
    justify-content: flex-end;
}

.ia-msg-assistant {
    align-self: flex-start;
    justify-content: flex-start;
}

.ia-bubble {
    padding: 0.85rem 1.2rem;
    border-radius: 16px;
    line-height: 1.65;
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.ia-msg-user .ia-bubble {
    background: linear-gradient(135deg, var(--accent-primary), #00b86b);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ia-msg-assistant .ia-bubble {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
}

.ia-bubble ul {
    margin: 0.4rem 0;
    padding-left: 1.2rem;
}

.ia-bubble li {
    margin: 0.2rem 0;
}

.ia-bubble strong {
    color: var(--accent-primary);
}

/* ---- Typing indicator ---- */
.ia-typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.85rem 1.2rem;
}

.ia-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
    animation: iaTypingPulse 1.2s infinite;
}

.ia-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ia-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes iaTypingPulse {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1); }
}

/* ---- Input bar ---- */
.ia-input-bar {
    padding: 0.85rem 1.25rem 0.6rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.ia-input-container {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 0.4rem 0.4rem 0.4rem 1rem;
    transition: border-color 0.2s;
}

.ia-input-container:focus-within {
    border-color: var(--accent-secondary);
}

.ia-input {
    flex: 1;
    border: none;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    outline: none;
    line-height: 1.5;
    max-height: 150px;
    padding: 0.4rem 0;
}

.ia-input::placeholder {
    color: var(--text-secondary);
}

.ia-btn-send {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: var(--accent-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.ia-btn-send:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}

.ia-btn-send:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

.ia-input-footer {
    text-align: center;
    margin: 0.5rem 0 0 0;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-surface-elevated);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    width: 400px;
    max-width: 90%;
}

.modal-content h3 {
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
}

.modal-actions .btn-outline,
.modal-actions .btn-submit {
    flex: 1;
}

/* ============================================
   NAVBAR
   ============================================ */
.main-nav {
    position: sticky;
    top: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
}

/* Contenedor: dos filas (superior logo+tagline, inferior menú) */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem 0.5rem;
    position: relative;
}

/* Fila superior: logo + tagline en una sola línea con Flexbox */
.nav-top-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    width: 100%;
    min-height: 40px;
}

/* El botón hamburguesa no debe existir en el layout hasta mobile */
.mobile-menu-btn {
    display: none !important;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    padding: 0;
    z-index: 1000;
    min-width: 30px;
    min-height: 25px;
}

/* Logo: no crece ni encoge, todo en una línea */
.logo {
    flex: 0 0 auto;
}

.logo a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

/* Tagline: ocupa el espacio restante, se trunca con ellipsis si es necesario */
.nav-tagline {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Menú de navegación: ocupa todo el ancho, alineado a la izquierda */
.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
    width: 100%;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.4rem 0;
    white-space: nowrap;
    position: relative;
    transition: color 0.3s ease;
}

/* Hover: barra inferior animada que crece desde el centro */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    right: 50%;
    height: 2px;
    background: linear-gradient(90deg, #8a2be2, #39ff14);
    border-radius: 2px;
    transition: left 0.3s ease, right 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    left: 0;
    right: 0;
    opacity: 1;
}

/* Estado activo: muy destacado, tipografía grande, fondo visible y barra con glow */
.nav-links a.active {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.3rem;
    text-shadow: 0 0 16px rgba(138, 43, 226, 0.5), 0 0 32px rgba(57, 255, 20, 0.15);
    background: rgba(138, 43, 226, 0.18);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    letter-spacing: 0.3px;
}

.nav-links a.active::after {
    left: 0.8rem;
    right: 0.8rem;
    opacity: 1;
    height: 4px;
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(138, 43, 226, 0.6), 0 0 24px rgba(57, 255, 20, 0.2);
}

.btn-outline {
    border: 1px solid var(--accent-primary);
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    color: var(--text-primary) !important;
    background: transparent !important;
    transition: background 0.3s, box-shadow 0.3s;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline:hover, .btn-outline.active {
    background: var(--accent-primary) !important;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

/* Button elements using .btn-outline need explicit reset of native button styles */
button.btn-outline {
    background: transparent !important;
    border: 1px solid var(--accent-primary);
    color: var(--text-primary) !important;
}

button.btn-outline:hover {
    background: var(--accent-primary) !important;
    color: #fff !important;
}

/* Disabled state for .btn-outline */
.btn-outline:disabled,
.btn-outline.disabled,
button.btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.15) !important;
    color: var(--text-secondary) !important;
    background: rgba(255,255,255,0.03) !important;
    pointer-events: none;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    padding: 0;
    z-index: 1000;
    min-width: 30px;
    min-height: 25px;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s linear;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.content-wrapper {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem;
    width: 100%;
}

/* ============================================
   HOME HERO
   ============================================ */
.home-hero {
    text-align: center;
    padding: 1.5rem 2rem 0.5rem;
    position: relative;
}

.home-hero .hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}

.home-hero .hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary, #b0b0b0);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .home-hero {
        padding: 1.25rem 1rem 0.5rem;
    }
    .home-hero .hero-title {
        font-size: 2rem;
        margin-bottom: 0.35rem;
    }
    .home-hero .hero-subtitle {
        font-size: 1rem;
    }
}

/* ============================================
   HOME PAGE
   ============================================ */
.home-page {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.home-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-secondary);
    padding-left: 1rem;
}

.home-section .section-header h2 {
    font-size: 1.75rem;
}

.section-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s, transform 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.section-link:hover {
    color: #a955ff;
    transform: translateX(3px);
}

/* Home Articles Grid 2x2 */
.home-articles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Home News Grid 2x2 */
.home-news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Divider */
.home-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0 0.6rem;
    position: relative;
}

.home-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), var(--accent-primary), transparent);
    opacity: 0.3;
}

.home-divider-icon {
    position: relative;
    z-index: 1;
    background: var(--bg-base);
    padding: 0 1.5rem;
    font-size: 1.5rem;
    color: var(--accent-secondary);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.article-img.small {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    background: #0a0a0f;
}

/* ============================================
   NEWS GRID (p�gina de noticias)
   ============================================ */
.section-header {
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-secondary);
    padding-left: 1rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.news-card {
    background: transparent;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.news-card.featured {
    grid-column: 1 / -1;
    flex-direction: row;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(57, 255, 20, 0.2);
    border-color: rgba(57, 255, 20, 0.3);
}

/* Estilo texto-solo: tarjetas de noticias sin imagen */
.news-card-text-only {
    background: linear-gradient(135deg, rgba(138,43,226,0.03) 0%, rgba(57,255,20,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 14px;
    padding: 0;
}
.news-card-text-only:hover {
    border-color: rgba(138,43,226,0.2);
    box-shadow: 0 8px 28px -8px rgba(138,43,226,0.12);
}
.news-card-text-only .news-content {
    padding: 1.75rem;
}
.news-card-text-only.featured .news-content {
    padding: 2rem;
}

.news-image {
    width: 100%;
    height: 200px;
    background-color: var(--bg-surface-elevated);
    background-size: cover;
    background-position: center;
    object-fit: cover;
}

.news-card.featured .news-image {
    width: 50%;
    height: 100%;
    min-height: 350px;
}

.news-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.news-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-card.featured .news-title {
    font-size: 2rem;
}

.news-summary {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex: 1;
}

.read-more {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    color: #a955ff;
}

/* ============================================
   READING TIME
   ============================================ */
.reading-time {
    font-size: 0.8rem;
    color: var(--text-secondary, #94a3b8);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    font-weight: 500;
}

.news-meta .reading-time {
    color: var(--accent-secondary);
    opacity: 0.8;
}

/* ============================================
   ARTICLE TYPE BADGE (Noticia / Art�culo)
   ============================================ */
.article-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.article-type-badge.type-news {
    background: rgba(57, 255, 20, 0.12);
    color: var(--accent-secondary);
    border: 1px solid rgba(57, 255, 20, 0.2);
}

.article-type-badge.type-article {
    background: rgba(138, 43, 226, 0.12);
    color: var(--accent-primary);
    border: 1px solid rgba(138, 43, 226, 0.2);
}

/* ============================================
   CARD SUMMARY (clamp visual, no truncado real)
   ============================================ */
.card-summary {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

/* ============================================
   READ ARTICLE BUTTON
   ============================================ */
.read-article {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    transition: color 0.3s;
}

.read-article:hover {
    color: #a955ff;
}

/* ============================================
   ARTICLE CARD (convertida a <article>)
   ============================================ */
.article-card {
    background: transparent;
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px -10px rgba(57, 255, 20, 0.15);
}

.article-card .article-card-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 0.8rem 0 0.3rem;
    transition: color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.article-card .article-card-title:hover {
    color: var(--accent-primary);
}

.article-card .date {
    color: var(--accent-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.article-card .category {
    color: var(--accent-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.article-card .card-author {
    font-size: 0.8rem;
    color: var(--text-secondary, #94a3b8);
    font-style: italic;
    margin-bottom: 0.5rem;
}

/* ============================================
   LAYOUT 70/30 (news, single)
   ============================================ */
.home-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 3rem;
}

.sidebar {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 2rem;
    height: fit-content;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-item {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s;
    align-items: center;
}

.article-item:hover {
    transform: translateX(5px);
}

.article-item:hover h4 {
    color: var(--accent-primary);
}

.article-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.article-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.article-info .date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.article-info h4 {
    font-size: 0.95rem;
    line-height: 1.3;
    transition: color 0.3s;
}

/* ============================================
   ARTICLES PAGE (articles + sidebar)
   ============================================ */
.articles-page {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.articles-main {
    flex: 2;
    min-width: 0;
}

.articles-main .section-header {
    margin-bottom: 1.5rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.latest-news {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    min-width: 280px;
}

.latest-news h3 {
    margin-top: 0;
    margin-bottom: 1.2rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: var(--text-primary);
    border-left: 4px solid var(--accent-secondary);
    padding-left: 0.8rem;
}

.latest-news ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.latest-news li {
    margin-bottom: 0;
}

.latest-news a {
    text-decoration: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: color 0.3s, transform 0.3s;
    padding: 0.5rem;
    border-radius: 8px;
}

.latest-news a:hover {
    color: var(--text-primary);
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.03);
}

.latest-news .sidebar-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-surface-elevated);
}

.latest-news .sidebar-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.latest-news .sidebar-item-title {
    font-size: 0.85rem;
    line-height: 1.3;
    color: var(--text-secondary);
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-news a:hover .sidebar-item-title {
    color: var(--text-primary);
}

.latest-news .sidebar-item-date {
    font-size: 0.7rem;
    color: var(--accent-secondary);
    font-weight: 600;
}

/* ============================================
   BACK NAVIGATION BUTTON
   ============================================ */
.article-type-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 0.75rem;
}

.article-type-row .article-type-badge {
    flex-shrink: 0;
    margin-right: auto;
}

.article-type-row .back-btn {
    flex-shrink: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.back-nav-bar--bottom {
    margin-top: 2.5rem;
    margin-bottom: 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--bg-surface);
    border: 1px solid var(--accent-secondary);
    border-radius: 8px;
    color: var(--accent-secondary) !important;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.25s ease;
    cursor: pointer;
}

.back-btn:hover {
    color: #fff !important;
    border-color: var(--accent-secondary);
    background: rgba(57, 255, 20, 0.12);
    transform: translateX(-3px);
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.2);
}

.back-arrow {
    font-size: 1.2rem;
    line-height: 1;
}

/* ============================================
   SINGLE ARTICLE PAGE
   ============================================ */
.article-reading h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.article-body h2 {
    color: var(--accent-primary) !important;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.3;
}

.article-body h3,
.article-body h4 {
    color: var(--accent-primary) !important;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    font-family: 'Space Grotesk', sans-serif;
}

/* Forzar color morado en encabezados incluso si TinyMCE inyecta estilos inline */
.article-body h2[style*="color"],
.article-body h3[style*="color"],
.article-body h4[style*="color"] {
    color: var(--accent-primary) !important;
}

.article-body blockquote {
    border-left: 4px solid #8a2be2;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(138, 43, 226, 0.08);
    border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

.article-body figure {
    margin: 2rem 0;
    text-align: center;
}

.article-body figure img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.article-body figcaption {
    margin-top: 0.75rem;
    color: #94a3b8;
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.5;
}

.article-body p {
    margin-bottom: 1.25rem;
}

.article-body a {
    color: #8a2be2;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body a:hover {
    color: #39ff14;
}

/* ============================================
   ABOUT / CV TIMELINE
   ============================================ */
.cv-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-surface-elevated);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
    flex-shrink: 0;
}

.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border-subtle);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-secondary);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.timeline-date {
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   LOGIN
   ============================================ */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
    background: var(--bg-surface);
    padding: 3rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    font-size: 2rem;
}

.login-header p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-group textarea {
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--accent-gradient);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s;
    text-align: center;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover {
    opacity: 0.9;
}

/* Disabled state for .btn-submit */
.btn-submit:disabled,
.btn-submit.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary);
    pointer-events: none;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   TABLAS ADMIN
   ============================================ */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.admin-table th {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--accent-secondary);
}

.clickable-img {
    cursor: zoom-in;
    transition: transform 0.3s, box-shadow 0.3s;
}

.clickable-img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

/* ============================================
   TOGGLE SWITCH (admin)
   ============================================ */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: var(--accent-primary);
}

.switch input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-primary);
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
}

/* ============================================
   RESPONSIVE - TABLETS (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .home-layout {
        gap: 2rem;
    }

    .articles-page {
        gap: 1.5rem;
    }

    .news-card.featured .news-title {
        font-size: 1.6rem;
    }

    .news-card.featured .news-image {
        min-height: 280px;
    }

    .article-reading h1 {
        font-size: 2rem;
    }
}

/* ============================================
   RESPONSIVE - TABLETS / M�VILES GRANDES (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* NAVBAR */
    /* El botón hamburguesa está dentro de .nav-top-row, se muestra en móvil */
    .nav-top-row {
        justify-content: space-between;
    }

    .mobile-menu-btn {
        display: flex !important;
        flex-shrink: 0;
    }

    /* Ocultar tagline en mobile para no saturar */
    .nav-tagline {
        display: none;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-surface-elevated);
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-subtle);
        transform: translateY(-150%);
        opacity: 0;
        transition: all 0.4s ease;
        z-index: 99;
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        font-size: 1.1rem;
        white-space: normal;
    }

    .btn-outline {
        text-align: center;
        width: 100%;
    }

    /* CONTENT */
    .content-wrapper {
        padding: 1.5rem 1.25rem;
    }

    /* HOME */
    .home-articles-grid,
    .home-news-grid {
        grid-template-columns: 1fr;
    }

    .home-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .home-section .section-header h2 {
        font-size: 1.4rem;
    }

    /* NEWS GRID */
    .news-card.featured {
        flex-direction: column;
    }

    .news-card.featured .news-image {
        width: 100%;
        min-height: 200px;
    }

    .news-card.featured .news-title {
        font-size: 1.3rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    /* LAYOUT 70/30 */
    .home-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        order: 2;
    }

    /* ARTICLES PAGE */
    .articles-page {
        flex-direction: column;
    }

    .articles-main {
        flex: none;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .latest-news {
        flex: none;
        min-width: 0;
    }

    /* SINGLE ARTICLE */
    .article-reading h1 {
        font-size: 1.6rem;
    }

    .article-body {
        font-size: 1rem;
    }

    /* ABOUT PAGE */
    .about-page {
        flex-direction: column;
        gap: 2rem;
        padding: 0 1rem;
    }

    .about-photo-col {
        max-width: 100%;
        flex: none;
    }

    .about-photo-frame {
        max-width: 280px;
        margin: 0 auto;
    }

    .about-name {
        font-size: 2.2rem;
    }

    .about-role {
        font-size: 1.2rem;
    }

    .about-text {
        font-size: 1rem;
    }

    .about-section-title {
        font-size: 1.4rem;
    }

    .about-certs-grid {
        grid-template-columns: 1fr;
    }

    /* PROFILE */
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    /* LOGIN */
    .login-container {
        margin: 2rem auto;
        padding: 2rem 1.5rem;
    }

    /* ADMIN */
    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .admin-table td:last-child {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    /* USERS PAGE */
    .users-layout {
        grid-template-columns: 1fr;
    }

    /* CHAT IA */
    .ia-chat-wrapper {
        height: 60vh !important;
    }

    .ia-msg {
        max-width: 95% !important;
    }

    .ia-chat-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ia-chat-header-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .ia-model-select {
        flex: 1;
        min-width: 0;
    }

    .ia-suggestions {
        flex-direction: column;
        align-items: stretch;
    }

    /* NEWS FORM */
    .news-form-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .news-form-type-selector {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* MODAL */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    /* SINGLE ARTICLE */
    .article-summary {
        font-size: 1rem;
    }

    .article-cover img {
        max-height: 250px;
    }

    /* DIVIDER */
    .home-divider {
        padding: 0.35rem 0 0.5rem;
    }
}

/* ============================================
   RESPONSIVE - M�VILES PEQUE�OS (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .nav-container {
        padding: 0.75rem 1rem;
    }

    .content-wrapper {
        padding: 1rem 1rem;
    }

    .home-hero {
        padding: 1rem 1rem 0.4rem;
    }

    .logo a {
        font-size: 1.25rem;
    }

    .tagline {
        font-size: 0.55rem;
        margin-left: 38px;
    }

    .home-section .section-header h2 {
        font-size: 1.2rem;
    }

    .article-card {
        padding: 0.75rem;
    }

    .article-card h2 {
        font-size: 1rem;
    }

    .article-img.small {
        height: 160px;
        padding: 0.75rem;
    }

    .news-content {
        padding: 1rem;
    }

    .news-card-text-only .news-content {
        padding: 1.25rem;
    }
    .news-card-text-only.featured .news-content {
        padding: 1.5rem;
    }

    .news-title {
        font-size: 1.1rem;
    }

    .news-card.featured .news-title {
        font-size: 1.15rem;
    }

    .news-image {
        height: 160px;
    }

    .news-card.featured .news-image {
        min-height: 180px;
    }

    .article-reading h1 {
        font-size: 1.35rem;
    }

    .article-body {
        font-size: 0.95rem;
    }

    .article-thumb {
        width: 60px;
        height: 60px;
    }

    .article-info h4 {
        font-size: 0.85rem;
    }

    .login-container {
        margin: 1.5rem auto;
        padding: 1.5rem 1rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .btn-submit {
        padding: 0.85rem;
        font-size: 0.95rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }

    .admin-table td:last-child {
        flex-direction: column;
        gap: 4px;
    }

    .admin-table td:last-child a {
        font-size: 0.8rem;
    }

    .sidebar {
        padding: 1.25rem;
    }

    .latest-news {
        padding: 1rem;
    }

    .latest-news .sidebar-thumb {
        width: 50px;
        height: 50px;
    }

    .latest-news .sidebar-item-title {
        font-size: 0.8rem;
    }

    /* ABOUT PAGE */
    .about-name {
        font-size: 1.8rem;
    }

    .about-role {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .about-section-title {
        font-size: 1.2rem;
    }

    .about-text {
        font-size: 0.95rem;
    }

    .linkedin-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .cert-card {
        padding: 1rem;
    }

    .profile-pic {
        width: 100px;
        height: 100px;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: -1.9rem;
        width: 10px;
        height: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }

    .lightbox-modal {
        padding: 1rem;
    }

    .home-divider {
        padding: 0.3rem 0 0.4rem;
    }

    .home-divider-icon {
        font-size: 1.2rem;
        padding: 0 1rem;
    }

    /* CHAT IA */
    .ia-chat-wrapper {
        height: 55vh !important;
    }

    .ia-input {
        font-size: 0.9rem !important;
    }

    .ia-btn-send {
        width: 38px !important;
        height: 38px !important;
    }

    .ia-welcome-title {
        font-size: 1.2rem;
    }

    /* NEWS FORM */
    .news-form-grid {
        gap: 1rem !important;
    }

    /* USERS */
    .users-layout {
        gap: 1rem !important;
    }

    .card {
        padding: 1.25rem !important;
    }

    /* MODAL */
    .modal-content {
        padding: 1.5rem !important;
        width: 95% !important;
    }
}

/* ============================================
   RESPONSIVE - TABLAS EN M�VILES (scroll horizontal)
   ============================================ */
@media (max-width: 640px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table {
        min-width: 500px;
    }

    .admin-table th:nth-child(2),
    .admin-table td:nth-child(2) {
        min-width: 80px;
    }

    .admin-table th:nth-child(3),
    .admin-table td:nth-child(3) {
        min-width: 120px;
    }
}

/* ============================================
   RESPONSIVE - ORIENTACI�N HORIZONTAL EN M�VILES
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .main-nav {
        position: relative;
    }

    .content-wrapper {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .login-container {
        margin: 1rem auto;
        padding: 1.5rem;
    }

    .ia-chat-wrapper {
        height: 50vh !important;
    }

    .ia-welcome-title {
        font-size: 1.1rem;
    }

    .ia-welcome-text {
        font-size: 0.9rem;
    }

    .news-image {
        height: 140px;
    }

    .news-card.featured .news-image {
        min-height: 160px;
    }
}

/* ============================================
   MEJORAS DE ACCESIBILIDAD T�CTIL
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .nav-links a,
    .btn-outline,
    .btn-submit,
    .read-more,
    .section-link,
    .article-item,
    .latest-news a {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .article-card:hover,
    .news-card:hover,
    .article-item:hover {
        transform: none;
    }

    .article-card:active,
    .news-card:active {
        transform: translateY(-2px);
    }
}

/* ============================================
   INFO SOURCES PAGE - FUENTES DE INFORMACI�N
   ============================================ */
.info-sources-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.info-sources-header {
    text-align: center;
    margin-bottom: 4rem;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-secondary);
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.4); }
    50% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(57, 255, 20, 0); }
}

.info-sources-header h1 {
    font-size: 3.5rem;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.info-sources-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 500px;
    margin: 0 auto;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 1rem 0;
}

/* Divisor entre fichas del grid */
.source-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    grid-column: 1 / -1;
    padding: 1.5rem 0;
    position: relative;
}

.source-divider-line {
    width: 100%;
    max-width: 300px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #39ff14, #8b5cf6, #39ff14, transparent);
    border-radius: 3px;
    opacity: 0.8;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3), 0 0 30px rgba(138, 43, 226, 0.2);
    animation: dividerPulse 3s ease-in-out infinite;
}

@keyframes dividerPulse {
    0%, 100% { opacity: 0.6; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.05); }
}

/* Icono decorativo en el centro del divisor */
.source-divider::before {
    content: '?';
    position: absolute;
    font-size: 1.2rem;
    color: var(--accent-secondary);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
    animation: dividerIconSpin 4s ease-in-out infinite;
    z-index: 1;
    background: var(--bg-base);
    padding: 0 0.8rem;
}

@keyframes dividerIconSpin {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.8; }
    50% { transform: rotate(180deg) scale(1.2); opacity: 1; }
}

/* ============================================
   SOURCE CARD - DISE�O FUTURISTA
   ============================================ */
.source-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    min-height: 400px;
}

.source-card:hover {
    transform: translateY(-10px) scale(1.01);
}

/* Borde verde ne�n animado */
.card-border {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(
        135deg,
        rgba(57, 255, 20, 0.8),
        rgba(57, 255, 20, 0.2),
        rgba(138, 43, 226, 0.3),
        rgba(57, 255, 20, 0.8)
    );
    background-size: 400% 400%;
    animation: borderShift 6s ease-in-out infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes borderShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Brillo exterior */
.card-glow {
    position: absolute;
    inset: -20px;
    border-radius: 40px;
    background: radial-gradient(ellipse at 50% 0%, rgba(57, 255, 20, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.source-card:hover .card-glow {
    opacity: 1;
}

/* Fondo con grid y orbes */
.source-card-bg {
    position: absolute;
    inset: 2px;
    border-radius: 22px;
    background: linear-gradient(160deg, #0d0d1a, #111122, #0a0a18);
    overflow: hidden;
    z-index: 0;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(57, 255, 20, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(57, 255, 20, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    transition: opacity 0.6s ease;
}

.source-card:hover .bg-orb {
    opacity: 0.5;
}

.orb-1 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(57, 255, 20, 0.3), transparent);
    top: -80px;
    right: -80px;
    animation: orbFloat1 8s ease-in-out infinite;
}

.orb-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.2), transparent);
    bottom: -60px;
    left: -60px;
    animation: orbFloat2 10s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 20px) scale(1.1); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.15); }
}

/* Contenido de la tarjeta */
.source-card-content {
    position: relative;
    z-index: 1;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 396px;
}

/* Top row: logo + status */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 1.5rem;
}


/* Status badge */
.source-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--accent-secondary);
    text-transform: uppercase;
    font-family: 'Space Grotesk', sans-serif;
    padding: 4px 12px;
    background: rgba(57, 255, 20, 0.06);
    border-radius: 20px;
    border: 1px solid rgba(57, 255, 20, 0.1);
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-secondary);
    animation: pulseDot 2s ease-in-out infinite;
}

/* Nombre de la empresa */
.source-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, #ffffff, var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

/* Nombre del modelo de IA */
.source-ai-name {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-secondary);
    text-align: center;
    margin-top: -0.8rem;
    margin-bottom: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.85;
}

/* Stats / CEO */
.source-stats {
    width: 100%;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0.75rem;
    background: rgba(57, 255, 20, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(57, 255, 20, 0.06);
    transition: all 0.3s ease;
}

.source-card:hover .stat-item {
    background: rgba(57, 255, 20, 0.06);
    border-color: rgba(57, 255, 20, 0.12);
}

.stat-value {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}

/* Links grid */
.source-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    width: 100%;
    margin-top: auto;
}

.source-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.6rem 0.4rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.source-link:hover {
    background: rgba(57, 255, 20, 0.08);
    border-color: rgba(57, 255, 20, 0.2);
    color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(57, 255, 20, 0.1);
}

.source-link .link-icon {
    flex-shrink: 0;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.source-link:hover .link-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* ============================================
   SOURCE CARD - EMPTY (PLACEHOLDER)
   ============================================ */
.source-card-empty {
    cursor: default;
}

.source-card-empty .card-border {
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.1),
        rgba(255,255,255,0.02),
        rgba(138, 43, 226, 0.1),
        rgba(255,255,255,0.1)
    );
    animation: none;
}

.source-card-empty .source-card-content {
    justify-content: center;
    min-height: 396px;
}

.source-card-empty .source-card-bg {
    background: linear-gradient(160deg, #0d0d1a, #0a0a15);
}

.source-empty-icon {
    color: var(--text-secondary);
    opacity: 0.2;
    margin-bottom: 1.5rem;
    animation: pulseIcon 3s ease-in-out infinite;
}

@keyframes pulseIcon {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.1); }
}

.source-empty-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.source-empty-desc {
    color: var(--text-secondary);
    opacity: 0.5;
    font-size: 0.9rem;
}

/* ============================================
   INFO SOURCES - RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .info-sources-page {
        padding: 2rem 1rem;
    }

    .info-sources-header h1 {
        font-size: 2.2rem;
    }

    .info-sources-subtitle {
        font-size: 1rem;
    }

    .sources-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .source-card {
        min-height: 360px;
    }

    .source-card-content {
        padding: 1.5rem 1.25rem;
        min-height: 356px;
    }

    .source-name {
        font-size: 1.4rem;
    }

    .source-links {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .source-link {
        font-size: 0.7rem;
        padding: 0.5rem 0.3rem;
    }

    .source-card-empty .source-card-content {
        min-height: 356px;
    }

    /* Divisor responsive */
    .source-divider {
        padding: 1rem 0;
    }

    .source-divider-line {
        max-width: 180px;
        height: 2px;
    }

    .source-divider::before {
        font-size: 1rem;
        padding: 0 0.6rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .sources-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* ============================================
   BENCHMARKS SECTION
   ============================================ */
.benchmarks-section {
    margin-top: 5rem;
    padding-top: 2rem;
}

.benchmarks-header {
    text-align: center;
    margin-bottom: 3rem;
}

.benchmarks-title {
    font-size: 2.5rem;
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.benchmarks-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.benchmarks-table-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

/* Bloques individuales */
.benchmark-block {
    margin-bottom: 2.5rem;
}

.block-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 1.25rem;
    border-radius: 12px 12px 0 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.block-aggregators {
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.1), rgba(57, 255, 20, 0.03));
    border-bottom: 2px solid rgba(57, 255, 20, 0.25);
    color: var(--accent-secondary);
}

.block-benchmarks {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(138, 43, 226, 0.03));
    border-bottom: 2px solid rgba(138, 43, 226, 0.25);
    color: var(--accent-primary);
}

.block-icon {
    flex-shrink: 0;
    opacity: 0.8;
}

/* Tabla */
.benchmarks-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
}

.benchmarks-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.benchmarks-table th {
    padding: 0.85rem 1rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.benchmarks-table td {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: top;
}

.benchmarks-table tbody tr:last-child td {
    border-bottom: none;
}

.benchmarks-table tbody tr {
    transition: background 0.2s ease;
}

.benchmarks-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Columnas */
.col-priority {
    width: 50px;
    text-align: center;
}

.col-name {
    width: 220px;
}

.col-type {
    width: 220px;
}

/* Priority badge */
.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
}

.benchmarks-table tbody tr:hover .priority-badge {
    background: rgba(57, 255, 20, 0.15);
    color: var(--accent-secondary);
}

/* Enlace del nombre */
.benchmark-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s, text-shadow 0.2s;
    position: relative;
}

.benchmark-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent-primary);
    transition: width 0.25s ease;
}

.benchmark-link:hover {
    color: var(--accent-secondary);
    text-shadow: 0 0 12px rgba(57, 255, 20, 0.3);
}

.benchmark-link:hover::after {
    width: 100%;
    background: var(--accent-secondary);
}

/* Type tags */
.type-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.tag-aggregator {
    background: rgba(57, 255, 20, 0.08);
    color: var(--accent-secondary);
    border: 1px solid rgba(57, 255, 20, 0.2);
}

.tag-benchmark {
    background: rgba(138, 43, 226, 0.08);
    color: #b794f4;
    border: 1px solid rgba(138, 43, 226, 0.2);
}

/* ============================================
   BENCHMARKS - RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .benchmarks-section {
        margin-top: 3rem;
        padding-top: 1rem;
    }

    .benchmarks-title {
        font-size: 1.8rem;
    }

    .benchmarks-subtitle {
        font-size: 0.95rem;
    }

    .benchmarks-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }

    .benchmarks-table {
        min-width: 600px;
    }

    .benchmarks-table th,
    .benchmarks-table td {
        padding: 0.7rem 0.75rem;
        font-size: 0.82rem;
    }

    .col-name {
        width: 180px;
    }

    .col-type {
        width: 160px;
    }
    
    /* ============================================
       CARD SOURCE META (home, news, articles)
       ============================================ */
    .card-source-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.4rem 0.6rem;
        margin-top: 0.4rem;
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .card-source-link {
        color: var(--text-secondary);
        font-weight: 500;
    }
    
    .card-source-link a {
        color: var(--accent-secondary);
        text-decoration: none;
        border-bottom: 1px dotted rgba(57,255,20,0.25);
        transition: border-color 0.2s ease;
    }
    
    .card-source-link a:hover {
        border-bottom-color: var(--accent-secondary);
    }
    
    /* ============================================
       CONTENT CARD FOOTER LINE (fuente + leer noticia unificados)
       Usa grid para alineaci�n fiable: fuente a la izquierda, enlace a la derecha.
       ============================================ */
    .content-card-footer-line {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 1rem;
        width: 100%;
        margin-top: auto;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255,255,255,0.06);
    }
    
    .content-card-footer-source {
        min-width: 0;
        overflow-wrap: anywhere;
    }
    
    .content-card-footer-action {
        justify-self: end;
        text-align: right;
        white-space: nowrap;
    }
    
    .content-card-footer-action .read-more,
    .content-card-footer-action .read-article {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        margin: 0;
        text-align: right;
        white-space: nowrap;
    }
    
    /* Override any conflicting global .read-more / .read-article / .card-source-meta rules
       when they are inside .content-card-footer-line */
    .content-card-footer-line .card-source-meta {
        margin-top: 0;
    }
    
    .content-card-footer-line .read-more,
    .content-card-footer-line .read-article {
        margin-top: 0 !important;
    }
    
    /* Keep old .card-footer styles for backward compatibility (non-card contexts) */
    .card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        flex-wrap: wrap;
        margin-top: auto;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255,255,255,0.06);
        width: 100%;
    }
    
    .card-footer-left {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.4rem;
        min-width: 0;
        flex: 1 1 auto;
    }
    
    .card-footer-right {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    .card-footer .card-source-meta {
        margin-top: 0;
    }
    
    .card-footer .read-more,
    .card-footer .read-article {
        margin-top: 0;
        white-space: nowrap;
    }

    /* Mobile: ensure link stays right-aligned even when wrapped */
    @media (max-width: 520px) {
        .content-card-footer-line {
            grid-template-columns: 1fr;
        }
        .content-card-footer-action {
            justify-self: end;
            width: 100%;
        }
    }
    
    /* ============================================
       CLICKABLE CARD (tarjeta completa clicable)
       ============================================ */
    .clickable-card {
        cursor: pointer;
    }
    
    .clickable-card:focus-visible {
        outline: 2px solid var(--accent-primary);
        outline-offset: 4px;
    }
    
    .clickable-card a,
    .clickable-card button {
        cursor: pointer;
    }
    
    /* ============================================
       SIDEBAR SOURCE (miniaturas)
       ============================================ */
    .sidebar-source {
        display: block;
        font-size: 0.65rem;
        color: var(--text-secondary);
        margin-top: 0.15rem;
        opacity: 0.8;
        line-height: 1.2;
    }
    
    /* ============================================
       ADMIN SOURCE META (panel de control)
       ============================================ */
    .admin-source-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.3rem 0.5rem;
        margin-top: 0.3rem;
        font-size: 0.7rem;
        line-height: 1.3;
    }
    
    .admin-source-label {
        color: var(--text-secondary);
        font-weight: 500;
    }
    
    .admin-source-value {
        color: var(--text-primary);
    }
    
    /* Ajuste responsive para admin-source-meta en tabla */
    @media (max-width: 768px) {
        .admin-source-meta {
            flex-direction: column;
            align-items: flex-start;
            gap: 0.15rem;
        }
    }

    .block-header {
        font-size: 0.75rem;
        padding: 0.6rem 1rem;
    }
}

/* ============================================
   UTILIDADES RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ============================================
   PROMPT PREMIUM PAGE (BLOQUE 4B)
   ============================================ */

/* ---- Layout principal ---- */
.prompt-premium-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 3rem;
}

/* ---- Breadcrumb ---- */
.prompt-premium-page .prompt-breadcrumb {
    margin-bottom: 1.5rem;
}

.prompt-premium-page .breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary, #a0a0b8);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.prompt-premium-page .breadcrumb-link:hover {
    color: var(--accent-primary, #8a2be2);
}

/* ---- A. Hero ---- */
.prompt-hero {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    border: 1px solid rgba(138, 43, 226, 0.2);
    margin-bottom: 2rem;
}

.prompt-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    pointer-events: none;
}

.prompt-hero-bg .hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(138, 43, 226, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138, 43, 226, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
}

.prompt-hero-bg .hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.prompt-hero-bg .orb-hero-1 {
    width: 300px;
    height: 300px;
    background: rgba(138, 43, 226, 0.1);
    top: -100px;
    right: -100px;
}

.prompt-hero-bg .orb-hero-2 {
    width: 200px;
    height: 200px;
    background: rgba(57, 255, 20, 0.06);
    bottom: -60px;
    left: -60px;
}

.prompt-hero-content {
    position: relative;
    padding: 2.5rem 2.5rem 2rem;
    z-index: 1;
}

/* Badges del hero */
.prompt-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    align-items: center;
}

.prompt-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #a0a0b8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge-category {
    background: rgba(138, 43, 226, 0.15) !important;
    border-color: rgba(138, 43, 226, 0.3) !important;
    color: #b388ff !important;
}

.badge-difficulty {
    border-color: var(--badge-color, #39ff14) !important;
    color: var(--badge-color, #39ff14) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.badge-access {
    border-color: var(--badge-color, #39ff14) !important;
    color: var(--badge-color, #39ff14) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.badge-version {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--text-secondary, #a0a0b8) !important;
}

.badge-model {
    background: rgba(57, 255, 20, 0.08) !important;
    border-color: rgba(57, 255, 20, 0.2) !important;
    color: #39ff14 !important;
}

.badge-tag {
    background: rgba(138, 43, 226, 0.08) !important;
    border-color: rgba(138, 43, 226, 0.2) !important;
    color: var(--accent-primary, #b388ff) !important;
    font-size: 0.65rem !important;
    text-transform: lowercase !important;
}

.prompt-badge-featured {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1)) !important;
    border-color: rgba(255, 215, 0, 0.3) !important;
    color: #ffd700 !important;
}

.prompt-badge-recommended {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(57, 255, 20, 0.1)) !important;
    border-color: rgba(138, 43, 226, 0.3) !important;
    color: #d4a5ff !important;
}

.badge-draft {
    background: rgba(255, 170, 0, 0.1) !important;
    border-color: rgba(255, 170, 0, 0.3) !important;
    color: #ffaa00 !important;
}

.badge-hidden {
    background: rgba(255, 68, 68, 0.1) !important;
    border-color: rgba(255, 68, 68, 0.3) !important;
    color: #ff6666 !important;
}

/* T�tulo del hero */
.prompt-hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 1rem;
    line-height: 1.25;
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, #fff 60%, rgba(138, 43, 226, 0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Summary del hero */
.prompt-hero-summary {
    font-size: 1.05rem;
    color: var(--text-secondary, #a0a0b8);
    line-height: 1.7;
    margin: 0 0 1.75rem;
    max-width: 700px;
}

/* Botones de acci�n del hero */
.prompt-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.prompt-copy-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    line-height: 1;
}

.prompt-copy-button.primary {
    background: linear-gradient(135deg, #8a2be2, #6a1cb0);
    color: #fff;
    border: 1px solid rgba(138, 43, 226, 0.3);
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.25);
}

.prompt-copy-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.35);
}

.prompt-copy-button.primary.copied {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-color: #2ecc71;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.prompt-copy-button.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary, #a0a0b8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.prompt-copy-button.secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #e0e0e0);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ---- B. Panel de metadatos r�pido ---- */
.prompt-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.prompt-meta-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.prompt-meta-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(138, 43, 226, 0.2);
    transform: translateY(-2px);
}

.meta-card-icon {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
}

.meta-card-label {
    font-size: 0.72rem;
    color: var(--text-secondary, #a0a0b8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.meta-card-value {
    font-size: 0.95rem;
    color: var(--text-primary, #e0e0e0);
    font-weight: 600;
}

/* ---- C. Secciones de valor a�adido ---- */
.prompt-section-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.prompt-info-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.5rem;
    transition: border-color 0.3s ease;
}

.prompt-info-card:hover {
    border-color: rgba(138, 43, 226, 0.15);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.info-card-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
}

.info-card-body p {
    font-size: 0.92rem;
    color: var(--text-secondary, #a0a0b8);
    line-height: 1.7;
    margin: 0;
    white-space: pre-wrap;
}

/* ---- D. Prompt completo (bloque de c�digo premium) ---- */
.prompt-code-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(138, 43, 226, 0.15);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.prompt-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(138, 43, 226, 0.06);
    border-bottom: 1px solid rgba(138, 43, 226, 0.1);
    gap: 1rem;
    flex-wrap: wrap;
}

.prompt-code-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-primary, #8a2be2);
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
}

.code-copy-btn {
    background: rgba(138, 43, 226, 0.1) !important;
    color: var(--accent-primary, #8a2be2) !important;
    border: 1px solid rgba(138, 43, 226, 0.2) !important;
    padding: 0.45rem 1rem !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
}

.code-copy-btn:hover {
    background: rgba(138, 43, 226, 0.2) !important;
}

.code-copy-btn.copied {
    background: rgba(57, 255, 20, 0.15) !important;
    border-color: #39ff14 !important;
    color: #39ff14 !important;
}

.prompt-code-body {
    padding: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.75;
    color: #d4d4d8;
    white-space: pre-wrap;
    font-family: 'Courier New', 'Consolas', monospace;
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}

.prompt-code-body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.prompt-code-body::-webkit-scrollbar-track {
    background: transparent;
}

.prompt-code-body::-webkit-scrollbar-thumb {
    background: rgba(138, 43, 226, 0.2);
    border-radius: 3px;
}

.prompt-code-restricted {
    text-align: center;
    padding: 3rem 2rem;
}

.prompt-code-restricted .restricted-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.prompt-code-restricted h3 {
    color: var(--text-primary, #e0e0e0);
    margin-bottom: 0.5rem;
}

.prompt-code-restricted p {
    color: var(--text-secondary, #a0a0b8);
    font-size: 0.9rem;
}

.prompt-code-restricted .restricted-hint {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* ---- E. Variables detectadas ---- */
.prompt-variables-section {
    margin-bottom: 2rem;
}

.section-title-with-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    margin: 0 0 1rem;
    font-family: 'Space Grotesk', sans-serif;
}

.section-title-with-icon svg {
    color: var(--accent-primary, #8a2be2);
    flex-shrink: 0;
}

.prompt-variable-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.prompt-variable-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.9rem;
    background: rgba(138, 43, 226, 0.08);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #b388ff;
    font-family: 'Courier New', monospace;
    transition: all 0.2s ease;
}

.prompt-variable-chip:hover {
    background: rgba(138, 43, 226, 0.15);
    border-color: rgba(138, 43, 226, 0.4);
    transform: translateY(-1px);
}

/* ---- E2. Editor de variables (FASE 2) ---- */
.prompt-variables-editor-section {
    margin-bottom: 2rem;
    background: rgba(138, 43, 226, 0.03);
    border: 1px solid rgba(138, 43, 226, 0.12);
    border-radius: 16px;
    padding: 1.5rem;
}

.prompt-variables-editor-header {
    margin-bottom: 1.25rem;
}

.prompt-variables-editor-desc {
    font-size: 0.85rem;
    color: var(--text-secondary, #a0a0b8);
    margin: 0.3rem 0 0;
}

.prompt-variables-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.variable-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.variable-form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.variable-form-code {
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    background: rgba(138, 43, 226, 0.1);
    border-radius: 4px;
    color: var(--accent-primary, #b388ff);
}

.variable-form-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-subtle, #2a2a3e);
    border-radius: 8px;
    color: var(--text-primary, #e0e0e0);
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.variable-form-input:focus {
    outline: none;
    border-color: var(--accent-primary, #8a2be2);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1);
}

.variable-form-input::placeholder {
    color: var(--text-secondary, #a0a0b8);
    opacity: 0.5;
}

.prompt-generated-section {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-subtle, #2a2a3e);
    border-radius: 12px;
    overflow: hidden;
}

.prompt-generated-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-subtle, #2a2a3e);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.prompt-generated-header h4 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary, #e0e0e0);
    font-family: 'Space Grotesk', sans-serif;
}

.prompt-generated-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.generated-prompt-body {
    padding: 1.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-primary, #e0e0e0);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .prompt-variables-form {
        grid-template-columns: 1fr;
    }
    .prompt-generated-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .prompt-generated-actions {
        width: 100%;
    }
    .prompt-generated-actions .prompt-copy-button {
        flex: 1;
        justify-content: center;
    }
}

/* ---- F. Prompts relacionados ---- */
.prompt-related-section {
    margin-bottom: 2rem;
}

.prompt-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.prompt-related-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.prompt-related-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(138, 43, 226, 0.2);
    transform: translateY(-3px);
}

.related-card-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.related-model {
    font-size: 0.72rem;
    color: var(--text-secondary, #a0a0b8);
    font-weight: 500;
}

.related-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    margin: 0;
    line-height: 1.4;
    font-family: 'Space Grotesk', sans-serif;
}

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent-primary, #8a2be2);
    text-decoration: none;
    transition: gap 0.2s ease;
    margin-top: auto;
}

.related-link:hover {
    gap: 0.6rem;
    color: #9b4dff;
}

/* ---- Toast ---- */
.prompt-premium-page .copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(57, 255, 20, 0.15);
    border: 1px solid #39ff14;
    color: #39ff14;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.prompt-premium-page .copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Recommendation stars ---- */
.recommendation-stars {
    display: inline-flex;
    gap: 2px;
    align-items: center;
}

.recommendation-stars svg {
    display: block;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .prompt-premium-page {
        padding: 1rem 0.75rem 2rem;
    }

    .prompt-hero-content {
        padding: 1.5rem 1.25rem;
    }

    .prompt-hero-title {
        font-size: 1.5rem;
    }

    .prompt-hero-summary {
        font-size: 0.92rem;
    }

    .prompt-hero-actions {
        flex-direction: column;
    }

    .prompt-copy-button {
        width: 100%;
        justify-content: center;
    }

    .prompt-meta-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .prompt-meta-card {
        padding: 0.75rem;
    }

    .prompt-info-card {
        padding: 1.1rem;
    }

    .prompt-code-header {
        padding: 0.75rem 1rem;
    }

    .prompt-code-body {
        padding: 1rem;
        font-size: 0.88rem;
        max-height: 400px;
    }

    .prompt-related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .prompt-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .prompt-hero-badges {
        gap: 0.35rem;
    }

    .prompt-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.55rem;
    }
}

/* ============================================
   BLOQUE 4C - BIBLIOTECA DE PROMPTS MEJORADA
   ============================================ */

/* ---- Hero / Cabecera mejorada ---- */
.prompts-hero {
    position: relative;
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 1.5rem;
    border-radius: 20px;
    background: rgba(138, 43, 226, 0.03);
    border: 1px solid var(--border-subtle, #2a2a3e);
    overflow: hidden;
}

.prompts-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.prompts-hero-bg .hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(138, 43, 226, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138, 43, 226, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

.prompts-hero-bg .hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.prompts-hero-bg .orb-hero-1 {
    width: 300px;
    height: 300px;
    background: rgba(138, 43, 226, 0.08);
    top: -100px;
    right: -100px;
}

.prompts-hero-bg .orb-hero-2 {
    width: 250px;
    height: 250px;
    background: rgba(57, 255, 20, 0.05);
    bottom: -80px;
    left: -80px;
}

.prompts-hero-content {
    position: relative;
    z-index: 1;
}

.prompts-hero-content .header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--accent-primary, #8a2be2);
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding: 0.35rem 1rem;
    border-radius: 100px;
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.2);
}

.prompts-hero-content .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-secondary, #39ff14);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.prompts-hero-content h1 {
    font-size: 2.8rem;
    margin: 0 0 0.75rem;
    line-height: 1.1;
}

.prompts-hero-subtitle {
    color: var(--text-secondary, #a0a0b8);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* ---- M�tricas r�pidas ---- */
.prompts-hero-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.prompts-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle, #2a2a3e);
    border-radius: 12px;
    min-width: 100px;
    transition: all 0.3s ease;
}

.prompts-stat-card:hover {
    background: rgba(138, 43, 226, 0.05);
    border-color: rgba(138, 43, 226, 0.2);
    transform: translateY(-1px);
}

.prompts-stat-card .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.prompts-stat-card .stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary, #a0a0b8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* ---- Secci�n Prompts Destacados ---- */
.featured-prompts-section {
    margin-bottom: 3rem;
}

.featured-section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.featured-section-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.featured-section-header h2 .accent {
    font-size: 1.4rem;
}

.featured-section-subtitle {
    color: var(--text-secondary, #a0a0b8);
    font-size: 0.95rem;
}

.featured-prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 1.5rem;
}

/* Tarjeta destacada */
.prompt-card-featured {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid rgba(138, 43, 226, 0.3);
    transition: all 0.3s ease;
}

.prompt-card-featured:hover {
    border-color: var(--accent-primary, #8a2be2);
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(138, 43, 226, 0.2);
}

.prompt-card-featured .featured-glow {
    position: absolute;
    inset: -1px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(57, 255, 20, 0.1), rgba(138, 43, 226, 0.15));
    pointer-events: none;
    z-index: 0;
}

.prompt-card-featured .prompt-card-bg {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    pointer-events: none;
}

.prompt-card-featured .prompt-card-content {
    position: relative;
    padding: 1.5rem;
    z-index: 1;
}

/* ---- Badges de curadur�a ---- */
.prompt-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.prompt-featured-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.55rem;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(57, 255, 20, 0.1));
    border: 1px solid rgba(138, 43, 226, 0.4);
    color: #b388ff;
    white-space: nowrap;
}

.prompt-recommendation-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.55rem;
    border-radius: 100px;
    background: rgba(255, 170, 0, 0.15);
    border: 1px solid rgba(255, 170, 0, 0.4);
    color: #ffaa00;
    white-space: nowrap;
}

.prompt-new-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.55rem;
    border-radius: 100px;
    background: rgba(57, 255, 20, 0.12);
    border: 1px solid rgba(57, 255, 20, 0.35);
    color: #39ff14;
    white-space: nowrap;
    animation: pulse-new 2s ease-in-out infinite;
}

@keyframes pulse-new {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ---- Tarjeta premium (listado principal) ---- */
.prompt-card-premium {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--border-subtle, #2a2a3e);
    transition: all 0.3s ease;
}

.prompt-card-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(138, 43, 226, 0.12);
}

/* Dificultad: borde superior */
.prompt-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
    z-index: 2;
    transition: all 0.3s ease;
}

.prompt-difficulty-basico::before {
    background: linear-gradient(90deg, #39ff14, rgba(57, 255, 20, 0.3));
}

.prompt-difficulty-intermedio::before {
    background: linear-gradient(90deg, #ffaa00, rgba(255, 170, 0, 0.3));
}

.prompt-difficulty-advanced::before {
    background: linear-gradient(90deg, #ff6b35, rgba(255, 107, 53, 0.3));
}

.prompt-card-premium .prompt-card-bg {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    pointer-events: none;
}

.prompt-card-premium .prompt-card-content {
    position: relative;
    padding: 1.5rem;
    z-index: 1;
}

/* ---- Lista de etiquetas (tags) en tarjetas ---- */
.prompt-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
}

.prompt-tag-item {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 4px;
    background: rgba(138, 43, 226, 0.12);
    border: 1px solid rgba(138, 43, 226, 0.2);
    color: var(--accent-primary, #b388ff);
    letter-spacing: 0.02em;
    text-transform: lowercase;
    line-height: 1.4;
}

.prompt-tag-item::before {
    content: '#';
    opacity: 0.6;
    margin-right: 0.1rem;
}

/* ---- Acciones de tarjeta ---- */
.prompt-card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Acciones espec�ficas para tarjetas destacadas: Copiar a izquierda, Ver detalle a derecha */
.prompt-card-featured .prompt-card-actions {
    justify-content: space-between;
    align-items: center;
}

.prompt-card-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.2);
    color: #39ff14;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-decoration: none;
}

.prompt-card-copy:hover {
    background: rgba(57, 255, 20, 0.15);
    border-color: rgba(57, 255, 20, 0.4);
    transform: translateY(-1px);
}

.prompt-card-copy.copied {
    background: rgba(57, 255, 20, 0.2);
    border-color: #39ff14;
    color: #39ff14;
}

.prompt-card-view {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.3);
    color: var(--accent-primary, #8a2be2);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.prompt-card-view:hover {
    background: rgba(138, 43, 226, 0.2);
    border-color: var(--accent-primary, #8a2be2);
    transform: translateX(2px);
}

/* ---- Panel de filtros redise�ado (Bloque 4C v2) ---- */
.prompts-filter-panel {
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.04), rgba(57, 255, 20, 0.02));
    border: 1px solid var(--border-subtle, #2a2a3e);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.prompts-filter-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(138, 43, 226, 0.3), rgba(57, 255, 20, 0.2), rgba(138, 43, 226, 0.3));
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.filter-panel-header h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.7;
}

.prompts-clear-filters {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    background: rgba(138, 43, 226, 0.08);
    border: 1px solid rgba(138, 43, 226, 0.2);
    color: var(--accent-primary, #8a2be2);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
}

.prompts-clear-filters:hover {
    background: rgba(138, 43, 226, 0.15);
    border-color: rgba(138, 43, 226, 0.4);
    transform: translateY(-1px);
}

.prompts-clear-filters svg {
    flex-shrink: 0;
}

/* Buscador */
.prompts-search {
    position: relative;
    margin-bottom: 1rem;
}

.prompts-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary, #a0a0b8);
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 0.85rem 2.75rem 0.85rem 2.85rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(138, 43, 226, 0.15);
    border-radius: 12px;
    color: var(--text-primary, #e0e0e0);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-secondary, #a0a0b8);
    opacity: 0.6;
}

.search-input:focus {
    border-color: var(--accent-primary, #8a2be2);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.12), inset 0 0 0 1px rgba(138, 43, 226, 0.05);
    background: rgba(0, 0, 0, 0.5);
}

.search-clear {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: var(--text-secondary, #a0a0b8);
    cursor: pointer;
    padding: 0.3rem;
    display: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 1;
}

.search-clear:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #e0e0e0);
}

.search-clear.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fila de filtros */
.prompts-filters-row {
    display: flex;
    gap: 0.85rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 170px;
}

.filter-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary, #a0a0b8);
    margin-bottom: 0.4rem;
    opacity: 0.7;
}

.filter-select-wrapper {
    position: relative;
}

.filter-select {
    width: 100%;
    padding: 0.7rem 2.25rem 0.7rem 0.85rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(138, 43, 226, 0.12);
    border-radius: 10px;
    color: var(--text-primary, #e0e0e0);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    outline: none;
    line-height: 1.4;
}

.filter-select:focus {
    border-color: var(--accent-primary, #8a2be2);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.12);
    background: rgba(0, 0, 0, 0.5);
}

.filter-select option {
    background: #1a1a2e;
    color: var(--text-primary, #e0e0e0);
    padding: 0.5rem;
}

.select-arrow {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary, #a0a0b8);
    pointer-events: none;
    opacity: 0.6;
}

/* Contador de resultados integrado */
.filter-results-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.85rem;
    background: rgba(138, 43, 226, 0.06);
    border: 1px solid rgba(138, 43, 226, 0.12);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-secondary, #a0a0b8);
    white-space: nowrap;
    align-self: flex-end;
    margin-bottom: 0.1rem;
}

.filter-results-count #resultsVisible {
    color: var(--accent-primary, #8a2be2);
    font-weight: 700;
    font-size: 0.8rem;
}

.filter-results-count #resultsTotal {
    color: var(--text-secondary, #a0a0b8);
    font-weight: 500;
}

/* ---- Toast de copiado ---- */
.copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(57, 255, 20, 0.15);
    border: 1px solid #39ff14;
    color: #39ff14;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Responsive para Bloque 4C ---- */
@media (max-width: 1024px) {
    .featured-prompts-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .prompts-hero-content h1 {
        font-size: 2rem;
    }

    .prompts-hero-subtitle {
        font-size: 1rem;
    }

    .prompts-hero {
        padding: 2rem 1rem;
    }

    .prompts-hero-stats {
        gap: 0.5rem;
    }

    .prompts-stat-card {
        padding: 0.5rem 0.75rem;
        min-width: 80px;
    }

    .prompts-stat-card .stat-number {
        font-size: 1.2rem;
    }

    .prompts-stat-card .stat-label {
        font-size: 0.6rem;
    }

    .featured-prompts-grid {
        grid-template-columns: 1fr;
    }

    .featured-section-header h2 {
        font-size: 1.4rem;
    }

    .prompt-card-actions {
        flex-direction: column;
    }

    .prompt-card-copy,
    .prompt-card-view {
        width: 100%;
        justify-content: center;
    }

    /* Responsive panel filtros */
    .prompts-filter-panel {
        padding: 1.1rem;
    }

    .filter-panel-header {
        flex-direction: column;
        gap: 0.6rem;
        align-items: flex-start;
    }

    .prompts-filters-row {
        flex-direction: column;
        gap: 0.7rem;
    }

    .filter-group {
        min-width: 100%;
    }

    .filter-results-count {
        align-self: flex-start;
        margin-top: 0.25rem;
    }

    .search-input {
        font-size: 0.9rem;
        padding: 0.75rem 2.5rem 0.75rem 2.65rem;
    }
}

/* ============================================
   PROMPTS ADMIN 4D - HERO
   ============================================ */
.prompts-admin-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(138,43,226,0.08), rgba(57,255,20,0.04));
    border: 1px solid rgba(138,43,226,0.2);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.prompts-admin-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
    opacity: 0.6;
}

.prompts-admin-hero-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.prompts-admin-hero-left h2 {
    font-size: 1.6rem;
    margin: 0;
}

.prompts-admin-hero-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(138,43,226,0.12);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    border: 1px solid rgba(138,43,226,0.2);
    white-space: nowrap;
}

.prompts-admin-hero-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================
   PROMPTS ADMIN 4D - TOOLBAR & SEARCH
   ============================================ */
.prompts-admin-toolbar {
    margin-bottom: 0.75rem;
}

.prompts-admin-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.prompts-admin-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.prompts-admin-search-input {
    flex: 1;
    min-width: 280px;
    padding: 0.75rem 1rem 0.75rem 2.8rem;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.prompts-admin-search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(138,43,226,0.12);
    background: rgba(0,0,0,0.45);
}

.prompts-admin-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.prompts-admin-count {
    font-size: 0.82rem;
    color: var(--text-secondary);
    white-space: nowrap;
    padding: 0.3rem 0.8rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}

.prompts-admin-count strong {
    color: var(--accent-secondary);
}

/* ============================================
   PROMPTS ADMIN 4D - FILTER PANEL
   ============================================ */
.prompts-admin-filter-panel {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

.prompts-admin-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-select {
    padding: 0.5rem 0.65rem;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    padding-right: 2rem;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--accent-primary);
}

.filter-select option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* ============================================
   PROMPTS ADMIN 4D - TABLE WRAPPER
   ============================================ */
.prompts-admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin-top: 0.5rem;
    border-radius: 8px;
}

/* ============================================
   PROMPTS ADMIN 4D - TABLE
   ============================================ */
.prompts-admin-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 0.85rem;
}

.prompts-admin-table thead th {
    padding: 0.7rem 0.6rem;
    text-align: left;
    border-bottom: 2px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1;
}

.prompts-admin-table tbody td {
    padding: 0.65rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.prompts-admin-table tbody tr {
    transition: background 0.15s ease;
}

.prompts-admin-table tbody tr:hover {
    background: rgba(138,43,226,0.04);
}

/* Column widths */
.prompts-admin-table .th-id,
.prompts-admin-table .cell-id {
    min-width: 50px;
    width: 50px;
    text-align: center;
    white-space: nowrap;
}

.prompts-admin-table .th-title,
.prompts-admin-table .cell-title {
    min-width: 300px;
}

.prompts-admin-table .th-cat,
.prompts-admin-table .cell-cat {
    min-width: 110px;
    white-space: nowrap;
}

.prompts-admin-table .th-diff,
.prompts-admin-table .cell-diff {
    min-width: 100px;
    white-space: nowrap;
}

.prompts-admin-table .th-access,
.prompts-admin-table .cell-access {
    min-width: 90px;
    white-space: nowrap;
}

.prompts-admin-table .th-model,
.prompts-admin-table .cell-model {
    min-width: 130px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance;
    max-width: 150px;
}

.prompts-admin-table .th-ver,
.prompts-admin-table .cell-ver {
    min-width: 55px;
    text-align: center;
    white-space: nowrap;
}

.prompts-admin-table .th-feat,
.prompts-admin-table .cell-feat {
    min-width: 70px;
    text-align: center;
    white-space: nowrap;
}

.prompts-admin-table .th-rec,
.prompts-admin-table .cell-rec {
    min-width: 70px;
    text-align: center;
    white-space: nowrap;
}

.prompts-admin-table .th-order,
.prompts-admin-table .cell-order {
    min-width: 55px;
    text-align: center;
    white-space: nowrap;
}

.admin-order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    background: rgba(138, 43, 226, 0.08);
    border: 1px solid rgba(138, 43, 226, 0.15);
    color: var(--accent-primary, #b388ff);
}

/* Course Code column in admin table */
.prompts-admin-table .th-code,
.prompts-admin-table .cell-code {
    min-width: 85px;
    width: 85px;
    text-align: center;
    white-space: nowrap;
}

.course-code-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    letter-spacing: 0.04em;
    border-radius: 6px;
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.15);
    color: var(--accent-secondary, #39ff14);
}

/* Prompt slug code in admin list title */
.prompt-list-code {
    display: inline;
    color: var(--accent-secondary, #39ff14);
    font-family: 'Space Grotesk', 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    margin-right: 0.1rem;
}

/* Course Code badge in public single view */
.cs-badge.cs-badge-code {
    background: rgba(57, 255, 20, 0.1);
    border-color: rgba(57, 255, 20, 0.25);
    color: var(--accent-secondary, #39ff14);
    font-family: 'Space Grotesk', monospace;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.prompts-admin-table .th-status,
.prompts-admin-table .cell-status {
    min-width: 100px;
    white-space: nowrap;
}

.prompts-admin-table .th-date,
.prompts-admin-table .cell-date {
    min-width: 75px;
    white-space: nowrap;
}

.prompts-admin-table .th-actions,
.prompts-admin-table .cell-actions {
    min-width: 300px;
    white-space: nowrap;
    position: sticky;
    right: 0;
    z-index: 2;
    background: var(--bg-surface, #13131a);
}

.prompts-admin-table thead .th-actions {
    background: rgba(0,0,0,0.15);
}

.prompts-admin-table tbody .cell-actions::after {
    content: '';
    position: absolute;
    left: -12px;
    top: 0;
    bottom: 0;
    width: 12px;
    background: linear-gradient(to right, transparent, var(--bg-surface, #13131a));
    pointer-events: none;
}

/* ============================================
   PROMPTS ADMIN 4D - TITLE BLOCK
   ============================================ */
.admin-prompt-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.prompt-title-text {
    font-size: 0.92rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.prompt-slug-text {
    font-size: 0.72rem;
    opacity: 0.7;
}

/* ============================================
   PROMPTS ADMIN 4D - SUBMETA (use_case, time, curator)
   ============================================ */
.admin-prompt-submeta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.admin-prompt-submeta-item {
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    line-height: 1.4;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.submeta-usecase {
    max-width: 280px;
}

.submeta-curator {
    max-width: 200px;
}

.submeta-time {
    color: var(--accent-secondary);
    border-color: rgba(57,255,20,0.15);
    background: rgba(57,255,20,0.04);
}

/* ============================================
   PROMPTS ADMIN 4D - BADGES
   ============================================ */
.admin-prompt-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 100px;
    white-space: nowrap;
    line-height: 1.3;
    border: 1px solid;
}

/* Category badge */
.cat-badge {
    border-color: var(--badge-color, #8a2be2);
    color: var(--badge-color, #8a2be2);
    background: rgba(138,43,226,0.08);
}

/* Status badges */
.admin-prompt-badge.status-published {
    background: rgba(57,255,20,0.12);
    border-color: #39ff14;
    color: #39ff14;
}

.admin-prompt-badge.status-draft {
    background: rgba(255,170,0,0.12);
    border-color: #ffaa00;
    color: #ffaa00;
}

.admin-prompt-badge.status-hidden {
    background: rgba(255,68,68,0.12);
    border-color: #ff4444;
    color: #ff4444;
}

/* Difficulty badges */
.admin-prompt-badge.diff-basico {
    background: rgba(57,255,20,0.1);
    border-color: #39ff14;
    color: #39ff14;
}

.admin-prompt-badge.diff-intermedio {
    background: rgba(255,170,0,0.1);
    border-color: #ffaa00;
    color: #ffaa00;
}

.admin-prompt-badge.diff-avanzado {
    background: rgba(255,107,53,0.1);
    border-color: #ff6b35;
    color: #ff6b35;
}

/* Access badges */
.admin-prompt-badge.access-public {
    background: rgba(57,255,20,0.1);
    border-color: #39ff14;
    color: #39ff14;
}

.admin-prompt-badge.access-nivel1 {
    background: rgba(138,43,226,0.1);
    border-color: #8a2be2;
    color: #b388ff;
}

.admin-prompt-badge.access-nivel2 {
    background: rgba(255,170,0,0.1);
    border-color: #ffaa00;
    color: #ffaa00;
}

.admin-prompt-badge.access-nivel3 {
    background: rgba(255,68,68,0.1);
    border-color: #ff4444;
    color: #ff4444;
}

/* Featured badge */
.admin-prompt-badge.feat-destacado {
    background: rgba(255,215,0,0.12);
    border-color: #ffd700;
    color: #ffd700;
}

/* ============================================
   PROMPTS ADMIN 4D - RECOMMENDED BADGE
   ============================================ */
.admin-recommended-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 100px;
    white-space: nowrap;
    line-height: 1.3;
    border: 1px solid;
}

.admin-recommended-badge.rec-alta {
    background: rgba(255,215,0,0.12);
    border-color: #ffd700;
    color: #ffd700;
}

.admin-recommended-badge.rec-baja {
    background: rgba(138,43,226,0.1);
    border-color: #8a2be2;
    color: #b388ff;
}

/* ============================================
   PROMPTS ADMIN 4D - ACTIONS
   ============================================ */
.admin-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
}

.admin-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.82rem;
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
    flex-shrink: 0;
}

.admin-action-btn:hover {
    transform: scale(1.1);
}

.admin-action-btn.action-view:hover {
    background: rgba(138,43,226,0.12);
    border-color: var(--accent-primary);
}

.admin-action-btn.action-edit:hover {
    background: rgba(138,43,226,0.12);
    border-color: var(--accent-primary);
}

.admin-action-btn.action-publish:hover {
    background: rgba(57,255,20,0.12);
    border-color: #39ff14;
}

.admin-action-btn.action-draft:hover {
    background: rgba(255,170,0,0.12);
    border-color: #ffaa00;
}

.admin-action-btn.action-hide:hover {
    background: rgba(255,68,68,0.12);
    border-color: #ff4444;
}

.admin-action-btn.action-delete:hover {
    background: rgba(255,0,0,0.12);
    border-color: #ff0000;
}

/* Featured toggle in table */
.action-link-featured {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
    flex-shrink: 0;
}

.action-link-featured.featured-on {
    color: #ffd700;
}

.action-link-featured.featured-off {
    color: var(--text-secondary);
}

.action-link-featured:hover {
    background: rgba(255,215,0,0.12);
    border-color: #ffd700;
    transform: scale(1.1);
}

/* ============================================
   PROMPTS ADMIN 4D - RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .prompts-admin-hero {
        padding: 1rem 1.25rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .prompts-admin-hero-actions {
        width: 100%;
    }

    .prompts-admin-hero-actions .btn-sm {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    .prompts-admin-search {
        flex-direction: column;
        align-items: stretch;
    }

    .prompts-admin-search-input {
        min-width: 0;
    }

    .prompts-admin-count {
        text-align: center;
    }

    .prompts-admin-filters-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .prompts-admin-table {
        font-size: 0.78rem;
    }

    .prompts-admin-table tbody td {
        padding: 0.5rem 0.4rem;
    }

    .prompts-admin-table .th-title,
    .prompts-admin-table .cell-title {
        min-width: 300px;
    }

    .admin-prompt-submeta-item {
        max-width: 180px;
        font-size: 0.68rem;
    }

    .submeta-usecase {
        max-width: 180px;
    }

    .submeta-curator {
        max-width: 140px;
    }

    .admin-actions {
        gap: 2px;
    }

    .admin-action-btn {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .action-link-featured {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }
}

/* ============================================
   PROMPT FORM 4D - EXTENDED FIELDS GRID
   ============================================ */
.extended-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.extended-field-card {
    background: rgba(0,0,0,0.15);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.extended-field-card:hover {
    border-color: rgba(138,43,226,0.2);
    background: rgba(138,43,226,0.03);
}

.extended-field-card-full {
    grid-column: 1 / -1;
}

.extended-field-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.extended-field-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.extended-field-card-header .form-label {
    margin-bottom: 0;
    font-size: 0.82rem;
}

/* Form section divider header */
.form-section-divider-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .extended-fields-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .prompts-hero-content h1 {
        font-size: 1.6rem;
    }

    .prompts-hero-stats {
        flex-direction: column;
        align-items: center;
    }

    .prompts-stat-card {
        width: 100%;
        max-width: 200px;
    }

    .prompts-filter-panel {
        padding: 0.9rem;
    }
}

/* ============================================
   NEWS IMPORT - PANTALLA DE IMPORTACI�N IA
   ============================================ */
.news-import-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.news-import-hero {
    text-align: center;
    padding: 2rem 1rem;
}

.news-import-hero h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.news-import-upload-card {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    padding: 1.5rem;
}

.news-import-upload-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

/* Grid de previsualizaci�n */
.news-import-preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .news-import-preview-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .news-import-preview-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Tarjeta de noticia */
.news-import-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.news-import-card:hover {
    border-color: rgba(138,43,226,0.25);
    box-shadow: 0 4px 20px rgba(138,43,226,0.08);
}

.news-import-card-duplicate {
    border-left: 3px solid #f59e0b;
}

.news-import-card-invalid {
    border-left: 3px solid #ef4444;
    opacity: 0.7;
}

/* Cabecera de tarjeta */
.news-import-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.news-import-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    user-select: none;
}

.news-import-checkbox {
    accent-color: var(--accent-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.news-import-checkbox-custom {
    display: none;
}

.news-import-svg-confirm {
    padding: 0.5rem;
    background: rgba(245,158,11,0.08);
    border-radius: 6px;
    border: 1px solid rgba(245,158,11,0.2);
    margin-top: 0.3rem;
}

/* T�tulo */
.news-import-title {
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}

/* Metadatos */
.news-import-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.news-import-meta-label {
    color: var(--text-secondary);
    font-weight: 600;
    flex-shrink: 0;
}

.news-import-meta-value {
    color: var(--text-primary);
    font-size: 0.8rem;
}

.news-import-meta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.news-import-url {
    color: var(--accent-primary);
    word-break: break-all;
    font-size: 0.8rem;
}

.news-import-url:hover {
    text-decoration: underline;
}

/* Badges */
.news-import-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
}

.news-import-badge-idx {
    background: rgba(138,43,226,0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(138,43,226,0.2);
}

.news-import-badge-cat {
    background: rgba(57,255,20,0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(57,255,20,0.15);
}

.news-import-badge-source {
    font-size: 0.7rem;
    text-transform: uppercase;
}

.news-import-badge-importance {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.2);
}

.news-import-badge-tag {
    background: rgba(138,43,226,0.08);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    font-size: 0.7rem;
}

.news-import-badge-format {
    background: rgba(57,255,20,0.08);
    color: var(--accent-secondary);
    border: 1px solid rgba(57,255,20,0.12);
    font-size: 0.7rem;
    font-weight: 700;
}

.news-import-badge-info {
    background: rgba(59,130,246,0.12);
    color: #3b82f6;
    border: 1px solid rgba(59,130,246,0.2);
}

/* Tags container */
.news-import-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

/* Resumen */
.news-import-summary {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.6rem;
    margin-top: auto;
}

.news-import-summary p {
    margin: 0;
}

/* Avisos */
.news-import-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.5rem;
    background: rgba(245,158,11,0.08);
    border-radius: 6px;
    border: 1px solid rgba(245,158,11,0.15);
    font-size: 0.8rem;
    color: #f59e0b;
    line-height: 1.4;
}

.news-import-warning-icon {
    flex-shrink: 0;
    font-size: 0.9rem;
}

.news-import-warning-error {
    background: rgba(239,68,68,0.08);
    border-color: rgba(239,68,68,0.2);
    color: #ef4444;
}

.news-import-warning-info {
    background: rgba(59,130,246,0.08);
    border-color: rgba(59,130,246,0.2);
    color: #3b82f6;
}

/* Secci�n de imagen */
.news-import-image-section {
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.6rem;
    margin-top: auto;
}

.news-import-image-preview {
    width: 100%;
    max-height: 180px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-import-image-preview img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.news-import-image-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.news-import-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
    border: 1px dashed var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Botones de acci�n */
.news-import-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Grid de resumen */
.news-import-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.news-import-summary-item {
    text-align: center;
    padding: 1rem;
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.news-import-summary-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.2;
    color: var(--text-primary);
}

.news-import-summary-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

/* Utilidades */
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }

/* ============================================
   BOLSA DE NOTICIAS (news_queue)
   ============================================ */

/* Badge contador */
.news-queue-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff8c00, #ffd700);
    color: #1a1a2e;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
    line-height: 1.4;
}

/* Acciones globales */
.news-queue-global-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Botones de acci�n global en Bolsa de Noticias */
.news-queue-global-actions .btn-submit,
.news-queue-global-actions .btn-outline {
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
}

/* Botones de acci�n masiva en Importar Noticias IA */
.news-import-actions .btn-outline {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Bot�n Cancelar importaci�n con borde rojo visible */
.btn-outline.btn-danger {
    border-color: #ff4444 !important;
    color: #ff4444 !important;
    background: rgba(255,68,68,0.06) !important;
}

.btn-outline.btn-danger:hover {
    background: rgba(255,68,68,0.18) !important;
    border-color: #ff6666 !important;
    color: #ff6666 !important;
}

/* Barra de acci�n final en Importar Art�culos */
.news-import-action-bar {
    background: var(--card-bg, #1e1e32);
    border: 1px solid var(--border-subtle, #2a2a4a);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    position: sticky;
    bottom: 1rem;
    z-index: 10;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.news-import-action-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.news-import-action-bar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.news-import-action-bar-right {
    display: flex;
    align-items: center;
}

.news-import-action-summary {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-secondary, #39ff14);
    background: rgba(57,255,20,0.08);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(57,255,20,0.15);
    white-space: nowrap;
}

/* Bot�n grande */
.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1.1rem;
}

/* Grid de tarjetas */
.news-queue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

/* Tarjeta individual */
.news-queue-card {
    background: var(--card-bg, #1e1e32);
    border: 1px solid var(--border-subtle, #2a2a4a);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.news-queue-card:hover {
    border-color: #ff8c00;
    box-shadow: 0 4px 20px rgba(255, 140, 0, 0.15);
}

/* Header de tarjeta */
.news-queue-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-subtle, #2a2a4a);
    flex-wrap: wrap;
}

.news-queue-id {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-secondary, #888);
}

.news-queue-batch {
    font-size: 0.7rem;
    color: var(--text-secondary, #888);
    margin-left: auto;
    font-family: monospace;
}

/* Cuerpo de tarjeta */
.news-queue-card-body {
    padding: 1rem;
}

/* Imagen */
.news-queue-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background: #111;
}

.news-queue-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-queue-image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: #1a1a2e;
    color: #555;
}

.news-queue-image-warning {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.75);
    color: #ffd700;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

/* T�tulo */
.news-queue-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #eee);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Resumen */
.news-queue-summary {
    font-size: 0.85rem;
    color: var(--text-secondary, #aaa);
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Metadatos */
.news-queue-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary, #888);
    margin-bottom: 0.5rem;
}

.news-queue-date,
.news-queue-source {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.news-queue-source a {
    color: var(--accent, #39ff14);
    text-decoration: none;
}

.news-queue-source a:hover {
    text-decoration: underline;
}

/* Importado en */
.news-queue-imported-at {
    font-size: 0.75rem;
    color: var(--text-secondary, #666);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle, #2a2a4a);
}

/* Imagen original + prompt fallback */
.news-queue-original-image {
    font-size: 0.75rem;
    color: var(--text-secondary, #888);
    margin-top: 0.4rem;
}

.news-queue-original-image a {
    color: var(--accent, #39ff14);
    text-decoration: none;
}

.news-queue-original-image a:hover {
    text-decoration: underline;
}

.news-queue-prompt-fallback {
    display: block;
    margin-top: 0.25rem;
    font-style: italic;
    color: #999;
    font-size: 0.7rem;
}

/* Acciones de tarjeta */
.news-queue-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-subtle, #2a2a4a);
    flex-wrap: wrap;
}

/* Alertas */
.alert-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff6666;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Category badge reutilizado */
.category-badge {
    display: inline-block;
    background: rgba(57, 255, 20, 0.1);
    color: #39ff14;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .news-queue-grid {
        grid-template-columns: 1fr;
    }
    
    .news-queue-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .news-queue-batch {
        margin-left: 0;
    }
    
    .news-queue-card-actions {
        flex-direction: column;
    }
    
    .news-queue-card-actions .btn-sm {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   CONTENT CARD FOOTER LINE � OVERRIDES FINALES
   Garantiza que fuente quede a la izquierda y
   "Leer Noticia/Art�culo" a la derecha.
   ============================================ */
.content-card-footer-line {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    width: 100% !important;
    margin-top: auto !important;
}

.content-card-footer-source {
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.content-card-footer-action {
    flex: 0 0 auto !important;
    margin-left: auto !important;
    text-align: right !important;
}

.content-card-footer-action .read-more,
.content-card-footer-action .read-article {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin: 0 !important;
    text-align: right !important;
    white-space: nowrap !important;
}

.content-card-footer-line .card-source-meta {
    margin: 0 !important;
}

@media (max-width: 520px) {
    .content-card-footer-line {
        flex-wrap: wrap !important;
    }

    .content-card-footer-action {
        width: 100% !important;
        text-align: right !important;
    }
}

/* ============================================
   SOURCE PREFIX � "Fuente:" antes del nombre
   Mejora de contraste y legibilidad en fondo oscuro
   ============================================ */
.source-prefix {
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    margin-right: 0.25rem !important;
}

.content-card-footer-source {
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
    color: var(--text-secondary) !important;
}

.content-card-footer-source .card-source-link,
.content-card-footer-source .card-source-link a {
    color: var(--accent-secondary) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.content-card-footer-source .card-source-link a:hover {
    color: var(--accent-primary) !important;
    text-decoration: underline !important;
}

.content-card-footer-source .source-type-badge,
.content-card-footer-source .meta-source-type {
    color: var(--text-primary) !important;
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.14) !important;
}

/* Forzar que los enlaces de fuente dentro de .content-card-footer-source
   NUNCA usen azul oscuro predeterminado del navegador */
.content-card-footer-source a:not(.read-more):not(.read-article) {
    color: var(--accent-secondary) !important;
}
.content-card-footer-source a:not(.read-more):not(.read-article):visited {
    color: var(--accent-secondary) !important;
}

/* ============================================
   FICHA EDITORIAL � TARJETA VISUAL (single.php)
   ============================================ */
.content-meta-card {
    background: linear-gradient(135deg, rgba(138,43,226,0.08) 0%, rgba(57,255,20,0.04) 100%);
    border: 1px solid rgba(255,255,255,0.10);
    border-left: 4px solid transparent;
    border-image: linear-gradient(180deg, var(--accent-secondary), var(--accent-primary)) 1;
    border-image-slice: 1;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    margin: 1.5rem 0 2rem 0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    position: relative;
}

.content-meta-card__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

/* ============================================
   BLOQUE MULTIMEDIA (Audio, Vídeo, Infografía)
   ============================================ */
.multimedia-section {
    margin-top: 2rem;
}

.multimedia-block {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.multimedia-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.multimedia-block__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 0.75rem 0;
}

.multimedia-block audio,
.multimedia-block video {
    background: #0a0a0f;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}

.multimedia-block video:hover {
    border-color: rgba(138,43,226,0.4);
}

.multimedia-block .clickable-img {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.multimedia-block .clickable-img:hover {
    border-color: rgba(138,43,226,0.6) !important;
    box-shadow: 0 0 20px rgba(138,43,226,0.15);
}

.content-meta-list {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.content-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 0.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.content-meta-row dt {
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    min-width: 7.5rem;
    flex-shrink: 0;
}

.content-meta-row dd {
    margin: 0;
    color: var(--text-primary);
    word-break: break-word;
}

.content-meta-row dd a {
    color: var(--accent-secondary);
    text-decoration: none;
    border-bottom: 1px dotted rgba(57,255,20,0.3);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.content-meta-row dd a:hover {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* Badge de tipo de fuente */
.source-type-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.source-type-oficial {
    background: rgba(57,255,20,0.12);
    color: var(--accent-secondary);
    border-color: rgba(57,255,20,0.25);
}

.source-type-agencia {
    background: rgba(138,43,226,0.12);
    color: #b77aef;
    border-color: rgba(138,43,226,0.25);
}

.source-type-medio_especializado {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
    border-color: rgba(59,130,246,0.25);
}

.source-type-analisis_propio {
    background: rgba(251,191,36,0.12);
    color: #fbbf24;
    border-color: rgba(251,191,36,0.25);
}

.source-type-otro {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border-color: var(--border-subtle);
}

/* ============================================
   PROMPTS ADMIN 4D - FEATURED ACTION BUTTON
   ============================================ */
.admin-action-btn.action-featured {
    font-size: 1rem;
    line-height: 1;
    padding: 0.2rem 0.3rem;
}

.admin-action-btn.action-featured.featured-on {
    filter: drop-shadow(0 0 4px rgba(255,215,0,0.5));
}

.admin-action-btn.action-featured.featured-off {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.admin-action-btn.action-featured.featured-off:hover {
    opacity: 1;
}

/* ============================================
   PROMPTS ADMIN 4D - RESPONSIVE CARD LAYOUT
   ============================================ */
@media (max-width: 768px) {
    .prompts-admin-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .prompts-admin-table {
        width: max-content;
        min-width: 100%;
    }

    .prompts-admin-table .th-title,
    .prompts-admin-table .cell-title {
        min-width: 200px;
    }

    .prompts-admin-table .th-model,
    .prompts-admin-table .cell-model {
        min-width: 100px;
        max-width: 120px;
    }

    .prompts-admin-table .th-date,
    .prompts-admin-table .cell-date {
        min-width: 65px;
    }

    .prompts-admin-table .th-actions,
    .prompts-admin-table .cell-actions {
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .prompts-admin-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .prompts-admin-hero-actions {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }

    .prompts-admin-hero-actions .btn-submit,
    .prompts-admin-hero-actions .btn-outline {
        flex: 1;
        text-align: center;
    }

    .prompts-admin-search {
        flex-direction: column;
        gap: 0.5rem;
    }

    .prompts-admin-count {
        text-align: center;
    }

    .prompts-admin-filters-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   PROMPTS ADMIN - PAGINACI�N (REDISE�ADA)
   ============================================ */
.prompts-admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.25rem 0;
    padding: 0.75rem 0;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.pagination-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(57, 255, 20, 0.45);
    color: var(--accent-secondary, #39ff14);
    background: rgba(57, 255, 20, 0.06);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background: rgba(57, 255, 20, 0.14);
    border-color: var(--accent-secondary, #39ff14);
    color: var(--accent-secondary, #39ff14);
}

.pagination-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #8a2be2, #39ff14);
    border-color: transparent;
    box-shadow: 0 0 18px rgba(57, 255, 20, 0.25);
}

.pagination-link.prev-link,
.pagination-link.next-link {
    padding: 0 1.25rem;
    font-size: 0.9rem;
}

.pagination-ellipsis {
    color: var(--text-secondary);
    padding: 0 0.25rem;
    font-size: 0.9rem;
}

.prompts-admin-count-detail {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-left: 0.3rem;
}

/* ============================================
   PROMPTS ADMIN - FORMULARIO DE FILTROS
   ============================================ */
.prompts-admin-filter-form {
    margin-bottom: 0;
}

/* ============================================
   PROMPTS ADMIN - PANEL DE SUSTITUCI�N DE DESTACADOS (REDISE�ADO)
   ============================================ */
.featured-replace-panel {
    margin-bottom: 1.5rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, rgba(138,43,226,0.08), rgba(57,255,20,0.03));
    border: 1px solid rgba(138,43,226,0.3);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.featured-replace-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
    opacity: 0.7;
}

.featured-replace-header {
    margin-bottom: 1.5rem;
}

.featured-replace-header h3 {
    font-size: 1.35rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-weight: 700;
}

.featured-replace-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.featured-replace-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.featured-replace-section-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.featured-replace-card {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.3);
}

.featured-replace-card-new {
    border-color: rgba(57,255,20,0.3);
    background: rgba(57,255,20,0.06);
    box-shadow: 0 0 20px rgba(57,255,20,0.05);
}

.featured-replace-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.featured-replace-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.featured-replace-divider {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 0.15rem 0;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.featured-replace-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.featured-replace-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.featured-replace-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.25);
    cursor: pointer;
    transition: all 0.2s ease;
}

.featured-replace-option:hover {
    border-color: var(--accent-primary);
    background: rgba(138,43,226,0.08);
}

.featured-replace-option:has(input[type="radio"]:checked) {
    border-color: var(--accent-primary);
    background: rgba(138,43,226,0.12);
    box-shadow: 0 0 12px rgba(138,43,226,0.15);
}

.featured-replace-option input[type="radio"] {
    accent-color: var(--accent-primary);
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
    margin-top: 0.15rem;
}

.featured-replace-option-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.featured-replace-option-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.featured-replace-option-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.featured-replace-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.featured-replace-actions .btn-submit,
.featured-replace-actions .btn-outline {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

/* ============================================
   PROMPTS ADMIN - BOTONES DE ACCI�N EN FORMULARIOS
   ============================================ */
.admin-action-form {
    display: inline;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

.admin-action-form .admin-action-btn {
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.3rem;
    border-radius: 6px;
    background: transparent;
    transition: all 0.2s ease;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-action-form .admin-action-btn:hover {
    transform: scale(1.15);
}

/* Responsive: paginaci�n y reemplazo en m�vil */
@media (max-width: 768px) {
    .prompts-admin-pagination {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .pagination-links {
        width: 100%;
        justify-content: center;
    }

    .pagination-link {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
    }

    .featured-replace-panel {
        padding: 1.25rem 1rem;
    }

    .featured-replace-actions {
        flex-direction: column;
    }

    .featured-replace-actions .btn-submit,
    .featured-replace-actions .btn-outline {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* ============================================================
   FAVORITOS Y COPIADOS RECIENTES (Biblioteca de Prompts)
   ============================================================ */

/* ---- Bot�n de favorito (estrella) en tarjetas ---- */
.prompt-fav-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 35px !important;
    height: 35px !important;
    border-radius: 50% !important;
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 10 !important;
    cursor: pointer !important;
    border: 2px solid #555 !important;
    background: rgba(0,0,0,0.5) !important;
    color: #888 !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
    opacity: 0 !important;
}

.prompt-card-featured:hover .prompt-fav-btn,
.prompt-card-premium:hover .prompt-fav-btn {
    opacity: 1 !important;
}

.prompt-fav-btn:hover {
    background: rgba(138,43,226,0.3) !important;
    color: #b388ff !important;
    border-color: #b388ff !important;
    transform: scale(1.15) !important;
}

/* ESTADO ACTIVO: C�RCULO DORADO BRILLANTE */
.prompt-fav-btn.is-favorite {
    background: #FFD700 !important;
    color: #000 !important;
    border-color: #000 !important;
    box-shadow: 0 0 15px #FFD700 !important;
    opacity: 1 !important;
    animation: favPulse 2s ease-in-out infinite !important;
}

.prompt-fav-btn.is-favorite:hover {
    background: #FFE44D !important;
    color: #000 !important;
    border-color: #000 !important;
    box-shadow: 0 0 22px #FFD700 !important;
    transform: scale(1.2) !important;
}

.prompt-fav-btn .fav-icon {
    transition: all 0.3s ease !important;
    pointer-events: none !important;
}

@keyframes favPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ---- Filtro "Mis Favoritos" ---- */
.filter-group-favs {
    display: flex;
    align-items: flex-end;
}

.prompts-fav-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary, #a0a0b8);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: inherit;
}

.prompts-fav-filter-btn:hover {
    border-color: rgba(138,43,226,0.3);
    background: rgba(138,43,226,0.08);
    color: var(--accent-primary, #8a2be2);
}

.prompts-fav-filter-btn.active {
    border-color: rgba(255,215,0,0.4);
    background: rgba(255,215,0,0.1);
    color: #ffd700;
}

.prompts-fav-filter-btn.active .fav-filter-icon {
    fill: #ffd700;
    stroke: #ffd700;
}

.fav-filter-icon {
    transition: all 0.25s ease;
}

.fav-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--accent-primary, #8a2be2);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
}

.prompts-fav-filter-btn.active .fav-count-badge {
    background: #ffd700;
    color: #1a1a2e;
}

/* ---- Bloque "Copiados Recientemente" ---- */
.prompts-recent-block {
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: rgba(57,255,20,0.04);
    border: 1px solid rgba(57,255,20,0.12);
    border-radius: 8px;
    animation: iaFadeIn 0.3s ease;
}

.recent-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-secondary, #39ff14);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-header-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.recent-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary, #94a3b8);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: normal;
    font-family: inherit;
    line-height: 1;
}

.recent-clear-btn:hover {
    color: #ff6b6b;
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.4);
}

.recent-block-items {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s ease;
}

.recent-item:hover {
    background: rgba(57,255,20,0.06);
    border-color: rgba(57,255,20,0.15);
}

.recent-link {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: bold;
    color: #39ff14;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
    padding: 2px 0;
    padding-left: 0.4rem;
    border-left: 2px solid rgba(57,255,20,0.3);
    transition: all 0.2s ease;
}

.recent-link:hover {
    color: #fff;
    border-left-color: #39ff14;
    padding-left: 0.6rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.recent-item-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    color: var(--text-secondary, #a0a0b8);
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.recent-item-link:hover {
    background: rgba(138,43,226,0.15);
    color: var(--accent-primary, #8a2be2);
}

/* ---- Responsive: favoritos en m�vil ---- */
@media (max-width: 768px) {
    .prompt-fav-btn {
        opacity: 1 !important;
        width: 28px !important;
        height: 28px !important;
        top: 6px !important;
        right: 6px !important;
    }

    .prompts-fav-filter-btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.65rem;
    }

    .filter-group-favs {
        width: 100%;
    }

    .filter-group-favs .prompts-fav-filter-btn {
        width: 100%;
        justify-content: center;
    }

    .recent-link {
        font-size: 0.75rem;
    }
}

/* Responsive: pantallas peque�as */
@media (max-width: 640px) {
    .content-meta-card {
        padding: 1rem 1.25rem;
        margin: 1rem 0 1.5rem 0;
    }
    .content-meta-row {
        flex-direction: column;
        gap: 0.1rem;
    }
    .content-meta-row dt {
        min-width: unset;
    }
}
/* ============================================
   TOP 10 GLOBAL - Los prompts más copiados
   ============================================ */
.top10-section {
    margin: 2rem 0 2.5rem 0;
    padding: 1.5rem 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(255,215,0,0.03) 0%, rgba(57,255,20,0.03) 100%);
    border: 1px solid rgba(255,215,0,0.1);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.top10-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FFD700, #39ff14, transparent);
    opacity: 0.6;
}

.top10-section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.top10-section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #e0e0e0);
    margin: 0 0 0.35rem 0;
}

.top10-section-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary, #a0a0b8);
    margin: 0;
}

.top10-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.top10-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 0.6rem 0.75rem 0.6rem 0.5rem;
    min-width: 300px;
    max-width: 350px;
    flex: 1 1 300px;
    transition: all 0.25s ease;
    position: relative;
}

.top10-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,215,0,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.top10-rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 0.9rem;
    position: relative;
}

.top10-rank-gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a2e;
    box-shadow: 0 0 12px rgba(255,215,0,0.4);
}

.top10-rank-neon {
    background: rgba(57,255,20,0.12);
    color: #39ff14;
    border: 1px solid rgba(57,255,20,0.3);
}

.top10-rank-number {
    line-height: 1;
}

.top10-card-body {
    flex: 1;
    min-width: 0;
}

.top10-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    margin: 0 0 0.25rem 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance;
}

/* ===== Ficha informativa avanzada (Tooltip Pop-up Top 10) ===== */
#prompt-tooltip-advanced {
    position: fixed;
    z-index: 99999;
    width: 300px;
    max-width: 300px;
    background: rgba(10, 10, 15, 0.98) !important;
    border: 1px solid #39ff14 !important;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(57, 255, 20, 0.2);
    pointer-events: none;
    display: none;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

#prompt-tooltip-advanced.visible {
    display: block;
}

.pta-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.3;
    font-family: 'Space Grotesk', sans-serif;
}

.pta-badge-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.pta-category-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #8a2be2;
    background: rgba(138,43,226,0.15);
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pta-model-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-secondary, #94a3b8);
    background: rgba(255,255,255,0.05);
    padding: 2px 8px;
    border-radius: 4px;
}

.pta-description {
    font-size: 0.75rem;
    color: #e0e0e0;
    margin: 0 0 12px 0;
    line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

.pta-footer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: #ff6b35;
    font-weight: 600;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 8px;
}

.top10-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
}

.top10-category {
    color: var(--accent-primary, #8a2be2);
    background: rgba(138,43,226,0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    white-space: nowrap;
}

.top10-copies {
    color: #ff6b35;
    font-weight: 600;
    white-space: nowrap;
}

.top10-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: var(--text-secondary, #a0a0b8);
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.top10-card-link:hover {
    background: rgba(138,43,226,0.15);
    color: var(--accent-primary, #8a2be2);
}

/* ---- Responsive Top 10 ---- */
@media (max-width: 768px) {
    .top10-section {
        padding: 1rem 0.75rem 1.5rem;
        margin: 1.5rem 0 2rem 0;
    }

    .top10-section-header h2 {
        font-size: 1.2rem;
    }

    .top10-container {
        gap: 0.5rem;
    }

    .top10-card {
        min-width: 240px; max-width: 100%; flex: 1 1 240px;
        padding: 0.5rem 0.6rem 0.5rem 0.4rem;
    }

    .top10-rank-badge {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .top10-card-title {
        font-size: 0.75rem;
    }

    .top10-card-meta {
        font-size: 0.65rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .top10-container {
        flex-direction: column;
        align-items: stretch;
    }

    .top10-card {
        max-width: 100%;
        min-width: unset;
    }
}

/* ============================================
   GLOSARIO IA
   ============================================ */

/* =============================================
   GLOSARIO - MÍNIMO (hereda de Prompts)
   ============================================= */

/* --- Página contenedora --- */
.glosario-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

/* =============================================
   1. HERO GLOSARIO
   ============================================= */
.hero-glosario {
    background: #050505;
    padding: 50px 20px 30px;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 2px solid #39ff14;
}

.hero-glosario .section-header {
    margin-bottom: 0.5rem;
}

.hero-glosario .section-header h2 {
    font-size: 2rem;
    margin: 0 0 0.5rem;
}

.hero-glosario .section-header p {
    font-size: 1rem;
    color: #94a3b8;
    margin: 0;
}

/* =============================================
   2. LISTADO GENERAL
   ============================================= */
.glosario-list-section {
    margin-top: 1rem;
}

.glosario-list-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.glosario-list-header h2 {
    font-size: 1.4rem;
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    color: #e0e0e0;
}

.glosario-list-count {
    font-size: 0.85rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

/* --- Estado vacío --- */
.glosario-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.glosario-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.glosario-empty p {
    margin: 0.3rem 0;
    font-size: 1rem;
}

/* =============================================
   3. TOOLTIP LINK EN ARTÍCULOS
   ============================================= */
.glossary-term-link {
    color: #39ff14 !important;
    cursor: pointer !important;
    border-bottom: 1px dashed rgba(57, 255, 20, 0.4) !important;
    transition: border-color 0.2s !important;
    text-decoration: none !important;
}

.glossary-term-link:hover {
    border-bottom-color: #39ff14 !important;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}

/* =============================================
   4. RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .hero-glosario {
        padding: 35px 16px 20px;
    }
    .hero-glosario .section-header h2 {
        font-size: 1.6rem;
    }
    .glosario-list-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .glosario-page {
        padding: 0 0.75rem 2rem;
    }
    .hero-glosario {
        padding: 25px 12px 15px;
    }
    .hero-glosario .section-header h2 {
        font-size: 1.3rem;
    }
}

/* =============================================
   5. RESPONSIVE MÓVIL - GLOSARIO (compacto)
   ============================================= */
@media (max-width: 768px) {
    /* --- Panel de búsqueda compacto --- */
    .glosario-page .prompts-filter-panel {
        padding: 0.85rem;
        margin-bottom: 1.25rem;
    }

    .glosario-page .filter-panel-header {
        margin-bottom: 0.6rem;
        padding-bottom: 0.4rem;
    }

    .glosario-page .filter-panel-header h3 {
        font-size: 0.75rem;
    }

    .glosario-page .prompts-search {
        margin-bottom: 0.5rem;
    }

    .glosario-page .search-input {
        padding: 0.55rem 2.2rem 0.55rem 2.4rem;
        font-size: 0.85rem;
    }

    .glosario-page .prompts-search .search-icon {
        left: 0.75rem;
        width: 15px;
        height: 15px;
    }

    .glosario-page .search-clear {
        right: 0.55rem;
        padding: 0.2rem;
    }

    .glosario-page .prompts-filters-row {
        gap: 0.5rem;
    }

    .glosario-page .filter-group {
        min-width: 100%;
    }

    .glosario-page .filter-label {
        font-size: 0.6rem;
        margin-bottom: 0.25rem;
    }

    .glosario-page .filter-select {
        padding: 0.5rem 2rem 0.5rem 0.65rem;
        font-size: 0.8rem;
    }

    .glosario-page .filter-select-wrapper .select-arrow {
        right: 0.6rem;
        width: 10px;
        height: 10px;
    }

    .glosario-page .prompts-results-bar {
        margin-top: 0.25rem;
    }

    .glosario-page .filter-results-count {
        padding: 0.25rem 0.6rem;
        font-size: 0.65rem;
    }

    /* --- Tarjetas Top 10 compactas --- */
    .glosario-page .top10-section {
        padding: 0.6rem 0.5rem 0.75rem !important;
        margin: 0.75rem 0 1rem 0 !important;
    }

    .glosario-page .top10-section-header {
        margin-bottom: 0.4rem !important;
    }

    .glosario-page .top10-section-header h2 {
        font-size: 0.95rem !important;
        margin: 0 0 0.15rem 0 !important;
    }

    .glosario-page .top10-section-subtitle {
        font-size: 0.7rem !important;
        margin: 0 !important;
    }

    .glosario-page .top10-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.35rem !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }

    .glosario-page .top10-card {
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
        padding: 0.8rem !important;
        gap: 0.6rem !important;
        min-height: 0 !important;
        height: auto !important;
        margin-bottom: 0 !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }

    .glosario-page .top10-rank-badge {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.7rem !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
    }

    .glosario-page .top10-card-body {
        min-width: 0 !important;
        overflow: hidden !important;
        flex: 1 1 auto !important;
    }

    .glosario-page .top10-card-title {
        font-size: 0.78rem !important;
        margin: 0 0 0.1rem 0 !important;
        -webkit-line-clamp: 1 !important;
        line-clamp: 1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    .glosario-page .top10-card-meta {
        font-size: 0.62rem !important;
        flex-wrap: nowrap !important;
        gap: 0.3rem !important;
        overflow: hidden !important;
        display: flex !important;
    }

    .glosario-page .top10-category {
        padding: 0.05rem 0.3rem !important;
        font-size: 0.62rem !important;
        max-width: 55% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        word-break: break-all !important;
        overflow-wrap: break-word !important;
        flex-shrink: 1 !important;
    }

    .glosario-page .top10-copies {
        font-size: 0.62rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 480px) {
    .glosario-page .top10-section {
        padding: 0.4rem 0.35rem 0.5rem !important;
        margin: 0.5rem 0 0.75rem 0 !important;
    }

    .glosario-page .top10-section-header h2 {
        font-size: 0.85rem !important;
    }

    .glosario-page .top10-section-subtitle {
        font-size: 0.6rem !important;
    }

    .glosario-page .top10-container {
        gap: 0.25rem !important;
    }

    .glosario-page .top10-card {
        padding: 0.55rem !important;
        gap: 0.4rem !important;
    }

    .glosario-page .top10-rank-badge {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.55rem !important;
    }

    .glosario-page .top10-card-title {
        font-size: 0.7rem !important;
    }

    .glosario-page .top10-card-meta {
        font-size: 0.55rem !important;
    }

    .glosario-page .top10-category {
        font-size: 0.55rem !important;
        max-width: 50% !important;
    }

    .glosario-page .top10-copies {
        font-size: 0.55rem !important;
    }
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.newsletter-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.newsletter-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.newsletter-card {
    padding: 2rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.newsletter-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.newsletter-form label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.newsletter-form .form-input {
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.newsletter-form .form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
}

.newsletter-form .form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Opciones de suscripción (radio buttons) */
.newsletter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.newsletter-option:hover {
    border-color: var(--accent-primary);
    background: var(--bg-surface);
}

.newsletter-option.selected {
    border-color: var(--accent-primary);
    background: rgba(138, 43, 226, 0.1);
    box-shadow: 0 0 0 1px var(--accent-primary);
}

.newsletter-option input[type="radio"] {
    accent-color: var(--accent-primary);
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
    margin: 0;
}

.option-icon {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1;
}

.option-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.option-desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.35;
    flex: 1;
    min-width: 0;
}

.option-desc::before {
    content: "— ";
    color: var(--border-subtle);
}

/* Aviso legal */
.newsletter-legal-notice {
    background: rgba(138, 43, 226, 0.08);
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.newsletter-legal-notice p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
    margin: 0;
}

.newsletter-legal-notice strong {
    color: var(--accent-primary);
}

/* Botón de suscripción */
.newsletter-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--accent-gradient);
    color: #fff;
}

.newsletter-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

.newsletter-submit:active {
    transform: translateY(0);
}

/* Información adicional */
.newsletter-info {
    padding: 1.5rem;
}

.newsletter-info h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.newsletter-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-benefits li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.benefit-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
    line-height: 1.4;
}

.newsletter-benefits li strong {
    color: var(--text-primary);
    font-size: 0.9rem;
    display: inline;
    margin-bottom: 0;
}

.newsletter-benefits li p {
    font-size: 0.82rem;
    margin: 0;
    display: inline;
    color: var(--text-secondary);
}

.newsletter-benefits li p::before {
    content: " — ";
    color: var(--border-subtle);
}

/* Alertas */
.alert-success {
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
    .newsletter-card {
        padding: 1.25rem;
    }

    .newsletter-option {
        padding: 0.75rem;
    }

    .option-title {
        font-size: 0.9rem;
    }

    .option-desc {
        font-size: 0.8rem;
    }

    .newsletter-submit {
        font-size: 0.95rem;
        padding: 0.8rem 1rem;
    }
}
