/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --navbar-bg: #ffffff;
    --navbar-scrolled: rgba(255,255,255,0.9);
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-soft: #f5f3ff;
    --like-color: #ef4444;
    --success: #10b981;
    --shadow: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-hover: 0 20px 35px -12px rgba(139, 92, 246, 0.25);
    --input-bg: #f1f5f9;
}

body.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --card-bg: #1e293b;
    --navbar-bg: #1e293b;
    --navbar-scrolled: rgba(30, 41, 59, 0.9);
    --primary: #a78bfa;
    --primary-hover: #8b5cf6;
    --primary-soft: #2d3a4f;
    --like-color: #f87171;
    --success: #34d399;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-hover: 0 20px 35px -12px rgba(167, 139, 250, 0.4);
    --input-bg: #334155;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== NAVBAR ===== */
.navbar {
    background: var(--navbar-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--navbar-scrolled);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-primary);
    line-height: 1;
    padding: 0;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links-desktop {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links-desktop a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links-desktop a:hover {
    color: var(--primary);
}

/* Menú móvil: corregido y unificado (siempre fixed) */
.nav-links-mobile {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    border-left: 2px solid var(--primary);
    box-shadow: -5px 0 30px rgba(0,0,0,0.2);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1), visibility 0.3s;
    z-index: 55;
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    border-bottom: none;
}

.nav-links-mobile.show {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.nav-links-mobile a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: none;
    border-radius: 1rem;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-links-mobile a:hover {
    background: var(--primary-soft);
    color: var(--primary);
    transform: translateX(5px);
}

/* Búsqueda mejorada */
.search-container {
    position: relative;
}

#search-form {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border-radius: 2rem;
    padding: 0.3rem;
    transition: box-shadow 0.2s, background 0.2s;
}

#search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
    background: var(--bg-secondary);
}

#search-input {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    width: 200px;
    outline: none;
    color: var(--text-primary);
    transition: width 0.3s;
}

#search-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

#search-form button {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    transition: color 0.2s, transform 0.2s;
}

#search-form button:hover {
    color: var(--primary);
    transform: scale(1.1);
}

/* Modo oscuro */
.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.3rem;
    border-radius: 50%;
    transition: background 0.2s, transform 0.2s;
}

.dark-mode-toggle:hover {
    background: var(--primary-soft);
    transform: rotate(15deg);
}

/* Perfil (menú) */
.profile-menu {
    position: relative;
    cursor: pointer;
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
    transition: all 0.2s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.dropdown-menu {
    position: absolute;
    top: 55px;
    right: 0;
    background: var(--bg-secondary);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.profile-menu:hover .dropdown-menu,
.profile-menu:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    font-size: 0.95rem;
}

.dropdown-menu a:hover {
    background: var(--bg-primary);
    color: var(--primary);
}

#logout {
    border-top: 1px solid var(--border-color);
    color: var(--like-color);
}

#logout:hover {
    background: #fef2f2;
}

/* ========== NOTIFICACIONES (DISEÑO MODERNO CENTRADO) ========== */
.notification-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
}

.notification-icon .badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--like-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.notifications-dropdown {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    max-width: calc(100vw - 32px);
    max-height: 480px;
    overflow-y: auto;
    background: var(--bg-secondary);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 28px;
    box-shadow: 0 20px 40px -8px rgba(0,0,0,0.15), 0 0 0 1px rgba(139, 92, 246, 0.08);
    z-index: 100;
    display: none;
    padding: 1rem;
    transition: opacity 0.2s ease;
    border: none;
}

/* Flecha del globo */
.notifications-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid var(--bg-secondary);
    filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.03));
    z-index: 2;
}

.notification-icon:hover .notifications-dropdown,
.notification-icon:focus-within .notifications-dropdown,
.notification-icon.show .notifications-dropdown {
    display: block;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    margin-bottom: 0.6rem;
    background: var(--bg-primary);
    border-radius: 22px;
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}

.notification-item:last-child {
    margin-bottom: 0;
}

.notification-item:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -4px rgba(0,0,0,0.05);
}

.notification-item.unread {
    background: var(--primary-soft);
    border-left: 5px solid var(--primary);
}

.notification-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    object-fit: cover;
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.notification-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.notification-content small {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.35rem;
}

.mark-read {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.2rem;
}

.mark-read:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.notification-footer {
    padding: 1rem 0.5rem 0.2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

#mark-all-read {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

#mark-all-read:hover {
    background: var(--primary-soft);
    text-decoration: none;
}

/* Ajustes responsive para notificaciones */
@media (max-width: 768px) {
    .notifications-dropdown {
        right: 0;
        left: auto;
        transform: none;
        width: calc(100vw - 32px);
        max-width: 380px;
        padding: 0.8rem;
    }
    .notifications-dropdown::before {
        right: 20px;
        left: auto;
        transform: none;
    }
    .notification-item {
        padding: 0.9rem 1rem;
    }
    .notification-avatar {
        width: 46px;
        height: 46px;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .notifications-dropdown {
        max-width: 340px;
    }
}

/* ===== MAIN ===== */
.main-content {
    min-height: calc(100vh - 70px - 80px);
    padding: 3rem 0;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px -1px rgba(139, 92, 246, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-soft);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--like-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px -1px rgba(239, 68, 68, 0.4);
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid var(--like-color);
    color: var(--like-color);
}

.btn-outline-danger:hover {
    background: #fef2f2;
    transform: translateY(-2px);
}

.btn.following {
    background: transparent;
    border: 2px solid var(--success);
    color: var(--success);
}

.btn.following:hover {
    background: var(--success);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
}

/* Botón de enlace (como "Olvidé mi contraseña") */
.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.2rem 0.5rem;
    transition: color 0.2s;
}

.btn-link:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* ===== BOTONES DE COMPARTIR Y DESCARGAR (COMPACTO Y ESTILIZADO) ===== */
.btn-share-fanart,
.btn-download-fanart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.2;
}

.btn-download-fanart {
    border-color: var(--success);
    color: var(--success);
}

.btn-share-fanart img,
.btn-download-fanart img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    opacity: 0.8;
}

.btn-share-fanart:hover,
.btn-download-fanart:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-share-fanart:hover img,
.btn-download-fanart:hover img {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(32%) sepia(96%) saturate(7467%) hue-rotate(353deg) brightness(97%) contrast(101%);
}

.btn-share-fanart span,
.btn-download-fanart span {
    font-size: 0.9rem;
}

/* ===== LANDING PAGE ===== */
.landing {
    text-align: center;
    padding: 4rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.landing-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 3rem;
    line-height: 1.2;
}

.landing-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.landing-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.feature-icon {
    font-size: 2.5rem;
    background: var(--bg-secondary);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}

.feature-icon:hover {
    transform: scale(1.1);
}

.landing-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.recent-highlight {
    margin-top: 4rem;
}

.recent-highlight h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.characters-grid-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

/* ===== TARJETAS DE PERSONAJES (OPTIMIZADAS PARA SCROLL) ===== */
.page-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Contenedores de tarjetas con prevención de saltos de scroll */
.characters-grid,
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.2rem;
    overflow-anchor: none;
}

.character-card {
    background: var(--card-bg);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
    will-change: transform;
    backface-visibility: hidden;
}

/* Efecto hover solo si el dispositivo lo soporta */
@media (hover: hover) and (pointer: fine) {
    .character-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: var(--shadow-hover);
        border-color: var(--primary);
    }
}

.character-card .image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--input-bg);
    overflow: hidden;
}

.character-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.character-card:hover img {
    transform: scale(1.05);
}

.character-info {
    padding: 1.5rem;
}

.character-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.character-info p {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.character-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.2s, color 0.2s;
}

.character-link:hover {
    gap: 0.6rem;
    color: var(--primary-hover);
}

/* ===== DETALLE DE PERSONAJE (original, se mantiene para compatibilidad) ===== */
.detail-card {
    background: var(--card-bg);
    border-radius: 2.5rem;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.5s ease-out;
}

.detail-header {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.detail-header .image-container {
    width: 320px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--input-bg);
    border-radius: 2rem;
    overflow: hidden;
    flex-shrink: 0;
}

.detail-header .image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: var(--input-bg);
}

.detail-info {
    flex: 1;
    min-width: 280px;
}

.detail-info h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.detail-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* ===== LIKES Y COMENTARIOS ===== */
.like-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: color 0.2s, transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.5);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 9999px;
}

.like-button:hover {
    color: var(--like-color);
    transform: scale(1.1);
}

.like-button.liked {
    color: var(--like-color);
    text-shadow: 0 0 5px currentColor;
    transform: scale(1.1);
    animation: heartPop 0.4s ease;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.fanart-like-count {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    color: var(--like-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-section {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.comments-list {
    margin-bottom: 2rem;
}

.comment {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 1.2rem;
    border: 1px solid var(--border-color);
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-secondary);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.comment-author:hover {
    color: var(--primary);
    text-decoration: underline;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 1.5rem;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* ===== FORMULARIOS ===== */
.form-card {
    background: var(--card-bg);
    max-width: 600px;
    margin: 0 auto;
    padding: 2.5rem;
    border-radius: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.form-card h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 1.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* ===== INPUT DE ARCHIVO MEJORADO Y PREVISUALIZACIÓN ===== */
.file-input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.file-input-wrapper:hover .file-input-label {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}

.file-input-label svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 1rem;
    margin-top: 0.5rem;
    border: 2px solid var(--border-color);
    display: block;
}

.hidden {
    display: none;
}

/* ===== ENLACES SOCIALES ===== */
.social-links {
    display: flex;
    gap: 0.8rem;
    margin: 1rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0;
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
}

.social-icon.instagram {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23334155" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line></svg>');
}

.social-icon.twitter {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23334155" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path></svg>');
}

.social-icon.website {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23334155" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>');
}

.social-icon.whatsapp_channel {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23334155" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"/><line x1="9" y1="12" x2="15" y2="12"/></svg>');
    background-color: #25D366;
}

.social-icon:hover {
    background-color: var(--primary);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">...</svg>');
}

.social-icon.small {
    width: 30px;
    height: 30px;
    background-size: 50%;
}

/* ===== PERFIL MEJORADO (versión antigua, se mantiene para compatibilidad) ===== */
.profile-card {
    background: var(--card-bg);
    border-radius: 2rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.profile-header-simple {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.profile-avatar-large {
    width: 150px;
    height: 150px;
    max-width: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-secondary);
    box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.3);
    transition: transform 0.3s;
}

.profile-avatar-large:hover {
    transform: scale(1.05);
}

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

.profile-info h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    word-wrap: break-word;
}

.profile-bio {
    background: var(--bg-primary);
    padding: 1rem 1.5rem;
    border-radius: 1.2rem;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    margin: 1rem 0;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 1rem;
    color: var(--text-muted);
    min-width: 80px;
}

.stat-item strong {
    font-size: 1.4rem;
    color: var(--text-primary);
    display: block;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* ===== EDITOR DE BIOGRAFÍA Y REDES ===== */
.edit-bio-container {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
}

.edit-bio-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 1.2rem;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.edit-bio-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.edit-bio-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.social-input-group {
    margin-bottom: 1rem;
}

.social-input-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: var(--text-primary);
}

.social-input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.social-input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== NUEVO PERFIL MEJORADO ===== */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Banner con degradado */
.profile-banner {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-secondary);
    border-radius: 1.5rem 1.5rem 0 0;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.profile-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 50%);
    border-radius: 1.5rem 1.5rem 0 0;
    pointer-events: none;
}

.banner-placeholder {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    color: white;
    z-index: 2;
}

/* Cabecera del perfil (avatar + info) */
.profile-header {
    display: flex;
    align-items: flex-end;
    gap: 2rem;
    margin-top: -3.5rem;
    padding: 0 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.profile-avatar-large {
    width: 130px;
    height: 130px;
    max-width: 100%;
    border-radius: 50%;
    border: 5px solid var(--bg-primary);
    background: var(--bg-primary);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: cover;
}

.profile-avatar-large:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}

.profile-info {
    flex: 1;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 1.5rem;
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

body.dark-mode .profile-info {
    background-color: rgba(30, 41, 59, 0.8);
}

.profile-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-bio {
    font-size: 1rem;
    margin: 1rem 0;
    padding: 0.8rem 1rem;
    background: var(--bg-primary);
    border-radius: 1rem;
    border-left: 4px solid var(--primary);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Estadísticas */
.profile-stats {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0 1rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    min-width: 80px;
    transition: transform 0.2s;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-item strong {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.stat-item span {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Botones de acción */
.profile-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.profile-actions .btn {
    border-radius: 2rem;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s;
}

.profile-actions .btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}

.profile-actions .btn-outline:hover {
    background: var(--primary-soft);
    transform: translateY(-2px);
}

.profile-actions .btn-primary {
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(139,92,246,0.3);
}

/* Galería de personajes (miniaturas circulares mejoradas) */
.profile-characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.8rem;
    margin: 2.5rem 0;
}

.profile-character-card {
    text-align: center;
    cursor: pointer;
    transition: transform 0.25s ease;
    background: var(--card-bg);
    border-radius: 1.2rem;
    padding: 1rem 0.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.profile-character-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.profile-character-card .image-container {
    width: 100px;
    height: 100px;
    max-width: 100%;
    margin: 0 auto 0.8rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-color);
    background: var(--input-bg);
    transition: border-color 0.2s, transform 0.2s;
}

.profile-character-card:hover .image-container {
    border-color: var(--primary);
    transform: scale(1.05);
}

.profile-character-card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.profile-character-card:hover img {
    transform: scale(1.1);
}

.profile-character-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5rem 0 0.2rem;
    color: var(--text-primary);
}

.profile-character-card .character-link {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.profile-character-card .character-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Fanarts en perfil */
.profile-fanarts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.profile-fanarts-grid .fanart-item {
    background: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-fanarts-grid .fanart-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.profile-fanarts-grid .fanart-item .image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.profile-fanarts-grid .fanart-info {
    padding: 0.8rem;
    text-align: center;
    border-top: none;
}

/* Sección de seguidores / seguidos */
.followers-section {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.followers-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.follower-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.follower-item:hover {
    transform: translateY(-3px);
}

.follower-avatar {
    width: 70px;
    height: 70px;
    max-width: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.follower-item:hover .follower-avatar {
    border-color: var(--primary);
    box-shadow: 0 5px 12px rgba(139,92,246,0.2);
}

.follower-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive adjustments para el nuevo perfil */
@media (max-width: 768px) {
    .profile-banner {
        height: 150px;
    }
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -2rem;
        padding: 0 1rem;
    }
    .profile-avatar-large {
        width: 100px;
        height: 100px;
        margin-bottom: -1rem;
    }
    .profile-info {
        width: 100%;
        padding: 1rem;
    }
    .profile-stats {
        justify-content: center;
        gap: 1rem;
    }
    .stat-item {
        min-width: 70px;
        padding: 0.3rem 0.8rem;
    }
    .stat-item strong {
        font-size: 1.3rem;
    }
    .profile-characters-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 1rem;
    }
    .profile-character-card .image-container {
        width: 80px;
        height: 80px;
    }
    .profile-fanarts-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .detail-header .image-container {
        width: 100%;
    }
    .detail-info h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .profile-banner {
        height: 120px;
    }
    .profile-avatar-large {
        width: 80px;
        height: 80px;
    }
    .profile-info h2 {
        font-size: 1.6rem;
    }
    .profile-bio {
        font-size: 0.9rem;
    }
    .stat-item strong {
        font-size: 1.2rem;
    }
    .stat-item span {
        font-size: 0.75rem;
    }
    .profile-character-card .image-container {
        width: 70px;
        height: 70px;
    }
    .profile-character-card h4 {
        font-size: 0.85rem;
    }
}

/* ===== GRILLA DE PERSONAJES EN PERFIL (antigua, se mantiene) ===== */
.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin: 2.5rem 0 1.5rem;
    color: var(--text-primary);
}

/* ===== SECCIÓN DE SEGUIDORES/SEGUIDOS (ya cubierto arriba, pero se mantiene por si se usa en otros lados) ===== */
.followers-section {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.followers-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.followers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1.5rem;
}

.follower-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.follower-item:hover {
    transform: translateY(-4px);
}

.follower-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-secondary);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.2);
    margin-bottom: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.follower-item:hover .follower-avatar {
    transform: scale(1.05);
    box-shadow: 0 8px 15px -3px rgba(139, 92, 246, 0.3);
}

.follower-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== GRILLA DE FANARTS (general) ===== */
.fanarts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.fanart-item {
    background: var(--card-bg);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.fanart-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.fanart-item .image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--input-bg);
    overflow: hidden;
}

.fanart-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fanart-info {
    padding: 1rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

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

.fanart-info a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.fanart-info a:hover {
    text-decoration: underline;
}

.fanart-artist-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.fanart-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.fanart-actions .like-button {
    margin-right: auto;
}

.fanart-description {
    font-style: italic;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
    border-left: 3px solid var(--primary);
}

/* ===== PERFIL: FANARTS EN PERFIL (ya cubierto en la nueva sección) ===== */
.profile-fanarts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* ===== FEED DE ACTIVIDAD (ahora RETO) ===== */
.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.recent-item {
    background: var(--card-bg);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.recent-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.recent-item .image-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--input-bg);
    overflow: hidden;
}

.recent-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.recent-item:hover img {
    transform: scale(1.05);
}

.recent-info {
    padding: 1.2rem;
}

.recent-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.recent-info h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.recent-info h4 a:hover {
    color: var(--primary);
}

.recent-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.recent-info p::before {
    content: '📅';
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ===== RESULTADOS DE BÚSQUEDA ===== */
.search-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.search-user-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-user-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.search-user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.8rem;
    border: 3px solid var(--bg-secondary);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.search-user-name {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    display: block;
}

.search-user-name:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ===== TOASTS ===== */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--like-color); }

/* ===== ANIMACIONES (solo fadeInUp para detalle, no para tarjetas en móvil) ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== UTILIDADES ===== */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* ===== ESTILOS PARA EL FORMULARIO DE CAMBIO DE CONTRASEÑA (NUEVO) ===== */
#reset-password-form {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

#reset-password-form h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-align: center;
}

#reset-password-form p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

#reset-password-form .form-group {
    margin-bottom: 1.2rem;
}

#reset-password-form .btn-link {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.2s;
}

#reset-password-form .btn-link:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Estilo para el botón "Olvidé mi contraseña" en el login */
#forgot-password-btn {
    background: none;
    border: none;
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.2rem 0.5rem;
    transition: color 0.2s;
}

#forgot-password-btn:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* ===== NUEVOS ESTILOS PARA EL SISTEMA DE RETOS (MEJORADOS) ===== */

/* Widget en landing */
.challenge-widget {
    background: var(--card-bg);
    border-radius: 2rem;
    padding: 2rem;
    margin-top: 2rem;
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-hover);
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

.challenge-widget h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.challenge-widget p {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

/* Overlays de animación (mejorados) */
.theme-animation-overlay,
.oc-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.theme-roulette,
.oc-roulette {
    display: flex;
    gap: 2rem;
    white-space: nowrap;
    will-change: transform;
    filter: drop-shadow(0 0 20px var(--primary));
}

.theme-item {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    text-shadow: 0 0 15px var(--primary), 0 0 30px var(--primary-hover);
    padding: 1rem 2rem;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 2rem;
    border: 2px solid var(--primary);
    box-shadow: 0 0 30px var(--primary);
    animation: itemGlow 1.5s infinite alternate;
}

@keyframes itemGlow {
    from { box-shadow: 0 0 20px var(--primary); }
    to { box-shadow: 0 0 40px var(--primary-hover); }
}

.oc-item {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 1.5rem;
    border: 4px solid var(--primary);
    box-shadow: 0 0 30px var(--primary);
    transition: all 0.3s;
}

.oc-item:hover {
    transform: scale(1.05);
    border-color: white;
}

/* Página de reto */
.theme-title {
    font-size: 2.5rem;
    margin: 2rem 0 1rem;
    color: var(--primary);
    text-transform: capitalize;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.participant-card {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.participant-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.participant-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    margin-bottom: 0.5rem;
}

.participant-fanart {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 1rem;
    margin-top: 0.5rem;
    border: 2px solid var(--success);
}

.pending {
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Selector de temas en perfil */
.theme-selector {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
}

.theme-selector h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.theme-selector select {
    width: 100%;
    padding: 0.8rem;
    border-radius: 1rem;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

#apply-theme {
    width: 100%;
}

/* Skeletons para carga */
.skeleton {
    background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-secondary) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1/1;
    background-color: var(--border-color);
}

.skeleton-text {
    height: 1rem;
    background-color: var(--border-color);
    border-radius: 0.5rem;
    margin: 0.5rem 0;
}

.skeleton-text.small {
    width: 60%;
}

.skeleton-text.large {
    height: 2rem;
}

.skeleton-avatar-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--border-color);
}

.skeleton-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.skeleton-stat {
    width: 80px;
    height: 3rem;
    background-color: var(--border-color);
    border-radius: 0.5rem;
}

/* ===== ETIQUETAS (TAGS) ===== */
.character-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag-badge {
    background: var(--primary-soft);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.tag-badge:hover {
    background: var(--primary);
    color: white;
}

.tags-select {
    width: 100%;
    min-height: 100px;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.tags-select option {
    padding: 0.3rem;
    background: var(--bg-secondary);
}

.tags-select option:checked {
    background: var(--primary) linear-gradient(0deg, var(--primary) 0%, var(--primary) 100%);
    color: white;
}

/* ===== REPRODUCTOR DE MÚSICA ===== */
.detail-info iframe,
.detail-info audio {
    width: 100%;
    max-width: 400px;
    margin: 1rem 0;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.detail-info audio {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

/* ===== FILTROS DE BÚSQUEDA EN EXPLORACIÓN ===== */
.search-filters {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.search-filters #search-text {
    flex: 2;
    min-width: 200px;
    padding: 0.8rem 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    background: var(--input-bg);
    color: var(--text-primary);
}

.search-filters .tags-select {
    flex: 3;
    min-width: 200px;
    margin: 0;
}

.search-filters #apply-search {
    padding: 0.8rem 2rem;
    white-space: nowrap;
}

/* ===== COMENTARIOS CON RESPUESTAS ===== */
.comment {
    margin-bottom: 1.2rem;
    position: relative;
}

.comment .comment {
    margin-left: 3rem;
    border-left: 2px solid var(--border-color);
    padding-left: 1rem;
}

.btn-reply {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    transition: background 0.2s;
}

.btn-reply:hover {
    background: var(--primary-soft);
}

.reply-form {
    margin-top: 0.8rem;
    margin-left: 2rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.reply-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    background: var(--input-bg);
    color: var(--text-primary);
    resize: vertical;
    min-height: 60px;
    margin-bottom: 0.8rem;
}

.reply-form .btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.replies-container {
    margin-top: 1rem;
}

/* ===== CHAT ===== */
.conversations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.conversation-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.conversation-avatars {
    display: flex;
    align-items: center;
}

.conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    margin-left: -10px;
    object-fit: cover;
}

.conversation-avatar:first-child {
    margin-left: 0;
}

.conversation-info {
    flex: 1;
}

.conversation-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.conversation-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.unread-badge {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0 4px;
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Pantalla de chat */
.chat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.messages-container {
    background: var(--bg-primary);
    border-radius: 1.5rem;
    padding: 1.5rem;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.message {
    display: flex;
    gap: 0.8rem;
    max-width: 80%;
}

.message.mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-secondary);
}

.message-content {
    background: var(--card-bg);
    padding: 0.8rem 1.2rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    position: relative;
}

.message.mine .message-content {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.message-content p {
    margin: 0;
    color: var(--text-primary);
    word-wrap: break-word;
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.2rem;
    text-align: right;
}

.chat-input {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: var(--card-bg);
    border-radius: 2rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
}

.chat-input textarea {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.8rem;
    color: var(--text-primary);
    resize: none;
    max-height: 100px;
    font-family: inherit;
}

.chat-input textarea:focus {
    outline: none;
}

.chat-input .btn-primary {
    border-radius: 2rem;
    padding: 0.8rem 1.5rem;
}

/* ===== AJUSTES RESPONSIVOS PARA CHAT Y NUEVAS SECCIONES ===== */
@media (max-width: 768px) {
    .message {
        max-width: 90%;
    }

    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .search-filters #search-text,
    .search-filters .tags-select,
    .search-filters #apply-search {
        width: 100%;
    }

    .comment .comment {
        margin-left: 1rem;
        padding-left: 0.5rem;
    }

    .reply-form {
        margin-left: 0;
    }

    /* Feed responsive */
    .feed-timeline {
        max-width: 100%;
    }

    .feed-header {
        padding: 0.8rem;
    }

    .feed-avatar {
        width: 40px;
        height: 40px;
    }

    .feed-title {
        font-size: 1.2rem;
    }

    .feed-content {
        padding: 1rem;
    }

    .feed-actions {
        padding: 0.6rem 1rem;
        gap: 1rem;
    }

    .nav-links-desktop {
        display: none;
    }

    /* NUEVAS REGLAS PARA CHAT OPTIMIZADO EN MÓVIL */
    .messages-container {
        padding: 0.75rem;
        min-height: 350px;
        max-height: calc(100vh - 200px);
        gap: 0.75rem;
    }

    .message {
        max-width: 85%;
        gap: 0.5rem;
    }

    .message-avatar {
        width: 32px;
        height: 32px;
    }

    .message-content {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .chat-header {
        padding: 0.5rem 0;
        margin-bottom: 0.75rem;
    }

    .chat-header h2 {
        font-size: 1.3rem;
    }

    .chat-input {
        padding: 0.3rem;
        border-radius: 1.5rem;
    }

    .chat-input textarea {
        padding: 0.6rem;
        font-size: 0.9rem;
        min-height: 40px;
    }

    .chat-input .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .conversation-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .conversation-avatar {
        width: 36px;
        height: 36px;
    }

    .conversation-info h4 {
        font-size: 1rem;
    }

    .conversation-info p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .conversation-item {
        flex-wrap: wrap;
    }

    .conversation-avatars {
        width: 100%;
        justify-content: center;
    }

    .conversation-avatar {
        margin: 0 -5px;
    }

    .unread-badge {
        top: 5px;
        right: 5px;
    }

    .chat-input {
        flex-direction: column;
        padding: 1rem;
    }

    .chat-input textarea {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .chat-input .btn-primary {
        width: 100%;
    }

    .feed-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .feed-actions .like-button,
    .feed-actions .feed-link {
        align-self: flex-start;
    }

    /* CHAT MÁS COMPACTO EN PANTALLAS MUY PEQUEÑAS */
    .message {
        max-width: 90%;
    }

    .message-content {
        padding: 0.5rem 0.8rem;
    }

    .chat-input {
        padding: 0.25rem;
    }

    .chat-input .btn-primary {
        padding: 0.4rem 0.8rem;
    }
}

/* ===== FILTRO +18 (SIN BORDE DE PRUEBA) ===== */
.adult-content {
    filter: blur(8px) !important;
}

/* ===== FEED VACÍO ===== */
.empty-feed {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--card-bg);
    border-radius: 2rem;
    border: 1px solid var(--border-color);
    margin: 2rem 0;
}
.empty-feed p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.empty-feed .btn {
    display: inline-block;
}

/* ===== ENLACES DE ESCRITORIO (OPCIONAL) ===== */
.nav-links-desktop {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav-links-desktop a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links-desktop a:hover {
    color: var(--primary);
}
@media (max-width: 768px) {
    .nav-links-desktop {
        display: none;
    }
}

/* ===== FEED PERSONALIZADO (TIMELINE) ===== */
.feed-timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 680px;
    margin: 0 auto;
}

.feed-item {
    background: var(--card-bg);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.feed-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.feed-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.feed-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.feed-user-info {
    flex: 1;
}

.feed-username {
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    display: inline-block;
    margin-bottom: 0.2rem;
}

.feed-username:hover {
    color: var(--primary);
    text-decoration: underline;
}

.feed-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.feed-content {
    padding: 1.2rem;
}

.feed-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feed-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.feed-image-container {
    border-radius: 1rem;
    overflow: hidden;
    background: var(--input-bg);
    margin-top: 0.8rem;
}

.feed-image-container img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.feed-item:hover .feed-image-container img {
    transform: scale(1.02);
}

.feed-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.8rem 1.2rem 1.2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.feed-actions .like-button {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s;
    padding: 0.3rem 0.6rem;
    border-radius: 2rem;
}

.feed-actions .like-button:hover {
    color: var(--like-color);
    transform: scale(1.05);
}

.feed-actions .like-button.liked {
    color: var(--like-color);
}

.feed-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.feed-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ===== MENÚ MÓVIL MODERNO ===== */
@media (max-width: 768px) {
    /* Ocultar scroll horizontal globalmente */
    body {
        overflow-x: hidden;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--text-primary);
        transition: transform 0.2s ease;
        z-index: 60;
    }
    .menu-toggle.active {
        transform: rotate(90deg);
    }

    /* Reforzamos la definición de nav-links-mobile para móviles */
    .nav-links-mobile {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        gap: 1.5rem;
        padding: 2rem;
        border-left: 2px solid var(--primary);
        box-shadow: -5px 0 30px rgba(0,0,0,0.2);
        transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1), visibility 0.3s;
        z-index: 55;
        overflow-y: auto;
        display: flex;
        transform: translateX(100%);
        visibility: hidden;
    }

    .nav-links-mobile.show {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links-mobile a {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.8rem 1rem;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--text-primary);
        border-bottom: none;
        border-radius: 1rem;
        transition: all 0.2s;
        text-decoration: none;
    }

    .nav-links-mobile a:hover {
        background: var(--primary-soft);
        color: var(--primary);
        transform: translateX(5px);
    }
}

/* Optimizaciones adicionales para rendimiento en móviles */
@media (max-width: 768px) {
    /* Reducir animaciones costosas */
    .character-card,
    .detail-card,
    .profile-card,
    .btn-primary,
    .btn-outline,
    .btn-danger,
    .fanart-item {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        will-change: transform;
        backface-visibility: hidden;
    }

    /* Limitar backdrop-filter en móviles */
    .navbar,
    .profile-info,
    .modal,
    .dialog,
    .toast {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* Desactivar animaciones de hover complejas y fadeInUp en tarjetas */
    .character-card:hover,
    .detail-card:hover,
    .profile-card:hover {
        transform: translateY(-4px) scale(1.01);
    }

    /* Eliminar animación de entrada en móviles */
    .character-card {
        animation: none;
        opacity: 1;
    }

    /* Estabilizar cuadrícula de resultados */
    .characters-grid,
    .search-results-grid {
        overflow-anchor: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== ICONOS PERSONALIZADOS (PNG) ===== */
.theme-icon {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    object-fit: contain;
}

.icon-share {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    object-fit: contain;
}

.icon-dice {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    object-fit: contain;
    margin-right: 6px;
}

.icon-download {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    object-fit: contain;
}

/* Ajuste para botones con icono */
.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline.btn-icon img {
    width: 18px;
    height: 18px;
}

/* ===== NUEVO DISEÑO DE FICHA DE PERSONAJE ===== */
.character-profile-new {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-header-new {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    flex-wrap: wrap;
    background: var(--card-bg);
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.avatar-container-new {
    flex-shrink: 0;
}

.avatar-circular-large {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
    transition: transform 0.3s ease;
}
.avatar-circular-large:hover {
    transform: scale(1.02);
}

.info-container-new {
    flex: 1;
    min-width: 260px;
}

.character-name-large {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0 0 0.25rem 0;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.character-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}
.character-subtitle span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.character-bio-short {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-primary);
    background: var(--bg-primary);
    padding: 0.75rem 1.25rem;
    border-radius: 1.5rem;
    border-left: 4px solid var(--primary);
    margin: 1rem 0;
}

.action-buttons-new {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 0.5rem;
}

.btn-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    border-radius: 3rem;
    font-weight: 500;
    font-size: 0.95rem;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn-chip:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}
.btn-chip.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.btn-chip.primary:hover {
    background: var(--primary-hover);
}
.btn-chip img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}
.btn-chip.liked {
    color: var(--like-color);
    border-color: var(--like-color);
}

.info-grid-new {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}
@media (max-width: 640px) {
    .info-grid-new {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}
.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.info-card li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-secondary);
}
.info-card li:last-child {
    border-bottom: none;
}

.description-full {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    line-height: 1.7;
    color: var(--text-secondary);
}

.profile-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-top: 1rem;
    padding-bottom: 0;
}
.tab-btn {
    padding: 0.8rem 1.8rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 1rem 1rem 0 0;
    transition: all 0.2s;
    position: relative;
}
.tab-btn:hover {
    color: var(--primary);
    background: var(--primary-soft);
}
.tab-btn.active {
    color: var(--primary);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-bottom-color: var(--card-bg);
    margin-bottom: -1px;
}
.tab-content {
    background: var(--card-bg);
    border-radius: 0 1.5rem 1.5rem 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-top: none;
    box-shadow: var(--shadow);
}

.fanarts-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}
.fanart-card-new {
    background: var(--bg-primary);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}
.fanart-card-new:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.fanart-card-new .image-container {
    aspect-ratio: 1/1;
    overflow: hidden;
}
.fanart-card-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fanart-card-new .fanart-info-new {
    padding: 0.8rem;
}

/* ===== SECCIÓN DE EVENTOS (DTIYS) ===== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.event-card {
    background: var(--card-bg);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.event-banner {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--input-bg);
    overflow: hidden;
    position: relative;
}

.event-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .event-banner img {
    transform: scale(1.05);
}

.event-status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(4px);
}

.event-status.active {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.event-status.ended {
    background: var(--text-muted);
    color: white;
    border-color: var(--text-muted);
}

.event-info {
    padding: 1.2rem;
}

.event-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.event-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.event-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.event-meta a {
    color: var(--primary);
    text-decoration: none;
}

.event-meta a:hover {
    text-decoration: underline;
}

.event-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border-color);
}

.event-stats span {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.event-detail {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.event-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-banner-large {
    width: 100%;
    aspect-ratio: 21 / 9;
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.event-banner-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-banner-large .event-status {
    top: 1rem;
    right: 1rem;
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
}

.event-title-section {
    padding: 0 0.5rem;
}

.event-title-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.event-meta-large {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.event-meta-large span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.event-meta-large a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.event-meta-large a:hover {
    text-decoration: underline;
}

.event-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.event-description-full {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.event-description-full h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.event-description-full p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.event-rules {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.event-rules h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.rules-content {
    color: var(--text-secondary);
    line-height: 1.7;
}

.event-character {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.event-character h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.event-character-card {
    display: inline-block;
    text-align: center;
}

.event-character-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.event-character-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
    transition: transform 0.2s;
}

.event-character-card img:hover {
    transform: scale(1.05);
}

.event-character-card span {
    color: var(--text-primary);
    font-weight: 600;
}

.event-participations {
    background: var(--card-bg);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.event-participations h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--card-bg);
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

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

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Ajustes responsive para eventos */
@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .event-card {
        border-radius: 1rem;
    }

    .event-info {
        padding: 1rem;
    }

    .event-banner-large {
        aspect-ratio: 16 / 9;
        border-radius: 1rem;
    }

    .event-title-section h1 {
        font-size: 2rem;
    }

    .event-meta-large {
        gap: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .event-description-full,
    .event-rules,
    .event-character,
    .event-participations {
        padding: 1.2rem;
        border-radius: 1rem;
    }

    .empty-state {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .event-info h3 {
        font-size: 1.1rem;
    }

    .event-description {
        font-size: 0.85rem;
    }

    .event-meta {
        font-size: 0.75rem;
    }

    .event-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .event-title-section h1 {
        font-size: 1.8rem;
    }

    .event-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .event-character-card img {
        width: 80px;
        height: 80px;
    }
}

/* ===== OVERLAYS PARA EL RETO SEMANAL (SHUFFLE) ===== */
.challenge-overlay .challenge-character-grid {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    gap: 1rem;
    justify-content: center;
}
.challenge-overlay .challenge-slot-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 20px;
    border: 2px solid rgba(139, 92, 246, 0.5);
    filter: brightness(0) saturate(100%) invert(0.1) blur(3px);
    opacity: 0.8;
    transition: all 0.2s;
    transform: scale(0.95);
}
.challenge-overlay .challenge-slot-img.selected {
    filter: none;
    opacity: 1;
    transform: scale(1.1);
    border-color: #8b5cf6;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}
.challenge-overlay .theme-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.challenge-overlay .theme-item-slot {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    padding: 1rem 2rem;
    border: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: 2rem;
    background: rgba(139, 92, 246, 0.15);
    filter: blur(2px);
    opacity: 0.7;
    transition: all 0.2s;
}
.challenge-overlay .theme-item-slot.selected {
    filter: none;
    opacity: 1;
    background: rgba(139, 92, 246, 0.3);
    border-color: #8b5cf6;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}
