/* Importar fuente moderna de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colores modernos - Tema claro */
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-sidebar: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-sidebar: #374151;
    --accent: #ec4899;
    --accent-hover: #db2777;
    --accent-light: #fce7f3;
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.05);
    --shadow-md: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --card-bg: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-sidebar: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-sidebar: #cbd5e1;
    --accent: #ec4899;
    --accent-hover: #f472b6;
    --accent-light: #831843;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-md: rgba(0, 0, 0, 0.4);
    --shadow-lg: rgba(0, 0, 0, 0.5);
    --card-bg: #1e293b;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   AUTH PAGE - Login/Register
   ============================================ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ec4899 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, 50px); }
}

.auth-box {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 48px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.logo h1 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo .highlight {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo p {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.form-container h2 {
    margin-bottom: 24px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
}

.form-container input,
.form-container select {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    text-align: left;
}

.form-container input:focus,
.form-container select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border);
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.toggle-form {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.toggle-form a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.toggle-form a:hover {
    color: var(--accent-hover);
}

/* ============================================
   APP LAYOUT
   ============================================ */
#app {
    display: grid;
    grid-template-areas:
        "header header"
        "sidebar main";
    grid-template-columns: 280px 1fr;
    grid-template-rows: 70px 1fr;
    height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    grid-area: header;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10002;
    box-shadow: 0 1px 3px var(--shadow);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 100%;
    max-width: 1920px;
    margin: 0 auto;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: var(--bg-primary);
}

.menu-toggle span {
    width: 24px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: 0.3s;
}

.logo-small {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-small .highlight {
    color: var(--accent);
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.btn-icon:hover {
    background: var(--bg-primary);
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--accent);
    color: white;
    border-radius: 12px;
    padding: 2px 7px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    grid-area: sidebar;
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    overflow-y: auto;
    transition: transform 0.3s ease;
    border-right: 1px solid var(--border);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.user-profile {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.user-profile:hover {
    background: var(--bg-primary);
}

.user-profile img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    transition: all 0.3s ease;
}

.user-profile:hover img {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.user-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.user-profile:hover .user-info h3 {
    color: var(--accent);
}

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.btn-logout .icon {
    font-size: 0.9rem;
}

.user-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-upload {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    margin-top: 12px;
    width: 100%;
    transition: all 0.3s;
}

.btn-upload:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.sidebar-nav {
    padding: 16px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: var(--text-sidebar);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-primary);
    border-left-color: var(--accent);
}

.nav-item.active {
    background: var(--accent-light);
    border-left-color: var(--accent);
    color: var(--accent);
}

.nav-item .icon {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    grid-area: main;
    background: var(--bg-primary);
    overflow-y: auto;
    padding: 24px;
}

.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px var(--shadow);
    border: 1px solid var(--border);
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* ============================================
   PROFILE GRID
   ============================================ */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 20px;
}

.profile-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow-md);
}

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

.profile-card-info {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.profile-card-info h3 {
    margin-bottom: 3px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-card-info p {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.online-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--success);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    margin-top: 4px;
}

/* ============================================
   TABS
   ============================================ */
.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-size: 0.95rem;
}

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

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

/* ============================================
   FORMS
   ============================================ */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
    font-size: 0.9rem;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

/* ============================================
   CHAT
   ============================================ */
.chat-container {
    display: grid;
    grid-template-columns: 340px 1fr;
    height: calc(100vh - 118px);
    gap: 20px;
}

.chat-list {
    background: var(--card-bg);
    border-radius: 16px;
    overflow-y: auto;
    border: 1px solid var(--border);
}

.chat-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.chat-item:hover {
    background: var(--bg-primary);
}

.chat-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-window {
    background: var(--card-bg);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.message {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
}

.message.own {
    flex-direction: row-reverse;
}

.message-bubble {
    background: var(--bg-secondary);
    padding: 10px 14px 8px 14px;
    border-radius: 18px;
    max-width: 70%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.message.own .message-bubble {
    background: rgba(236, 72, 153, 0.15);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid rgba(236, 72, 153, 0.3);
    box-shadow: 0 2px 6px rgba(236, 72, 153, 0.15);
}

.chat-input {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border);
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.chat-input button {
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.chat-input button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    #app {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "main";
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 70px;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        z-index: 10002;
        box-shadow: 4px 0 12px var(--shadow-lg);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: flex;
    }

    .profile-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 18px;
    }

    .chat-container {
        grid-template-columns: 1fr;
    }

    .chat-list {
        display: none;
    }
}

/* Tablets grandes */
@media (max-width: 1400px) {
    .profile-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Tablets */
@media (max-width: 1200px) {
    .profile-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Móviles grandes */
@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .auth-box {
        padding: 32px 24px;
    }

    .profile-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .main-content {
        padding: 16px;
    }

    .card {
        padding: 16px;
    }
}

/* Móviles muy pequeños */
@media (max-width: 400px) {
    .profile-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .main-content {
        padding: 12px;
    }
    
    .card {
        padding: 12px;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.no-results svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: var(--accent-light);
    color: var(--accent);
}


/* ============================================
   COLLAPSIBLE FILTERS ANIMATION
   ============================================ */
#filters-panel {
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease-in-out, margin 0.3s ease-in-out;
}

#filters-panel.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 24px;
    margin: 0;
    border: none;
}

#filters-panel.expanded {
    max-height: 2000px;
    opacity: 1;
}

/* Animación del icono */
#filter-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}


/* ============================================
   PROFILE LAYOUT RESPONSIVE
   ============================================ */
.profile-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
}

.profile-sidebar {
    background: var(--card-bg);
    padding: 20px 18px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.profile-sidebar > * {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left !important;
}

.profile-content {
    padding: 24px 30px;
    background: var(--card-bg);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Estilos para el bloque consolidado de información */
.profile-sidebar > div {
    width: 100%;
}

.profile-sidebar h3 {
    text-align: left;
    width: 100%;
}

.profile-sidebar p {
    text-align: left;
    width: 100%;
}

/* Secciones de información del perfil */
.profile-info-section {
    margin-bottom: 20px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    text-align: left !important;
    display: block !important;
}

.profile-info-title {
    margin: 0 0 10px 0 !important;
    font-size: 0.85rem !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 100% !important;
}

.profile-info-text {
    margin: 0 !important;
    font-size: 0.95rem !important;
    color: var(--text-primary) !important;
    line-height: 1.6 !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Responsive para tablets */
@media (max-width: 1024px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    
    .profile-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 20px;
    }
    
    .profile-content {
        padding: 20px;
    }
}

/* Responsive para móviles */
@media (max-width: 640px) {
    .profile-sidebar {
        padding: 16px;
    }
    
    .profile-content {
        padding: 16px;
    }
}

/* ============================================
   PROFILE HEADER BUTTONS
   ============================================ */
.profile-header-btn {
    padding: 10px 18px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.profile-header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-md);
}


/* ============================================
   CHAT / MENSAJERÍA
   ============================================ */
.chat-container {
    display: grid;
    grid-template-columns: 360px 1fr;
    height: calc(100vh - 118px);
    gap: 0;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.chat-list {
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.chat-list-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-list-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.chat-controls {
    display: flex;
    gap: 6px;
}

.chat-control-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
}

.chat-control-btn:hover {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.3);
    color: var(--accent);
    transform: translateY(-2px);
}

.chat-control-btn:active {
    transform: translateY(0);
}

.chat-control-btn svg {
    transition: all 0.3s ease;
}

.chat-list::-webkit-scrollbar {
    width: 6px;
}

.chat-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.chat-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
    align-items: center;
    position: relative;
}

.chat-item:hover {
    background: var(--bg-primary);
}

.chat-item.active {
    background: var(--accent-light);
    border-left: 3px solid var(--accent);
}

.chat-item-avatar {
    position: relative;
    flex-shrink: 0;
}

.chat-item-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-item-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

.chat-item-status.online {
    background: var(--success);
}

.chat-item-status.offline {
    background: var(--text-secondary);
}

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

.chat-item-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item .badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    flex-shrink: 0;
}

.chat-item .badge.large {
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
}

.chat-window {
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.chat-back-btn {
    display: none;
    background: var(--bg-primary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
}

.chat-back-btn:hover {
    background: var(--border);
}

.chat-header-avatar {
    position: relative;
}

.chat-header-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    background: var(--success);
}

.chat-header-info {
    flex: 1;
}

.chat-header-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.chat-header-info p {
    font-size: 0.8rem;
    color: var(--success);
    margin: 0;
    font-weight: 500;
}

.chat-header-actions {
    display: flex;
    gap: 8px;
}

.chat-header-btn {
    background: var(--accent);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    color: white;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-header-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    background: var(--bg-primary);
    min-height: 0;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.message.own {
    flex-direction: row-reverse;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 14px 8px 14px;
    border-radius: 18px;
    background: var(--bg-secondary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    position: relative;
}

.message.own .message-bubble {
    background: rgba(236, 72, 153, 0.15);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 1px solid rgba(236, 72, 153, 0.3);
    box-shadow: 0 2px 6px rgba(236, 72, 153, 0.15);
}

.message-bubble:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.message.own .message-bubble:hover {
    background: rgba(236, 72, 153, 0.2);
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: 0 3px 10px rgba(236, 72, 153, 0.25);
}

.message-bubble p {
    margin: 0 0 4px 0;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 0.95rem;
}

.message-bubble small {
    opacity: 0.8;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    margin-top: 2px;
}

/* Animación de escribiendo */
@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.dots-animation {
    animation: dots 1.5s infinite;
}

.typing-dots {
    color: var(--text-secondary);
}

.chat-input {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.chat-input button {
    padding: 12px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
}

.chat-input button:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    text-align: center;
    padding: 40px;
}

.chat-empty svg {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.chat-empty h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

/* Responsive para chat */
@media (max-width: 1024px) {
    .chat-container {
        grid-template-columns: 1fr;
        height: calc(100vh - 70px);
    }
    
    .chat-list {
        position: fixed;
        left: 0;
        top: 70px;
        bottom: 0;
        width: 100%;
        z-index: 98;
    }
    
    .chat-list.hidden {
        display: none;
    }
    
    .chat-window {
        position: fixed;
        left: 0;
        top: 70px;
        bottom: 0;
        width: 100%;
        z-index: 99;
        display: none;
        flex-direction: column;
    }
    
    .chat-window.active {
        display: flex;
    }
    
    .chat-back-btn {
        display: flex;
    }
    
    .chat-header {
        flex-shrink: 0;
    }
    
    .chat-messages {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }
    
    .chat-input {
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        background: var(--bg-secondary);
        z-index: 10;
    }
}

@media (max-width: 640px) {
    .chat-container {
        border-radius: 0;
        border: none;
        height: calc(100vh - 70px);
        top: 70px;
    }
    
    .chat-window {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    .chat-list {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    .chat-list-header {
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        padding: 16px;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .chat-header {
        padding: 12px 16px;
        background: var(--bg-secondary);
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .chat-messages {
        padding: 16px;
        padding-bottom: 80px;
    }
    
    .chat-input {
        padding: 12px 16px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border);
        z-index: 1000;
    }
    
    .chat-input input {
        font-size: 16px;
    }
    
    .message-bubble {
        max-width: 85%;
    }
}


/* ============================================
   TOAST NOTIFICATION (Pequeña)
   ============================================ */
.toast-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10001;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .toast-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* ============================================
   NOTIFICACIÓN POPUP GRANDE
   ============================================ */
.notification-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10001;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.notification-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-popup-content {
    background: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: 16px;
    padding: 20px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    position: relative;
}

.notification-popup-icon {
    flex-shrink: 0;
    animation: bounce 0.5s ease;
}

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

.notification-popup-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid var(--accent);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.notification-popup-text {
    flex: 1;
    min-width: 0;
}

.notification-popup-text h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.notification-popup-text p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.notification-popup-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.notification-popup-content:hover {
    border-color: var(--accent-hover);
    box-shadow: 0 12px 48px rgba(236, 72, 153, 0.3);
}

@media (max-width: 640px) {
    .notification-popup {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .notification-popup-content {
        min-width: auto;
        max-width: none;
    }
}


/* ============================================
   PROTECCIÓN DE CONTENIDO
   ============================================ */

/* Deshabilitar selección en imágenes y videos */
img, video {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    -webkit-touch-callout: none;
}

/* Prevenir arrastrar imágenes */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Overlay de protección para imágenes en galería */
.media-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Deshabilitar impresión de imágenes */
@media print {
    img, video, .media-item {
        display: none !important;
    }
    body::after {
        content: 'Impresión de contenido multimedia no permitida';
        display: block;
        text-align: center;
        padding: 50px;
        font-size: 1.5rem;
        color: #ef4444;
    }
}

/* Marca de agua en fotos/videos */
.media-watermark {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    pointer-events: none;
    z-index: 10;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

/* Asegurar que los contenedores de media tengan position relative */
.media-item,
#gallery-media-container {
    position: relative;
}

/* Prevenir inspección de elementos en imágenes */
.media-item, .media-item * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}


/* Marca de agua en galería */
#gallery-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 6rem;
    pointer-events: none;
    z-index: 9999;
    user-select: none;
    font-weight: 800;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    letter-spacing: -3px;
}

[data-theme="dark"] #gallery-watermark {
    opacity: 0.95;
}


/* ============================================
   SELECT PERSONALIZADO
   ============================================ */

.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-button {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
    text-align: left;
}

.custom-select-button:hover {
    border-color: var(--accent);
    background: var(--bg-primary);
}

.custom-select-button:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.custom-select-wrapper.open .custom-select-button {
    border-color: var(--accent);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-arrow {
    flex-shrink: 0;
    margin-left: 8px;
    transition: transform 0.3s;
    color: var(--text-secondary);
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 2px solid var(--accent);
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    max-height: 350px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.custom-select-search {
    padding: 10px 12px;
    border: none;
    border-bottom: 2px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    flex-shrink: 0;
}

.custom-select-search:focus {
    border-bottom-color: var(--accent);
    background: var(--bg-secondary);
}

.custom-select-search::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.custom-select-options-container {
    overflow-y: auto;
    flex: 1;
}

.custom-select-wrapper.open .custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.custom-select-option:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.custom-select-option.selected {
    background: var(--accent);
    color: white;
    font-weight: 600;
}

.custom-select-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: var(--text-secondary);
}

.custom-select-option.disabled:hover {
    background: transparent;
    color: var(--text-secondary);
}

/* Scrollbar personalizado para dropdown */
.custom-select-options-container::-webkit-scrollbar {
    width: 8px;
}

.custom-select-options-container::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 4px;
}

.custom-select-options-container::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.custom-select-options-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Animación de entrada */
@keyframes selectSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-select-wrapper.open .custom-select-dropdown {
    animation: selectSlideIn 0.3s ease-out;
}


/* ============================================
   MODAL DE CHAT FLOTANTE
   ============================================ */
#chat-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#chat-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.chat-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.chat-modal-container {
    position: relative;
    z-index: 1;
    width: 450px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 40px);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#chat-modal-overlay.show .chat-modal-container {
    transform: translateX(0);
}

.chat-modal-content {
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-modal-content .chat-header {
    flex-shrink: 0;
}

.chat-modal-content .chat-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.chat-modal-content .chat-input {
    flex-shrink: 0;
    position: relative;
}

/* Responsive para móvil */
@media (max-width: 640px) {
    #chat-modal-overlay {
        padding: 0;
    }
    
    .chat-modal-container {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .chat-modal-content {
        border-radius: 0;
    }
}


/* ============================================
   MODAL DE MENSAJERO COMPLETO
   ============================================ */
#mensajero-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mensajero-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mensajero-modal-container {
    position: relative;
    z-index: 1;
    width: 900px;
    max-width: calc(100vw - 40px);
    height: 700px;
    max-height: calc(100vh - 40px);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mensajero-modal-overlay.show .mensajero-modal-container {
    transform: translateX(0);
}

.mensajero-modal-content {
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.mensajero-modal-content .chat-container {
    height: 100%;
}

/* Responsive para móvil */
@media (max-width: 1024px) {
    #mensajero-modal-overlay {
        padding: 0;
    }
    
    .mensajero-modal-container {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
    }
    
    .mensajero-modal-content {
        border-radius: 0;
    }
}


/* ============================================
   CHAT OVERLAY MODAL (Animación Slide)
   ============================================ */
#chat-overlay-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#chat-overlay-modal.show {
    opacity: 1;
    visibility: visible;
}

.chat-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.chat-overlay-container {
    position: relative;
    z-index: 1;
    width: 95%;
    max-width: 1200px;
    height: 85vh;
    max-height: 800px;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#chat-overlay-modal.show .chat-overlay-container {
    transform: translateX(0);
}

.chat-overlay-container .chat-container {
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Responsive */
@media (max-width: 1024px) {
    #chat-overlay-modal {
        padding: 0;
    }
    
    .chat-overlay-container {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .chat-overlay-container .chat-container {
        border-radius: 0;
    }
}


/* Animación para el indicador de en línea */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Animación para la estrella de seguidor */
@keyframes starPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.5)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 4px 8px rgba(251, 191, 36, 0.7)); }
}


/* ==================== RANKING MULTIMEDIA ==================== */

.filter-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: var(--bg-primary);
    border-color: var(--accent);
    transform: translateY(-2px);
}

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

.ranking-multimedia-card {
    animation: fadeInUp 0.4s ease;
}

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

/* Spinner para loading */
.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive para ranking */
@media (max-width: 768px) {
    #ranking-multimedia-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 12px !important;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* ============================================
   RANKING MULTIMEDIA - Grid Responsivo
   ============================================ */

/* Grid de 7 columnas en desktop */
#ranking-multimedia-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

/* Tablet grande - 5 columnas */
@media (max-width: 1400px) {
    #ranking-multimedia-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Tablet - 4 columnas */
@media (max-width: 1024px) {
    #ranking-multimedia-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Móvil grande - 3 columnas */
@media (max-width: 768px) {
    #ranking-multimedia-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

/* Móvil pequeño - 2 columnas */
@media (max-width: 480px) {
    #ranking-multimedia-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

/* Animación suave para las tarjetas */
.ranking-multimedia-card {
    animation: fadeInUp 0.4s ease-out;
}

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

/* Paginación responsiva */
#ranking-pagination {
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    #ranking-pagination button {
        padding: 6px 10px !important;
        font-size: 0.85rem !important;
        min-width: 36px !important;
    }
}

/* ============================================
   NUEVO LAYOUT SIN HEADER - Estilo ContactosSex
   ============================================ */

/* Layout principal sin header */
#app {
    display: grid;
    grid-template-areas: "sidebar main";
    grid-template-columns: 280px 1fr;
    grid-template-rows: 1fr;
    height: 100vh;
}

/* Botones flotantes arriba derecha - Estilo Caligula */
.floating-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10003;
}

/* Ocultar botón hamburguesa en desktop */
.floating-btn.menu-btn {
    display: none;
}

@media (max-width: 768px) {
    /* Mostrar botón hamburguesa en móvil */
    .floating-btn.menu-btn {
        display: flex;
    }
    
    /* Los 3 botones visibles en móvil */
    .floating-buttons {
        gap: 8px;
    }
}

.floating-btn {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(236, 72, 153, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid var(--accent);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.floating-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.3);
    background: var(--accent);
    color: white;
}

.floating-btn:active {
    transform: translateY(0) scale(0.98);
}

.floating-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
}

.floating-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #fff;
    color: var(--accent);
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--accent);
}

/* Sidebar mejorado */
.sidebar {
    display: flex;
    flex-direction: column;
    transform: translateX(0) !important;
}

.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin: 0;
}

.sidebar-logo .highlight {
    color: var(--accent);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding: 16px;
}

.sidebar-footer .user-profile {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 12px;
    transition: background 0.3s;
}

.sidebar-footer .user-profile:hover {
    background: var(--bg-primary);
}

/* Main content ocupa todo el espacio */
.main-content {
    grid-area: main;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-primary);
}

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

@media (max-width: 768px) {
    /* Layout móvil */
    #app {
        grid-template-columns: 1fr;
        grid-template-areas: "main";
    }
    
    /* Sidebar oculto por defecto en móvil */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 10004;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.2);
    }
    
    /* Sidebar abierto */
    .sidebar.open {
        transform: translateX(0) !important;
    }
    
    /* Overlay cuando sidebar está abierto */
    body.sidebar-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.6);
        z-index: 10003;
        animation: fadeIn 0.3s;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    /* Botones flotantes - SIEMPRE A LA DERECHA */
    .floating-buttons {
        right: 15px;
        left: auto;
    }
    
    .floating-btn {
        width: 48px;
        height: 48px;
    }
    
    .floating-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* Main content con padding reducido */
    .main-content {
        padding: 15px;
        padding-top: 80px; /* Espacio para los botones flotantes */
    }
}

@media (max-width: 480px) {
    /* Botones flotantes más pequeños */
    .floating-buttons {
        top: 12px;
        right: 12px;
        gap: 8px;
    }
    
    .floating-btn {
        width: 44px;
        height: 44px;
    }
    
    .floating-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .main-content {
        padding: 12px;
        padding-top: 70px;
    }
    
    .sidebar {
        width: 260px;
    }
}

/* ============================================
   PERFIL MEJORADO PARA MÓVIL - Estilo ContactosSex
   ============================================ */

/* Layout del perfil en 2 columnas */
.profile-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    padding: 20px 30px;
}

/* Responsive para móvil - MUCHO MEJOR */
@media (max-width: 1024px) {
    .profile-layout {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 0;
    }
}

@media (max-width: 768px) {
    /* Layout del perfil - Una columna en móvil */
    .profile-layout {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    
    .profile-sidebar {
        border-right: none !important;
        border-bottom: 1px solid var(--border) !important;
        padding: 12px !important;
        background: var(--card-bg) !important;
    }
    
    .profile-content {
        padding: 12px !important;
        background: var(--card-bg) !important;
    }
    
    /* Secciones de información MUY compactas */
    .profile-info-section {
        margin-bottom: 10px !important;
        padding: 0 !important;
    }
    
    /* Títulos MUY pequeños en móvil */
    .profile-info-title,
    .profile-sidebar h3 {
        font-size: 0.7rem !important;
        margin: 0 0 5px 0 !important;
        padding-bottom: 3px !important;
        letter-spacing: 0.3px !important;
    }
    
    .profile-content h3 {
        font-size: 0.85rem !important;
        margin: 0 0 8px 0 !important;
    }
    
    /* Texto más compacto */
    .profile-info-text,
    .profile-sidebar p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }
    
    /* Descripción usando TODO el ancho disponible */
    .profile-content > div:first-child {
        margin-bottom: 15px !important;
        text-align: left !important;
    }
    
    .profile-content > div:first-child h3 {
        text-align: left !important;
        justify-content: flex-start !important;
    }
    
    .profile-content > div:first-child > div {
        padding: 10px !important;
        text-align: left !important;
        line-height: 1.5 !important;
        font-size: 0.85rem !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Forzar alineación en todas las secciones del perfil */
    .profile-sidebar > *,
    .profile-content > *,
    .profile-sidebar,
    .profile-content {
        text-align: left !important;
    }
    
    /* Secciones de información más compactas */
    .profile-sidebar > div {
        margin-bottom: 12px !important;
    }
    
    /* Header del perfil más compacto */
    #main-content > div:first-child > div:first-child {
        padding: 12px !important;
    }
    
    /* Foto de perfil más pequeña en móvil */
    #main-content > div:first-child > div:first-child > div > div:first-child {
        width: 70px !important;
        height: 70px !important;
    }
    
    /* Nombre más pequeño */
    #main-content > div:first-child > div:first-child h1 {
        font-size: 1.2rem !important;
    }
    
    /* Botones de acción en columna */
    #main-content > div:first-child > div:first-child > div > div:last-child {
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }
    
    #main-content > div:first-child > div:first-child > div > div:last-child button {
        width: 100% !important;
        padding: 10px !important;
        font-size: 0.85rem !important;
    }
}


/* ============================================
   FIX: Descripción ancho completo
   ============================================ */
.profile-content > div:first-child {
    width: 100% !important;
    max-width: 100% !important;
}

.profile-content > div:first-child > div {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ============================================
   MEJORAS DE LOGIN Y SEGURIDAD
   ============================================ */

.input-group {
    position: relative;
    margin-bottom: 15px;
}

.input-group input {
    width: 100%;
    padding: 12px 45px 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
    text-align: left;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
}

.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--accent);
}

.toggle-password .eye-icon {
    width: 20px;
    height: 20px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.link-secondary {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

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

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.9rem;
    animation: shake 0.5s;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 0.9rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

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

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

.btn-primary.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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


/* ============================================
   DECORACIÓN NAVIDEÑA 🎄
   ============================================ */

/* Logo con decoraciones dinámicas según tema */
.sidebar-logo h1,
.logo h1 {
    position: relative;
    display: inline-block;
}

/* Decoraciones se agregan dinámicamente con JavaScript según el tema activo */

@keyframes treeGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.6));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
        transform: scale(1.05);
    }
}

/* Nieve cayendo */
.snowflake {
    position: fixed;
    top: -10px;
    z-index: 9999;
    user-select: none;
    cursor: default;
    animation-name: snowfall;
    animation-duration: 10s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    opacity: 0.8;
    color: #fff;
    font-size: 1em;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes snowfall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Diferentes velocidades y posiciones para los copos */
.snowflake:nth-child(1) { left: 10%; animation-duration: 8s; animation-delay: 0s; }
.snowflake:nth-child(2) { left: 20%; animation-duration: 12s; animation-delay: 1s; }
.snowflake:nth-child(3) { left: 30%; animation-duration: 10s; animation-delay: 2s; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 14s; animation-delay: 0.5s; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 9s; animation-delay: 1.5s; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 11s; animation-delay: 3s; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 13s; animation-delay: 2.5s; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 10s; animation-delay: 1s; }
.snowflake:nth-child(9) { left: 90%; animation-duration: 12s; animation-delay: 0s; }
.snowflake:nth-child(10) { left: 15%; animation-duration: 11s; animation-delay: 2s; }
.snowflake:nth-child(11) { left: 25%; animation-duration: 9s; animation-delay: 1s; }
.snowflake:nth-child(12) { left: 35%; animation-duration: 13s; animation-delay: 0.5s; }
.snowflake:nth-child(13) { left: 45%; animation-duration: 10s; animation-delay: 2.5s; }
.snowflake:nth-child(14) { left: 55%; animation-duration: 12s; animation-delay: 1.5s; }
.snowflake:nth-child(15) { left: 65%; animation-duration: 11s; animation-delay: 3s; }
.snowflake:nth-child(16) { left: 75%; animation-duration: 14s; animation-delay: 0s; }
.snowflake:nth-child(17) { left: 85%; animation-duration: 9s; animation-delay: 2s; }
.snowflake:nth-child(18) { left: 95%; animation-duration: 10s; animation-delay: 1s; }
.snowflake:nth-child(19) { left: 5%; animation-duration: 12s; animation-delay: 0.5s; }
.snowflake:nth-child(20) { left: 50%; animation-duration: 11s; animation-delay: 2.5s; }
.snowflake:nth-child(21) { left: 12%; animation-duration: 10s; animation-delay: 1s; }
.snowflake:nth-child(22) { left: 22%; animation-duration: 13s; animation-delay: 0s; }
.snowflake:nth-child(23) { left: 32%; animation-duration: 9s; animation-delay: 2s; }
.snowflake:nth-child(24) { left: 42%; animation-duration: 11s; animation-delay: 1.5s; }
.snowflake:nth-child(25) { left: 52%; animation-duration: 14s; animation-delay: 0.5s; }
.snowflake:nth-child(26) { left: 62%; animation-duration: 10s; animation-delay: 2.5s; }
.snowflake:nth-child(27) { left: 72%; animation-duration: 12s; animation-delay: 1s; }
.snowflake:nth-child(28) { left: 82%; animation-duration: 9s; animation-delay: 0s; }
.snowflake:nth-child(29) { left: 92%; animation-duration: 11s; animation-delay: 2s; }
.snowflake:nth-child(30) { left: 8%; animation-duration: 13s; animation-delay: 1.5s; }
.snowflake:nth-child(31) { left: 18%; animation-duration: 10s; animation-delay: 0.5s; }
.snowflake:nth-child(32) { left: 28%; animation-duration: 12s; animation-delay: 2.5s; }
.snowflake:nth-child(33) { left: 38%; animation-duration: 9s; animation-delay: 1s; }
.snowflake:nth-child(34) { left: 48%; animation-duration: 14s; animation-delay: 0s; }
.snowflake:nth-child(35) { left: 58%; animation-duration: 11s; animation-delay: 2s; }
.snowflake:nth-child(36) { left: 68%; animation-duration: 10s; animation-delay: 1.5s; }
.snowflake:nth-child(37) { left: 78%; animation-duration: 13s; animation-delay: 0.5s; }
.snowflake:nth-child(38) { left: 88%; animation-duration: 9s; animation-delay: 2.5s; }
.snowflake:nth-child(39) { left: 98%; animation-duration: 12s; animation-delay: 1s; }
.snowflake:nth-child(40) { left: 3%; animation-duration: 11s; animation-delay: 0s; }
.snowflake:nth-child(41) { left: 13%; animation-duration: 10s; animation-delay: 2s; }

/* Decoraciones debajo del logo se agregan dinámicamente */

@keyframes christmasGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 15px rgba(255, 50, 50, 0.9));
        transform: scale(1.05);
    }
}

/* Tema navideño para el accent color (opcional) */
.christmas-theme {
    --accent: #c41e3a; /* Rojo navideño */
    --accent-hover: #a01729;
    --accent-light: #fce8ec;
}
