/* ============================================
   LUIS MS - ESTILOS GLOBALES v2.0
   ============================================ */

/* ---------- RESET Y BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #0a0f1e 0%, #0a1a2e 50%, #0b0f1a 100%);
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.6;
}

/* ---------- NAVEGACIÓN ---------- */
nav {
    background: rgba(5, 10, 20, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    padding: 1rem 2rem;
}

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

/* ---------- LOGO ANIMADO ---------- */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-logo-css {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-core {
    font-size: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00d4ff, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    z-index: 2;
    position: relative;
}

.logo-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    top: 0;
    left: 0;
    animation: spin 8s linear infinite;
}

.logo-ring::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #00d4ff;
    border-radius: 50%;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
}

.logo-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #a855f7;
    border-radius: 50%;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

.logo-particle.p2 {
    width: 3px;
    height: 3px;
    background: #00d4ff;
    animation-delay: 1.5s;
}

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

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

/* ---------- ENLACES DE NAVEGACIÓN ---------- */
.nav-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: #00d4ff;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

/* ---------- BOTÓN MODO OSCURO/CLARO ---------- */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: rgba(0, 212, 255, 0.3);
}

/* ---------- MODO CLARO ---------- */
body.light-mode {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    color: #1a1a2e;
}

body.light-mode nav {
    background: rgba(240, 244, 255, 0.95);
    border-bottom-color: rgba(0, 100, 255, 0.2);
}

body.light-mode .nav-links a {
    color: #1a1a2e;
}

body.light-mode .theme-toggle {
    color: #1a1a2e;
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .theme-toggle:hover {
    background: rgba(0, 212, 255, 0.2);
}

/* ---------- CONTENEDOR PRINCIPAL ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* ---------- FOOTER ---------- */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    margin-top: 3rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ============================================
   CONTADOR ESTILO YOUTUBE
   ============================================ */

.visitor-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 30, 35, 0.8);
    backdrop-filter: blur(4px);
    padding: 8px 16px;
    border-radius: 36px;
    font-family: 'Courier New', 'Fira Code', monospace;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.visitor-icon {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 2px rgba(0,212,255,0.5));
}

.visitor-count {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 8px rgba(0,212,255,0.3);
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.visitor-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #aaa;
    text-transform: uppercase;
}

body.light-mode .visitor-container {
    background: rgba(240, 240, 245, 0.9);
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-mode .visitor-label {
    color: #606060;
}

body.light-mode .visitor-count {
    background: linear-gradient(135deg, #202020, #404040);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.visitor-container:hover {
    background: rgba(50, 50, 55, 0.9);
    transform: scale(1.02);
    transition: all 0.2s ease;
}

body.light-mode .visitor-container:hover {
    background: rgba(220, 220, 225, 0.95);
}

/* ---------- RESPONSIVE GLOBAL ---------- */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }
    
    .nav-container {
        flex-direction: column;
    }
    
    .brand {
        margin-bottom: 0.5rem;
    }
}

/* ---------- PREFERS REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}