/*
Theme Name: Legweb
Theme URI: https://www.territoriogamer.com
Author: TerritorioGamer
Description: Tema personalizado con video global, secuencia de videos en loop en bienvenida, distintivo de plataforma e isotipo animado.
Version: 2.3.0
Text Domain: legweb
*/

:root {
    --tg-bg-base: #05070a;
    --tg-bg-card: rgba(11, 15, 23, 0.88);
    --tg-bg-hover: #101622;
    --tg-border: #1a2333;
    --tg-accent-cyan: #00e5ff;
    --tg-accent-amber: #f59e0b;
    --tg-text-main: #8a99ad;
    --tg-text-white: #f1f5f9;
    --tg-glow-cyan: 0 0 20px rgba(0, 229, 255, 0.25);
}

/* ==========================================
   VIDEO DE FONDO GLOBAL + REJILLA TÁCTICA
   ========================================== */
html body video.bg-video {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    z-index: -99999 !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

html body div.bg-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(5, 7, 10, 0.78) !important;
    background-image: 
        linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px) !important;
    background-size: 40px 40px !important;
    z-index: -99988 !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    background-color: var(--tg-bg-base);
    color: var(--tg-text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    color: var(--tg-accent-cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #38bdf8;
}

/* ==========================================
   CABECERA Y LOGO ANIMADO
   ========================================== */
header.site-header {
    background: var(--tg-bg-card);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--tg-accent-cyan);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 229, 255, 0.15);
    position: relative;
    z-index: 10;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.site-logo-gif {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4));
}

.site-branding h1 {
    margin: 0;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 800;
    color: var(--tg-text-white);
    background: linear-gradient(90deg, #ffffff, var(--tg-accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.site-description {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--tg-text-main);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
    align-items: center;
}

.main-navigation a {
    color: var(--tg-text-main);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.main-navigation a:hover {
    color: var(--tg-accent-cyan);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.server-dropdown {
    background: #0b0f17;
    color: var(--tg-text-white);
    border: 1px solid var(--tg-accent-cyan);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

/* ==========================================
   HERO SECTION CON SECUENCIA DE VIDEOS EN LOOP
   ========================================== */
.hero-section {
    position: relative;
    background: transparent !important;
    border: 1px solid var(--tg-border);
    border-top: 3px solid var(--tg-accent-cyan);
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 50px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    z-index: 5;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    pointer-events: none;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 7, 10, 0.78);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    background: rgba(0, 229, 255, 0.1);
    color: var(--tg-accent-cyan);
    border: 1px solid var(--tg-accent-cyan);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 10px;
}

.hero-section h1 {
    font-size: 38px;
    color: var(--tg-text-white);
    margin: 15px 0 10px;
}

.hero-section p {
    color: var(--tg-text-main);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ==========================================
   CONTENEDORES Y TARJETAS + INSIGNIA DE PLATAFORMA
   ========================================== */
main.site-main {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 60vh;
    position: relative;
    z-index: 5;
}

.server-card, .news-card, .server-archive-card, .server-profile {
    background: var(--tg-bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--tg-border);
    border-radius: 10px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.server-card::before, .server-archive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--tg-accent-cyan);
    opacity: 0.8;
}

.server-card:hover, .news-card:hover, .server-archive-card:hover {
    border-color: var(--tg-accent-cyan);
    box-shadow: var(--tg-glow-cyan);
    transform: translateY(-3px);
}

.server-platform-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #030712;
    border: 1px solid var(--tg-border);
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.server-platform-badge img {
    height: 18px;
    width: auto;
}

.server-platform-badge span {
    font-size: 11px;
    color: var(--tg-text-main);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.server-ip {
    background: #020406;
    border: 1px dashed var(--tg-border);
    padding: 10px 14px;
    border-radius: 6px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--tg-text-white);
}

.server-ip span {
    color: var(--tg-accent-cyan);
    font-weight: bold;
}

.servers-section h2, .latest-news h2, .page-title {
    color: var(--tg-text-white);
    font-size: 24px;
    margin-bottom: 25px;
    border-left: 4px solid var(--tg-accent-cyan);
    padding-left: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.servers-grid, .news-grid, .servers-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

/* ==========================================
   BOTONES
   ========================================== */
.btn-primary {
    background: linear-gradient(135deg, #0284c7, var(--tg-accent-cyan));
    color: #000000;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.5);
    color: #000;
}

.btn-discord {
    background: #5865F2;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
    transition: all 0.2s ease;
}

.btn-discord:hover {
    background: #4752C4;
    box-shadow: 0 0 25px rgba(88, 101, 242, 0.5);
    color: #fff;
}

/* ==========================================
   FOOTER
   ========================================== */
footer.site-footer {
    background: var(--tg-bg-card);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--tg-border);
    text-align: center;
    padding: 30px 20px;
    color: var(--tg-text-main);	
    margin-top: 60px;
    position: relative;
    z-index: 10;
    width: 100%;
}

.site-info {
    max-width: 1200px;
    margin: 0 auto;
}

.site-info p {
    margin: 0 0 10px 0;
    color: var(--tg-text-white);
}

.legal-links a {
    color: var(--tg-accent-cyan);
    text-decoration: none;
    font-weight: bold;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    header.site-header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .brand-link {
        justify-content: center;
    }

    .main-navigation ul {
        justify-content: center;
    }

    .hero-section {
        padding: 40px 20px;
    }

    .hero-section h1 {
        font-size: 28px;
    }

    .server-platform-badge {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 10px;
        display: inline-flex;
    }
}