/* --- RESET Y BASE --- */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #0a0a0c;
    font-family: 'Quicksand', sans-serif;
    color: white;
    overflow: hidden;
}

/* Contenedor maestro para fijar el centro y evitar saltos */
.viewport-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* --- TOOLTIP (Original) --- */
#custom-tooltip {
    position: fixed; padding: 8px 14px; background: rgba(15, 15, 15, 0.95);
    color: white; border-radius: 10px; font-size: 12px; font-weight: 500;
    pointer-events: none; display: none; z-index: 9999;
    backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}

/* --- HEADER (Original) --- */
.main-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 60px;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100; display: flex; justify-content: center;
}

.header-container {
    width: 1280px; max-width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: flex-end;
    padding: 0 20px; box-sizing: border-box; gap: 10px;
}

.search-wrapper { position: relative; width: 300px; height: 34px; margin-right: 10px; }
.search-input {
    width: 100%; height: 100%; padding: 0 35px 0 15px;
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px; color: white; font-family: 'Quicksand', sans-serif; font-size: 13px;
    outline: none; box-sizing: border-box;
}

/* --- BOTONES CIRCULARES (Original Recuperado) --- */
.circle-btn {
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 15px; cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}
.circle-btn:hover { transform: translateY(-3px) scale(1.05); border-color: rgba(255, 255, 255, 0.4); }

.btn-viewed { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.btn-tags { background: linear-gradient(135deg, #f39c12, #e67e22); }
.btn-user { background: linear-gradient(135deg, #45aaf2, #2d98da); }
.btn-admin { background: linear-gradient(135deg, #a55eea, #8854d0); }

/* --- MODAL DE PERFIL (Original Recuperado) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
    display: none; justify-content: center; align-items: center; z-index: 1000;
}
.profile-card {
    background: rgba(20, 20, 25, 0.8); backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 30px;
    padding: 40px; width: 320px; text-align: center; color: white;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.modal-btn {
    width: 100%; padding: 12px; margin-bottom: 12px; border: none;
    border-radius: 12px; background: rgba(255,255,255,0.06);
    color: white; font-family: 'Quicksand', sans-serif; font-weight: 600;
    cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 10px;
    box-sizing: border-box;
}
.modal-btn:hover { background: rgba(255,255,255,0.12); transform: translateX(5px); }
.modal-btn.logout, .modal-btn.cancel { background: linear-gradient(45deg, #fc5c65, #eb3b5a) !important; margin-top: 10px; }
.modal-btn.admin-opt { border: 1px solid #a55eea; color: #d1b2ff; }

/* --- LOGIN CARD (Original Recuperado) --- */
.glass-card { 
    background: rgba(255, 255, 255, 0.04); backdrop-filter: blur(30px); 
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 40px; 
    padding: 50px; width: 340px; text-align: center; z-index: 10;
    box-sizing: border-box;
}
.glass-card input {
    width: 100%; padding: 15px 25px; margin-bottom: 20px; 
    background: rgba(255, 255, 255, 0.08); border: 1px solid transparent; 
    border-radius: 50px; color: white; outline: none;
    box-sizing: border-box; 
    transition: 0.3s;
    font-family: 'Quicksand', sans-serif;
}
.glass-card input:focus { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.12); }

.btn-submit {
    width: 100%; padding: 15px; border: none; border-radius: 50px; 
    background: linear-gradient(45deg, #ff007f, #6200ea); color: white; 
    font-weight: 700; cursor: pointer; transition: 0.3s;
}
.btn-submit:hover { filter: brightness(1.1); transform: scale(1.02); }

/* --- PARTÍCULAS (Ajustado para el wrapper) --- */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0; /* Subimos a 0 para asegurar que esté sobre el fondo pero bajo el UI */
    pointer-events: none;
}

.particle {
    position: absolute;
    top: 0;  /* IMPORTANTE: JS calculará desde el origen 0,0 */
    left: 0; /* IMPORTANTE */
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
    opacity: 0.5;
}

/* Capa para asegurar que el contenido esté sobre las partículas */
main {
    position: relative;
    z-index: 10;
}
/* Resaltar la opción seleccionada en el listado */
.modal-btn.active-selection {
    background: rgba(46, 204, 113, 0.1); /* Un verde muy sutil */
    border-color: rgba(46, 204, 113, 0.4);
    color: #2ecc71;
}

.avatar-option:hover img {
    transform: scale(1.1);
    border-color: #45aaf2 !important;
}
.avatar-selected img {
    border-color: #2ecc71 !important;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.5);
    background: rgba(46, 204, 113, 0.2) !important;
}
/* Seguridad extra para PC: ocultar siempre elementos móviles */
.mobile-menu-trigger, 
.mobile-nav-panel {
    display: none !important;
}