/* =============================================
   VARIABLES CSS
   ============================================= */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --border-color: #2d3748;
}

/* =============================================
   BANNER DE VERIFICACIÓN DE EMAIL
   ============================================= */
.banner-verificacion {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: 0.75rem 1rem;
    position: relative;
    z-index: 100;
}

.banner-contenido {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.banner-icono {
    font-size: 1.25rem;
}

.banner-texto {
    color: #1a1a2e;
    font-size: 0.95rem;
}

.banner-texto strong {
    font-weight: 700;
}

.banner-btn {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.banner-btn:hover {
    background: rgba(0, 0, 0, 0.3);
}

.banner-cerrar {
    background: none;
    border: none;
    color: #1a1a2e;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.banner-cerrar:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .banner-contenido {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .banner-cerrar {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* =============================================
   PERFIL PÚBLICO DE USUARIO
   ============================================= */
.usuario-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1rem;
    color: var(--text-secondary);
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    gap: 1rem;
}

.error-icon {
    font-size: 4rem;
}

.error-container h2 {
    color: var(--text-primary);
    margin: 0;
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.perfil-publico-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.perfil-publico-header {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid var(--border-color);
}

.perfil-publico-avatar {
    width: 100px;
    height: 100px;
    min-width: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    overflow: hidden;
}

.perfil-publico-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.perfil-publico-info {
    flex: 1;
}

.perfil-publico-info h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    color: var(--text-primary);
}

.perfil-publico-nivel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #fbbf24;
    font-weight: 600;
}

.perfil-publico-fecha {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.perfil-publico-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-valor {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.perfil-publico-bio {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.perfil-publico-bio h3 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.perfil-publico-bio p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.perfil-publico-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.perfil-publico-section h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.medallas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.medalla-card {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    min-width: 120px;
    border: 1px solid var(--border-color);
}

.medalla-icono {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.medalla-nombre {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.medalla-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.perfil-publico-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    padding-top: 1.5rem;
}

.tab-content.active {
    display: block;
}

.empty-message {
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

.ias-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.ia-card-small {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.ia-card-small:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.ia-card-logo {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    overflow: hidden;
}

.ia-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ia-card-info {
    flex: 1;
    min-width: 0;
}

.ia-card-info h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ia-card-categoria {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ia-card-rating {
    color: #fbbf24;
    font-weight: 600;
    font-size: 0.9rem;
}

.resena-ia-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.resena-ia-logo {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    object-fit: cover;
}

.resena-item {
    transition: border-color 0.3s;
}

.resena-item:hover {
    border-color: var(--primary-color);
}

.sin-comentario {
    font-style: italic;
    opacity: 0.6;
}

/* Hacer clickeable el username en reseñas */
.resena-username-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.resena-username-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .perfil-publico-header {
        flex-direction: column;
        text-align: center;
    }

    .perfil-publico-stats {
        justify-content: center;
    }

    .perfil-publico-avatar {
        width: 80px;
        height: 80px;
        min-width: 80px;
        font-size: 2rem;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .ias-grid-small {
        grid-template-columns: 1fr;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    min-height: 100vh;
}

/* Header */
header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e5e7eb;
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4f46e5;
    text-decoration: none;
}

.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    width: 20px;
    height: 20px;
}

.search-input {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    width: 320px;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.header-buttons {
    display: flex;
    gap: 0.75rem;
}

/* Prevenir flash de contenido no autenticado */
body:not(.auth-loaded) #headerButtons {
    opacity: 0;
}

body:not(.auth-loaded) #headerUser {
    opacity: 0;
}

.btn {
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-secondary {
    background: transparent;
    color: #374151;
}

.btn-secondary:hover {
    background: #f3f4f6;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3), 0 2px 4px -1px rgba(79, 70, 229, 0.15);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4), 0 4px 6px -2px rgba(79, 70, 229, 0.2);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3), 0 2px 4px -1px rgba(79, 70, 229, 0.15);
}

.btn-primary svg {
    transition: transform 0.3s ease;
}

.btn-primary:hover svg {
    transform: rotate(90deg);
}

/* Main Layout */
.main-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 192px;
    padding: 1.5rem;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    text-decoration: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.nav-item-highlight {
    background: #ede9fe !important;
    color: #4f46e5 !important;
    font-weight: 600;
}

.nav-item-highlight:hover {
    background: #ddd6fe !important;
}

.nav-item:hover {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-icon {
    width: 20px;
    height: 20px;
}

/* Sidebar Derecho */
.sidebar-right {
    width: 200px;
    padding: 1.5rem;
}

.categories-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.875rem;
    font-weight: 600;
    gap: 0.5rem;
}

.categories-toggle:hover {
    background: #f9fafb;
    border-color: #4f46e5;
}

.chevron {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s;
}

.categories-toggle.active .chevron {
    transform: rotate(180deg);
}

.categories-list {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.categories-list.active {
    display: flex;
    max-height: 500px;
}

.category-link {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.15s;
    font-size: 0.875rem;
}

.category-link:hover {
    background: #f3f4f6;
    border-color: #4f46e5;
    color: #4f46e5;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1.5rem;
}

.title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1f2937;
    text-align: center;
    margin-bottom: 2rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    text-decoration: none;
}

.category-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    border-color: #a5b4fc;
    transform: translateY(-4px);
}

.category-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
}

/* Chatbot */
.chatbot-button {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-button:hover {
    background: #4338ca;
    transform: scale(1.1);
}

.chatbot-window {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 320px;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    display: none;
}

.chatbot-window.active {
    display: block;
}

.chatbot-header {
    background: #4f46e5;
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chatbot-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 9999px;
    transition: background 0.2s;
}

.chatbot-close:hover {
    background: rgba(255,255,255,0.2);
}

.chatbot-body {
    height: 320px;
    padding: 1rem;
    overflow-y: auto;
    background: #f9fafb;
}

.chat-message {
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 0.75rem;
}

.chat-message p {
    font-size: 0.875rem;
    color: #374151;
}

.chatbot-footer {
    padding: 0.75rem;
    border-top: 1px solid #e5e7eb;
    background: white;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    outline: none;
    font-size: 0.875rem;
}

.chat-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.chat-send {
    width: 36px;
    height: 36px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-send:hover {
    background: #4338ca;
}

/* SVG Icons */
.icon {
    width: 20px;
    height: 20px;
}

.icon-lg {
    width: 24px;
    height: 24px;
}

/* Generic container for inner pages */
.container {
    max-width: 960px;
    margin: 2rem auto;
    padding: 1rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: #4f46e5;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #9ca3af;
}

/* Filtros - CORREGIR TAMAÑO */
.filters-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: #4f46e5;
    color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.filter-btn.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

/* ⭐ ESTO ES LO IMPORTANTE - Controlar el tamaño del icono */
.filter-icon {
    width: 1.25rem;  /* 20px */
    height: 1.25rem; /* 20px */
    flex-shrink: 0; /* No permitir que se encoja */
}

/* Grid de IAs - CORREGIR */
.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Tarjeta de IA */
.ai-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.ai-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateY(-4px);
    border-color: #4f46e5;
}

.ai-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* ⭐ Logo placeholder - TAMAÑO CORRECTO */
.ai-logo-placeholder {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.ai-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #fbbf24;
    font-weight: 600;
}

/* ⭐ Estrella - TAMAÑO CORRECTO */
.star-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.ai-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.ai-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.ai-meta {
    margin-bottom: 0.75rem;
}

.ai-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #ede9fe;
    color: #4f46e5;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ai-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.ai-link-btn {
    display: block;
    text-align: center;
    padding: 0.5rem 1rem;
    background: #4f46e5;
    color: white;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
}

.ai-link-btn:hover {
    background: #4338ca;
}

/* ===================================
   PAGINACIÓN
   =================================== */

.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #4f46e5;
    color: #4f46e5;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-icon {
    width: 1rem;
    height: 1rem;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
}

.pagination-number {
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-number:hover {
    background: #f9fafb;
    border-color: #4f46e5;
    color: #4f46e5;
}

.pagination-number.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

.pagination-dots {
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination-info {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 640px) {
    .pagination-container {
        flex-wrap: wrap;
    }
    
    .pagination-btn {
        order: 2;
    }
    
    .pagination-numbers {
        order: 1;
        width: 100%;
        justify-content: center;
        margin-bottom: 0.75rem;
    }
}

/* =============================================
   ESTILOS PARA MODALES DE AUTENTICACIÓN
   Agregar al final de styles.css
   ============================================= */

/* Overlay del modal (fondo oscuro difuminado) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Contenedor del modal */
.modal-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

/* Header del modal */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Body del modal */
.modal-body {
    padding: 1.5rem;
}

/* Grupos de formulario */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Mensaje de error */
.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: none;
}

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

/* Mensaje de éxito */
.form-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: none;
}

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

/* Botón full width */
.btn-full {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.btn-full:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Footer del modal */
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    background: #f9fafb;
    border-radius: 0 0 1rem 1rem;
}

.modal-footer p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.modal-footer a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* =============================================
   HEADER - Usuario logueado
   ============================================= */

.header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-welcome {
    font-size: 0.875rem;
    color: #374151;
}

.user-welcome strong {
    color: #4f46e5;
}

.user-points {
    background: #ede9fe;
    color: #4f46e5;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* =============================================
   ANIMACIÓN DE CARGA EN BOTÓN
   ============================================= */

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 480px) {
    .modal-container {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
}

/* =============================================
   NOTIFICACIONES
   Agregar al final de styles.css
   ============================================= */

.notificacion {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.notificacion.active {
    transform: translateX(0);
}

.notificacion button {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notificacion button:hover {
    opacity: 1;
}

.notificacion-success {
    background: #10b981;
    color: white;
}

.notificacion-error {
    background: #ef4444;
    color: white;
}

.notificacion-info {
    background: #3b82f6;
    color: white;
}

.notificacion-warning {
    background: #f59e0b;
    color: white;
}

/* =============================================
   ESTILOS MODAL PUBLICAR IA
   Agregar al final de styles.css
   ============================================= */

/* Modal más grande */
.modal-lg {
    max-width: 550px;
}

/* Mensaje de autenticación requerida */
.auth-required-message {
    text-align: center;
    padding: 2rem 1rem;
}

.auth-required-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.auth-required-message h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.auth-required-message p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.auth-required-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* Textarea */
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s;
    outline: none;
}

.form-group textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Select */
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
}

.form-group select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Hint debajo de inputs */
.form-hint {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.375rem;
}

/* Info box */
.form-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #ede9fe;
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-info svg {
    flex-shrink: 0;
    color: #4f46e5;
}

.form-info span {
    font-size: 0.875rem;
    color: #4f46e5;
    line-height: 1.5;
}

.form-info strong {
    font-weight: 600;
}

/* Botón con icono */
.btn-full svg {
    margin-right: 0.5rem;
}

.btn-full {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =============================================
   ESTILOS PARA PÁGINAS DE CATEGORÍAS
   Agregar al final de styles.css
   ============================================= */

/* Header de categoría */
.categoria-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.categoria-info {
    flex: 1;
}

.categoria-icono {
    font-size: 2rem;
    margin-right: 0.5rem;
}

.categoria-descripcion {
    color: #6b7280;
    font-size: 1rem;
    margin-top: 0.5rem;
    max-width: 600px;
}

.categoria-stats {
    display: flex;
    gap: 1rem;
}

.stat-badge {
    background: #ede9fe;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    text-align: center;
}

.stat-numero {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4f46e5;
}

.stat-texto {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Estado de carga */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-state p {
    color: #6b7280;
}

/* Estado vacío */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #f9fafb;
    border-radius: 1rem;
    border: 2px dashed #e5e7eb;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: #111827;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Estado de error */
.error-state {
    text-align: center;
    padding: 2rem;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-state h3 {
    color: #dc2626;
    margin-bottom: 0.5rem;
}

.error-state p {
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Tarjeta de IA mejorada */
.ai-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.ai-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-4px);
    border-color: #4f46e5;
}

.ai-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.ai-logo-placeholder {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    overflow: hidden;
}

.ai-logo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-rating {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: #fef3c7;
    padding: 0.375rem 0.625rem;
    border-radius: 0.5rem;
}

.ai-rating .stars {
    color: #f59e0b;
    font-size: 0.875rem;
    letter-spacing: -1px;
}

.ai-rating span:last-child {
    color: #92400e;
    font-weight: 600;
    font-size: 0.875rem;
}

.ai-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.ai-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.ai-meta {
    margin-bottom: 0.75rem;
}

.ai-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: #ede9fe;
    color: #4f46e5;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ai-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.ai-card-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.ai-link-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #4f46e5;
    color: white;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
}

.ai-link-btn:hover {
    background: #4338ca;
}

.btn-icon-only {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
}

.btn-icon-only:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.btn-icon-only.active {
    border-color: #ef4444;
    background: #ef4444;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .categoria-header {
        flex-direction: column;
        gap: 1rem;
    }

    .categoria-stats {
        width: 100%;
    }

    .stat-badge {
        flex: 1;
    }

    .filters-container {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .filter-btn {
        white-space: nowrap;
    }
}

/* Modal extra grande */
.modal-xl {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.star-filled {
    color: #fbbf24;
}

/* Header del detalle */
.ia-detalle-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1rem 1rem 0 0;
    position: relative;
}

.ia-detalle-header .modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    background: rgba(255,255,255,0.2);
}

.ia-detalle-header .modal-close-btn:hover {
    background: rgba(255,255,255,0.3);
}

.ia-detalle-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}

.ia-detalle-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ia-detalle-info {
    flex: 1;
    color: white;
}

.ia-detalle-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    padding-right: 2rem;
}

.ia-detalle-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.ia-detalle-categoria {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.ia-detalle-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 1rem;
}

.ia-detalle-body {
    padding: 1.5rem;
}

.ia-detalle-descripcion {
    margin-bottom: 1.5rem;
}

.ia-detalle-descripcion p {
    color: #374151;
    line-height: 1.7;
    margin: 0;
}

.ia-detalle-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 1.5rem 0;
}

.ia-detalle-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ia-detalle-stats {
    display: flex;
    gap: 1.5rem;
}

.ia-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.ia-stat-value {
    font-weight: 600;
    color: #111827;
}

.ia-detalle-botones {
    display: flex;
    gap: 0.75rem;
}

.ia-resenas-section {
    margin-top: 1rem;
}

.resenas-titulo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1rem 0;
}

.resenas-count {
    color: #6b7280;
    font-weight: 400;
}

.resena-form-container {
    margin-bottom: 1.5rem;
}

.resena-form {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
}

.resena-form h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1rem 0;
}

.calificacion-estrellas {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.calificacion-label {
    font-size: 0.875rem;
    color: #374151;
}

.estrellas-input {
    display: flex;
    gap: 0.25rem;
}

.estrellas-input .estrella {
    font-size: 1.75rem;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.15s;
}

.estrellas-input .estrella:hover,
.estrellas-input .estrella.active {
    color: #fbbf24;
    transform: scale(1.1);
}

.estrellas-input .estrella.hover {
    color: #fbbf24;
}

.calificacion-texto {
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

.resena-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.resena-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.resena-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.resena-puntos {
    font-size: 0.875rem;
    color: #059669;
    background: #d1fae5;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
}

.resena-login-required,
.resena-ya-enviada {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
}

.resena-login-required p,
.resena-ya-enviada p {
    margin: 0;
    color: #6b7280;
}

.resena-login-required a {
    color: #4f46e5;
    font-weight: 600;
}

.resena-ya-enviada {
    background: #d1fae5;
}

.resena-ya-enviada p {
    color: #059669;
}

.resenas-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resenas-loading,
.resenas-empty {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.resena-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
}

.resena-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.resena-usuario {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.resena-usuario-info {
    display: flex;
    flex-direction: column;
}

.resena-username {
    font-weight: 600;
    color: #111827;
    font-size: 0.9375rem;
}

.resena-fecha {
    font-size: 0.75rem;
    color: #9ca3af;
}

.resena-estrellas {
    color: #fbbf24;
    font-size: 1rem;
    letter-spacing: -1px;
}

.resena-comentario {
    color: #374151;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
}

.resena-sin-comentario {
    color: #9ca3af;
    font-style: italic;
}

/* Reseñas - Avatar */
.resena-avatar {
    width: 45px;
    height: 45px;
    min-width: 45px;
    min-height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
    overflow: hidden;
    flex-shrink: 0;
    text-transform: uppercase;
}

.resena-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ai-card-actions-fav {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.ai-card-actions-fav .ai-link-btn {
    flex: 1;
}

.btn-quitar-fav {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* =============================================
   PERFIL DE USUARIO - REDISEÑADO
   ============================================= */

.perfil-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.perfil-header {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.perfil-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    border: 4px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.perfil-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.perfil-info {
    flex: 1;
    padding-top: 0.5rem;
}

.perfil-nombre-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.perfil-nombre {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-edit {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.perfil-email {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin: 0 0 0.75rem 0;
}

.perfil-biografia {
    color: white;
    font-size: 1rem;
    font-style: italic;
    margin: 1rem 0;
    line-height: 1.5;
    max-width: 450px;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border-left: 3px solid rgba(255, 255, 255, 0.5);
}

.perfil-biografia:empty {
    display: none;
}

.perfil-nivel {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.25rem;
    border-radius: 25px;
    margin-top: 0.75rem;
    backdrop-filter: blur(10px);
}

.nivel-badge {
    font-size: 1.5rem;
}

.nivel-nombre {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.nivel-numero {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

.perfil-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Medallas en perfil */
.perfil-medallas {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.medallas-titulo {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    color: white;
    font-weight: 600;
}

.medallas-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
}

.medalla-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    min-width: 110px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.medalla-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
}

.medalla-icono {
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
}

.medalla-nombre {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    text-align: center;
}

.medalla-fecha {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.35rem;
}

.medallas-empty, .medallas-loading {
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.medalla-bloqueada {
    opacity: 0.5;
    filter: grayscale(0.8);
}

.medalla-bloqueada .medalla-nombre {
    color: rgba(255, 255, 255, 0.6);
}

.medalla-bloqueada .medalla-fecha {
    color: rgba(255, 255, 255, 0.5);
}

/* Avatar en modal de editar */
.avatar-preview-container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 600;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid rgba(102, 126, 234, 0.3);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-input-wrapper {
    flex: 1;
}

.avatar-input-wrapper input {
    width: 100%;
}

.form-hint {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.35rem;
    display: block;
}

/* Responsive */
@media (max-width: 600px) {
    .perfil-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .perfil-info {
        padding-top: 0;
    }
    
    .perfil-nombre-row {
        justify-content: center;
    }
    
    .perfil-biografia {
        max-width: 100%;
    }
    
    .perfil-stats {
        gap: 2rem;
    }
    
    .medallas-lista {
        justify-content: center;
    }
}

/* =============================================
   TABS Y CONTENIDO DEL PERFIL
   ============================================= */

.perfil-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.perfil-tab {
    flex: 1;
    padding: 0.85rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.perfil-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.perfil-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.perfil-tab-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    min-height: 200px;
}

/* Lista de IAs del usuario */
.ias-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ia-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.ia-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.ia-item-info h4 {
    margin: 0 0 0.35rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.ia-item-info p {
    margin: 0 0 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ia-item-estado {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.estado-aprobada {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.estado-pendiente {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.estado-rechazada {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.ia-item-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Lista de reseñas del usuario */
.resenas-lista-perfil {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.resena-item {
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.resena-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.resena-item-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.resena-estrellas {
    color: #fbbf24;
    font-size: 1rem;
}

.resena-item p {
    margin: 0 0 0.75rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.resena-item .resena-fecha {
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Estados vacíos y cargando */
.loading-state,
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.empty-state p {
    margin: 0;
    color: var(--text-secondary);
}

/* Mejoras de profundidad y bordes */
.perfil-tabs {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.perfil-tab-content {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ia-item {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ia-item:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.resena-item {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
}

.resena-item:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    border-color: #667eea;
}

.empty-state,
.loading-state {
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Reset Password Page */
.reset-password-card {
    max-width: 400px;
    margin: 3rem auto;
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.reset-password-card h2 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.reset-password-card > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.reset-password-card form {
    text-align: left;
}

.reset-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.reset-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.reset-footer a:hover {
    text-decoration: underline;
}

.form-success {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
}

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

/* Toggle password visibility */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

/* Toggle password visibility */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.toggle-password:hover {
    opacity: 1;
}

.toggle-password svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    color: #374151;
}

/* =============================================
   RESPONSIVE - MÓVIL
   ============================================= */

@media (max-width: 768px) {
    /* Header */
    .header-content {
        padding: 0.5rem 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .search-container {
        order: 3;
        width: 100%;
        margin-top: 0.25rem;
    }

    .search-input {
        width: 100%;
        font-size: 0.9rem;
    }

    .user-welcome {
        display: none;
    }

    .header-buttons {
        gap: 0.4rem;
    }

    .header-buttons .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .user-points {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    /* Layout principal - Ocultar sidebars */
    .main-container {
        display: flex;
        flex-direction: column;
    }

    .sidebar {
        display: none;
    }

    .sidebar-right {
        display: none;
    }

    .main-content {
        width: 100%;
        padding: 1rem;
    }

    /* Título y filtros */
    .title {
        font-size: 1.4rem;
        text-align: center;
        margin-bottom: 1rem;
    }

    .filters-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .filter-btn svg {
        width: 16px;
        height: 16px;
    }

    /* Grid de IAs - 2 columnas en móvil */
    .ai-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    /* Tarjetas más compactas */
    .ai-card {
        padding: 0.75rem;
    }

    .ai-card-header {
        margin-bottom: 0.5rem;
    }

    .ai-logo-placeholder {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .ai-logo-placeholder img {
        width: 40px;
        height: 40px;
    }

    .ai-rating {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }

    .ai-name {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .ai-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        margin-bottom: 0.5rem;
    }

    .ai-meta {
        margin-bottom: 0.4rem;
    }

    .ai-category {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    .ai-stats {
        font-size: 0.7rem;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .ai-link-btn {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    /* Paginación */
    .pagination-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .pagination-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .pagination-number {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .pagination-info {
        width: 100%;
        text-align: center;
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }

    /* Modales */
    .modal-container {
        width: 95%;
        max-width: none;
        margin: 0.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-lg, .modal-xl {
        width: 95%;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-body {
        padding: 1rem;
    }

    /* Modal detalle IA */
    .ia-detalle-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }

    .ia-detalle-logo {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .ia-detalle-info h2 {
        font-size: 1.25rem;
    }

    .ia-detalle-body {
        padding: 1rem;
    }

    .ia-detalle-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .ia-detalle-stats {
        justify-content: center;
        gap: 1.5rem;
    }

    .ia-detalle-botones {
        flex-direction: column;
        gap: 0.5rem;
    }

    .ia-detalle-botones .btn {
        width: 100%;
        justify-content: center;
    }

    /* Reseñas */
    .resena-card {
        padding: 0.75rem;
    }

    .resena-avatar {
        width: 35px;
        height: 35px;
        min-width: 35px;
        min-height: 35px;
        font-size: 0.75rem;
    }

    .resena-username {
        font-size: 0.85rem;
    }

    .resena-estrellas {
        font-size: 0.9rem;
    }

    /* Chatbot */
    .chatbot-button {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }

    .chatbot-window {
        width: 100%;
        height: 70vh;
        right: 0;
        bottom: 0;
        border-radius: 20px 20px 0 0;
    }

    /* Perfil */
    .perfil-card {
        padding: 1.25rem;
    }

    .perfil-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .perfil-avatar {
        width: 90px;
        height: 90px;
        font-size: 2.25rem;
    }

    .perfil-nombre {
        font-size: 1.4rem;
    }

    .perfil-nombre-row {
        justify-content: center;
    }

    .perfil-biografia {
        max-width: 100%;
        text-align: center;
    }

    .perfil-stats {
        justify-content: center;
        gap: 1.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .medallas-lista {
        justify-content: center;
    }

    .medalla-item {
        min-width: 90px;
        padding: 0.75rem 0.5rem;
    }

    .medalla-icono {
        font-size: 2rem;
    }

    .medalla-nombre {
        font-size: 0.75rem;
    }

    /* Tabs */
    .perfil-tabs {
        flex-direction: row;
    }

    .perfil-tab {
        flex: 1;
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .perfil-tab-content {
        padding: 1rem;
    }
}

/* Móviles muy pequeños */
@media (max-width: 380px) {
    .ai-grid {
        grid-template-columns: 1fr;
    }

    .filter-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .filter-btn svg {
        display: none;
    }

    .ai-card {
        padding: 1rem;
    }

    .ai-name {
        font-size: 1rem;
    }

    .ai-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .perfil-avatar {
        width: 80px;
        height: 80px;
    }

    .perfil-nombre {
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .medalla-item {
        min-width: 80px;
    }
}

/* =============================================
   MENÚ MÓVIL
   ============================================= */

.mobile-menu-btn {
    display: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    padding: 0.6rem;
    margin-right: 0.75rem;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.mobile-menu-btn svg {
    stroke: white;
    width: 24px;
    height: 24px;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: var(--bg-primary);
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-menu-close {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close svg {
    stroke: var(--text-primary);
    width: 20px;
    height: 20px;
}

.mobile-menu-user {
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.mobile-user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.mobile-user-points {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.mobile-menu-nav {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--bg-primary);
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    background: var(--bg-secondary);
    transition: background 0.3s, transform 0.2s;
}

.mobile-nav-item:hover, .mobile-nav-item:active {
    background: var(--bg-tertiary);
    transform: translateX(5px);
}

.mobile-nav-icon {
    font-size: 1.3rem;
}

.mobile-nav-publish {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mobile-nav-publish:hover, .mobile-nav-publish:active {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
}

.mobile-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.75rem 1rem;
}

.mobile-menu-categories {
    padding: 0.5rem 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: var(--bg-primary);
}

.mobile-categories-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.75rem 1rem 0.5rem;
    font-weight: 700;
}

.mobile-category-link {
    padding: 0.7rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
    font-size: 0.95rem;
    background: var(--bg-secondary);
    margin-bottom: 0.25rem;
}

.mobile-category-link:hover, .mobile-category-link:active {
    background: var(--bg-tertiary);
}

/* Mostrar botón hamburguesa en móvil */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

