:root {
    /* Paleta de Colores - Estilo Premium Midnight V3 */
    --bg-main: #161616;
    --bg-card: #222222;
    --bg-header: rgba(26, 26, 26, 0.85);
    --text-primary: #f5f6f7;
    --text-secondary: #8e95a1;
    --text-muted: #5c626e;
    --accent-primary: #e63946;
    --accent-secondary: #ff4d4d;
    --accent-gradient: linear-gradient(135deg, #e63946 0%, #ff4d4d 100%);
    --danger: #ff4d4d;
    --success: #2ecc71;
    --warning: #f1c40f;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(230, 57, 70, 0.5);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 32px;
    --radius-pill: 100px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Reinicio Global y Estilos Base de la Aplicación */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
body {
    background-color: transparent;
    color: var(--text-primary);
    min-height: 100vh;
    padding: 2rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}
.container-large {
    max-width: 1400px;
}
/* Configuración de Tipografía y Títulos */
h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.header-subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-top: 0.5rem;
}
/* Encabezado de la Vista Pública (Portal) */
.public-header {
    text-align: center;
    padding: 3rem 2rem 1rem 2rem;
    position: relative;
    overflow: hidden;
}
.header-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    margin: 4rem auto 0 auto;
    padding: 2rem 4rem;
    background: rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    max-width: fit-content;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat-value-large {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.4rem;
}
.stat-label-small {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-subtle);
}
/* Sección de Encabezado para la Vista de Administrador */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}
.header::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 3px;
}
/* ============================================================
   COMPONENTES DE INTERFAZ DE USUARIO (UI) - PREMIUM V3
   ============================================================ */
/* Barra de Navegación - Topbar Centrada y Elegante (Glassmorphism) */
.top-nav-container {
    position: sticky;
    top: 2rem;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    margin: -1rem 0 3rem 0;
    width: 100%;
}
.top-nav {
    background: rgba(26, 26, 26, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 0.75rem 2.2rem;
    border-radius: var(--radius-md); /* Más rectangular, menos óvalo */
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
    max-width: fit-content;
    transition: var(--transition);
}
.top-nav:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}
.top-nav .logo-link {
    padding-right: 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 0.5rem;
}
.top-nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.top-nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px; /* Redondeado sutil para los links */
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}
.top-nav-links a i {
    font-size: 1rem;
    color: var(--text-muted);
}
.top-nav-links a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}
.top-nav-links a:hover i {
    color: var(--accent-primary);
}
.top-nav-links a.active {
    background: rgba(230, 57, 70, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(230, 57, 70, 0.2);
}
.top-nav-links a.active i {
    color: var(--accent-primary);
}
.top-nav-user {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-left: 1.5rem;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
    transition: var(--transition);
}
.user-profile-badge:hover {
    background: rgba(255, 255, 255, 0.05);
}
.user-avatar-small {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}
.user-avatar-small span {
    color: white;
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}
.status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #2ecc71;
    border: 2px solid #1a1a1a;
    border-radius: 50%;
}
.user-info-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}
.user-role-tag {
    font-size: 0.62rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
}
.user-name-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
}
.top-nav .btn-logout {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.top-nav .btn-logout:hover {
    background: rgba(230, 57, 70, 0.1);
    color: var(--accent-primary);
    border-color: rgba(230, 57, 70, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 57, 70, 0.2);
}
.nav-toggle { display: none; } /* Ocultar toggle antiguo */
/* Consultas de Medios para Navegación Superior (Adaptabilidad) */
@media (max-width: 1200px) {
    .top-nav {
        padding: 0.5rem 1rem;
        gap: 0.2rem;
    }
    .top-nav-links a span { display: none; }
    .top-nav-links a { padding: 0.8rem; }
}
@media (max-width: 768px) {
    .top-nav-container {
        top: 0.5rem;
        margin-bottom: 1.5rem;
        padding: 0 0.4rem;
        width: 100%;
        overflow: hidden;
    }
    .top-nav {
        padding: 0.3rem 0.5rem;
        gap: 0.1rem;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        justify-content: flex-start; /* Cambio de space-between a flex-start para controlar scroll */
    }
    .top-nav-links {
        display: flex;
        gap: 0.1rem;
        overflow-x: auto;
        flex-grow: 1;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-right: 10px;
        /* Máscara suave para indicar que hay más iconos */
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    }
    .top-nav-links::-webkit-scrollbar { display: none; }
    
    .top-nav-links a { 
        padding: 0.5rem 0.4rem;
        font-size: 0.85rem;
        flex-shrink: 0; /* Evita que los iconos se aplasten */
    }
    .top-nav-user { 
        margin-left: auto; /* Empuja el usuario al final */
        padding-left: 0.4rem;
        gap: 0.3rem;
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        flex-shrink: 0;
    }
    .user-info-text { display: none; }
    .user-profile-badge { padding: 0.1rem; }
    .top-nav .logo-link { padding-right: 0.4rem; margin-right: 0.1rem; flex-shrink: 0; }
    .top-nav .logo-link img { height: 22px !important; }
    .user-avatar-small { width: 28px; height: 28px; border-radius: 8px; }
    .user-avatar-small span { font-size: 0.85rem; }
    .top-nav .btn-logout { width: 30px; height: 30px; font-size: 0.75rem; border-radius: 8px; }
}
/* Estilos de Botones - Estilo Premium tipo Píldora */
.btn {
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}
.btn:active { transform: scale(0.96); }
.btn-primary { 
    background: var(--accent-gradient); 
    color: white; 
}
.btn-primary:hover { 
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.4); 
    filter: brightness(1.1);
}
.btn-danger { 
    background: rgba(255, 77, 77, 0.1); 
    color: var(--danger); 
    border: 1px solid rgba(255, 77, 77, 0.3); 
}
.btn-danger:hover { background: var(--danger); color: white; }
.btn-edit { 
    background: rgba(230, 57, 70, 0.1); 
    color: var(--accent-primary); 
    border: 1px solid rgba(230, 57, 70, 0.3); 
}
.btn-edit:hover { background: var(--accent-primary); color: white; }
.btn-tag {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
.btn-tag:hover { border-color: var(--accent-primary); color: white; }
/* Diseño de Tarjetas (Cards) - Estilo Moderno y Profundo */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}
.card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}
.card-header {
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* Diseño de Tablas - Visualización de Alta Precisión */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    text-align: left;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.01);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
}
td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.95rem;
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.01); }
/* Forms - Modern Inputs */
.form-group { margin-bottom: 1.5rem; }
label { 
    display: block; 
    margin-bottom: 0.6rem; 
    color: var(--text-secondary); 
    font-size: 0.85rem;
    font-weight: 600;
}
input, select, textarea {
    width: 100%;
    background: #11151a;
    border: 1px solid var(--border-subtle);
    padding: 0.9rem 1.6rem;
    border-radius: var(--radius-pill);
    color: white;
    outline: none;
    font-size: 0.95rem;
    transition: var(--transition);
}
input:focus, select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}
/* Badges */
.badge { 
    padding: 0.3rem 0.8rem; 
    border-radius: 6px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    display: inline-flex; 
    align-items: center;
    gap: 0.4rem;
}
.badge-active { background: rgba(46, 204, 113, 0.1); color: var(--success); }
.badge-expired { background: rgba(255, 77, 77, 0.1); color: var(--danger); }
.badge-permanent { background: rgba(230, 57, 70, 0.1); color: var(--accent-primary); }
/* Login Page Components */
.login-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.login-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.error-msg {
    background: rgba(255, 77, 77, 0.1);
    color: var(--danger);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 77, 77, 0.2);
    text-align: center;
}
.back-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}
.back-link:hover {
    color: var(--text-primary);
}
/* Stats Dashboard - V3.1 Premium View */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.stat-card {
    background: rgba(34, 34, 34, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}
.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 40px rgba(230, 57, 70, 0.15);
}
.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 4px;
    background: var(--accent-gradient);
    border-radius: 0 4px 4px 0;
    opacity: 0.8;
}
.stat-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    z-index: 2;
}
.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    z-index: 2;
    background: var(--text-primary);
    -webkit-background-clip: text;
    background-clip: text;
}
.stat-icon {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 5rem;
    color: white;
    opacity: 0.04;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 1;
    transition: var(--transition);
}
.stat-card:hover .stat-icon {
    opacity: 0.08;
    transform: rotate(0deg) scale(1.1);
}
/* Specific Card Accents */
.stat-card.active::before { background: var(--success); }
.stat-card.expired::before { background: var(--danger); }
/* Grid System */
.responsive-grid {
    display: grid;
    gap: 1.5rem;
}
.columns-2 { grid-template-columns: repeat(2, 1fr); }
.columns-3 { grid-template-columns: repeat(3, 1fr); }
.columns-4 { grid-template-columns: repeat(4, 1fr); }
/* ============================================================
   RESPONSIVE DESIGN (Zero Margin Error)
   ============================================================ */
@media (max-width: 992px) {
    .columns-4, .columns-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    body { padding: 1rem; }
    .user-nav { 
        margin: -1rem -1rem 1.5rem -1rem; 
        padding: 0.8rem 1rem;
    }
    .user-nav-left span { display: none; }
    .columns-4, .columns-3, .columns-2 { grid-template-columns: 1fr; }
    /* TABLE TO CARDS - REINFORCED */
    .table-responsive { border: none; }
    table, thead, tbody, th, td, tr { display: block; width: 100%; }
    thead tr { display: none; }
    
    /* Mantener estilo de tarjeta pero con menos padding en móvil */
    .card { 
        padding: 0 !important; 
        background: var(--bg-card); 
        border: 1px solid var(--border-subtle);
        box-shadow: var(--shadow-sm);
        margin-bottom: 1.5rem;
    }
    .card > div { padding: 1.2rem !important; }
    .card-header { padding: 1rem 1.2rem !important; }

    tr {
        background: rgba(255, 255, 255, 0.02);
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
        padding: 1rem;
        border: 1px solid var(--border-subtle);
    }
    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 0.6rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 0.85rem;
    }
    td:last-child { 
        border-bottom: none; 
        margin-top: 0.5rem; 
        justify-content: center; 
        background: rgba(255, 255, 255, 0.02); 
        padding: 0.8rem; 
        margin: 0.5rem -1rem -1rem -1rem; 
        border-radius: 0 0 var(--radius-md) var(--radius-md); 
    }
    td:before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.7rem;
        text-transform: uppercase;
        margin-right: 1rem;
        text-align: left;
    }
    /* Buttons full width on mobile */
    .btn { width: 100%; padding: 0.8rem; }
    .card-header { flex-direction: column; gap: 0.8rem; align-items: flex-start; }
}
/* Custom Dropdown for Flags */
.dropdown { position: relative; display: inline-block; width: 100%; }
.dropdown-content {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    z-index: 1002;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    overflow: hidden;
}
.dropdown-content a {
    color: var(--text-primary);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    transition: var(--transition);
}
.dropdown-content a:hover { background: rgba(230, 57, 70, 0.1); color: var(--accent-primary); }
.show { display: block !important; }
/* ============================================================
   INDEX PAGE - MARQUEE & INFO CARDS
   ============================================================ */
.marquee-container {
    width: 100%;
    background: rgba(230, 57, 70, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 3rem;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.marquee-content span {
    color: var(--text-primary);
    font-weight: 700;
}
@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.info-card {
    background: rgba(34, 34, 34, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.info-card:hover {
    transform: translateY(-5px);
    border-color: rgba(230, 57, 70, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.info-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}
.info-card.green-accent .info-icon {
    color: var(--success);
}
.info-card.green-accent:hover {
    border-color: rgba(46, 204, 113, 0.4);
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.1);
}
.info-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
.info-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}
/* ============================================================
   BACKGROUND VIDEO
   ============================================================ */
.video-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background-color: #0b0c10; /* Dark background so it doesn't look white */
}
.video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25; /* Higher opacity for crispness */
    filter: contrast(110%);
}
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(230, 57, 70, 0.05) 0%, rgba(22, 22, 22, 0.95) 100%);
}
body.index-page { background-color: transparent !important; }
/* ============================================================
   AUDIO CONTROLS
   ============================================================ */
.audio-control-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
}
.volume-slider {
    -webkit-appearance: slider-vertical;
    writing-mode: bt-lr;
    width: 10px;
    height: 0;
    margin-bottom: 5px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: rgba(26, 26, 26, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--radius-sm);
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Antes era rojo */
}
.audio-control-wrapper:hover .volume-slider {
    height: 100px;
    opacity: 1;
    pointer-events: auto;
    margin-bottom: 15px;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white; /* Antes era rojo */
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}
.mute-btn {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    background: rgba(26, 26, 26, 0.4); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
            border: 1px solid rgba(255, 255, 255, 0.1);

    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}
.mute-btn:hover {
    background: rgba(255, 255, 255, 0.15); /* Gris claro translúcido */
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-3px);
}
/* Header Title Animation */
@keyframes elegantShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.animated-title {
    background: linear-gradient(90deg, #ffffff, #888d96, #ffffff);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: elegantShine 4s linear infinite;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    letter-spacing: 1px;
}
.server-live-card-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    width: 100%;
    z-index: 10;
    position: relative;
}
.server-live-card {
    background: rgba(22, 22, 22, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-pill);
    padding: 1rem 2.5rem;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}
.server-live-card:hover {
    transform: translateY(-3px);
    border-color: rgba(230, 57, 70, 0.5);
    background: rgba(22, 22, 22, 0.6);
}
.server-ip-title {
    font-size: 1.15rem;
    font-weight: 900;
    margin: 0;
    color: transparent;
    background: linear-gradient(90deg, #ffffff, #2ecc71, #ffffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: elegantShine 4s linear infinite;
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 1px solid rgba(255,255,255,0.1);
    padding-right: 2rem;
    letter-spacing: 1px;
}
.server-ip-title i {
    color: var(--success);
    font-size: 1.1rem;
    background: none;
    -webkit-text-fill-color: initial;
}
.server-live-card .info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.95rem;
}
.server-live-card .info-label {
    color: var(--text-secondary);
}
.server-live-card .info-value {
    font-weight: 700;
    color: var(--accent-primary);
}
.server-live-card .info-value.online {
    color: var(--success);
}
.server-live-card .info-value.offline {
    color: var(--accent-primary);
}
/* ============================================================
   FOOTER (COPYRIGHT)
   ============================================================ */
.main-footer {
    text-align: center;
    padding: 2rem 0 1rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.main-footer p {
    color: var(--text-muted);
    font-size: 0.75rem; /* "letras chiquitas" */
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}
.user-badge a.gear-link { color: var(--text-muted); font-size: 1rem; margin-left: 0.3rem; display: inline-flex; align-items: center; justify-content: center; transition: var(--transition); } .user-badge a.gear-link i { font-size: 1.1rem !important; background: none !important; -webkit-text-fill-color: currentColor !important; filter: none !important; color: inherit !important; width: auto !important; } .user-badge a.gear-link:hover { color: var(--accent-primary) !important; transform: rotate(90deg); }
@media (max-width: 768px) { .audio-control-wrapper { bottom: 20px !important; right: 15px !important; transform: scale(0.85); transform-origin: bottom right; } }
@media (max-width: 768px) { 
    h1, .animated-title { font-size: 1.8rem !important; line-height: 1.2 !important; } 
    h2, .card-header h2 { font-size: 1.4rem !important; line-height: 1.3 !important; } 
    /* Fix for profile-actions and buttons */
    .profile-actions { flex-direction: column !important; gap: 0.8rem !important; }
    .profile-actions .btn { 
        width: 100% !important; 
        height: 42px !important; /* Más pequeños como pidió el usuario */
        font-size: 0.85rem !important;
    }
    /* Adjust user-nav-right position on mobile */
    .user-nav-right {
        right: 1rem !important;
        min-width: 220px !important;
    }
    .info-card { padding: 1.2rem !important; }
    h3 { font-size: 1.15rem !important; } 
    .header-subtitle { font-size: 0.9rem !important; } 
    .stats-grid { grid-template-columns: 1fr !important; gap: 1rem !important; }
    .responsive-grid.columns-2, .responsive-grid.columns-3, .responsive-grid.columns-4 { grid-template-columns: 1fr !important; }
    .header { flex-direction: column; align-items: flex-start; gap: 1.5rem; margin-bottom: 2rem; }
    .header-buttons { width: 100%; justify-content: flex-end; }
    .btn-small-mobile { 
        padding: 0.5rem 0.8rem !important; 
        font-size: 0.75rem !important; 
        height: 36px !important;
        min-width: fit-content !important;
    }
    .container { padding: 0 0.5rem; }
}

/* --- Animación de la Marquesina de Servidores --- */
.server-marquee-inner {
    display: flex;
    gap: 4rem;
    padding-left: 100%;
    animation: serverInnerMarquee 40s linear infinite !important;
    -webkit-animation: serverInnerMarquee 40s linear infinite !important;
    white-space: nowrap;
    flex-shrink: 0;
    width: max-content;
    align-items: center;
}

.server-marquee-inner:hover {
    animation-play-state: paused !important;
    -webkit-animation-play-state: paused !important;
}

@keyframes serverInnerMarquee {
    0% { transform: translateX(0); -webkit-transform: translateX(0); }
    100% { transform: translateX(-100%); -webkit-transform: translateX(-100%); }
}

@-webkit-keyframes serverInnerMarquee {
    0% { -webkit-transform: translateX(0); }
    100% { -webkit-transform: translateX(-100%); }
}
