/* --- Variables de Color y Fuentes --- */
:root {
    --primary-color: #00a8f3; --secondary-color: #f70054; --dark-bg: #0d0d1a; --light-bg: #1a1a2e; --text-color: #e0e0e0; --font-main: 'Orbitron', sans-serif; --font-alt: 'Open Sans', sans-serif;
}

/* --- Reseteo Básico y Estilos Globales --- */
* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: var(--font-alt); background-color: var(--dark-bg); color: var(--text-color); line-height: 1.6; overflow-x: hidden; }
h2, h3 { font-family: var(--font-main); color: var(--primary-color); text-shadow: 0 0 8px var(--primary-color); }
h2 { text-align: center; font-size: 2.8rem; margin-bottom: 60px; padding-top: 20px; }
h3 { font-size: 1.8rem; margin-bottom: 1rem; }
section { padding: 80px 20px; position: relative; }

/* --- Fondo Animado Canvas --- */
#plexus-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }

/* --- Barra de Navegación --- */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 3rem; position: fixed; width: 100%; top: 0; z-index: 1000; transition: background-color 0.3s ease; }
.navbar.scrolled { background-color: rgba(13, 13, 26, 0.9); backdrop-filter: blur(5px); }
.nav-brand { font-family: var(--font-main); font-size: 1.5rem; color: var(--text-color); text-decoration: none; font-weight: bold; }
.nav-brand span { color: var(--secondary-color); text-shadow: 0 0 8px var(--secondary-color); }
.nav-menu { display: flex; list-style: none; gap: 2.5rem; }
.nav-link { color: var(--text-color); text-decoration: none; font-size: 1.1rem; transition: color 0.3s ease; }
.nav-link:hover { color: var(--primary-color); }

/* --- Hero Section --- */
#inicio { height: 100vh; display: flex; justify-content: center; align-items: center; text-align: center; }
.hero-content { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.hero-logo { max-width: 700px; width: 100%; height: auto; animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-15px); } }
.dynamic-text-container { font-family: var(--font-main); font-size: 2.8rem; font-weight: bold; color: var(--text-color); min-height: 120px; display: flex; align-items: center; justify-content: center; }
#typed-text { color: var(--primary-color); text-shadow: 0 0 8px var(--primary-color); }
.typed-cursor { color: var(--primary-color); }

/* --- SECCIÓN DE PROMOCIONES --- */
.promo-section { background-color: var(--light-bg); padding: 40px 20px; text-align: center; }
.promo-content { max-width: 800px; margin: 0 auto; border: 2px solid var(--secondary-color); border-radius: 15px; padding: 2rem; box-shadow: 0 0 25px rgba(247, 0, 84, 0.3); }
.promo-content h3 { color: var(--secondary-color); text-shadow: 0 0 8px var(--secondary-color); font-size: 2rem; margin-bottom: 1rem; }
.promo-content h3 .fa-star { animation: pulseStar 1.5s infinite ease-in-out; }
@keyframes pulseStar { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.promo-content p { font-size: 1.5rem; margin-bottom: 1rem; }
.promo-content small { color: #888; }

/* --- Estilo de Tarjetas "Glassmorphism" --- */
.glass-card { background: rgba(26, 26, 46, 0.6); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); padding: 2.5rem; border-radius: 15px; text-align: center; transition: all 0.2s ease-out; transform-style: preserve-3d; position: relative; }
.glass-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(0, 168, 243, 0.25), transparent 40%); border-radius: 15px; opacity: 0; transition: opacity 0.2s ease-out; }
.glass-card:hover::before { opacity: 1; }
.glass-card-content { transform: translateZ(20px); }
.glass-card i { font-size: 3.5rem; margin-bottom: 1.5rem; color: var(--secondary-color); text-shadow: 0 0 8px var(--secondary-color); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem; max-width: 1200px; margin: 0 auto; }

/* --- NUEVA SECCIÓN TORNEOS --- */
#torneos { background-color: var(--light-bg); }
.torneos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2.5rem; max-width: 1200px; margin: 0 auto; }
.tournament-card { background: var(--dark-bg); border-radius: 15px; overflow: hidden; border: 1px solid var(--primary-color); box-shadow: 0 0 20px rgba(0, 168, 243, 0.2); transition: transform 0.3s ease; }
.tournament-card:hover { transform: translateY(-10px); }
.tournament-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.tournament-info { padding: 1.5rem; }
.tournament-info p { font-size: 1.1rem; margin-bottom: 0.75rem; color: #ccc; }
.tournament-info i { color: var(--secondary-color); margin-right: 10px; width: 20px; text-align: center;}
.btn-inscribete { display: inline-block; background-color: var(--secondary-color); color: white; padding: 0.75rem 1.5rem; border-radius: 25px; text-decoration: none; font-weight: bold; margin-top: 1rem; transition: background-color 0.3s, transform 0.3s; }
.btn-inscribete:hover { background-color: #ff337a; transform: scale(1.05); }

/* --- SECCIÓN CATÁLOGO DE JUEGOS VISUAL --- */
#catalogo-juegos { background-color: var(--dark-bg); }
.game-filter-controls { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.game-filter-controls input { background-color: #2a2a3e; border: 1px solid var(--primary-color); color: white; padding: 0.75rem 1rem; border-radius: 25px; font-size: 1rem; width: 100%; max-width: 300px; }
.game-filter-controls input::placeholder { color: #888; }
.game-filter-controls button { background: none; border: 1px solid #888; color: #888; padding: 0.5rem 1rem; border-radius: 20px; cursor: pointer; transition: all 0.3s; font-weight: bold; }
.game-filter-controls button:hover, .game-filter-controls button.active { background-color: var(--primary-color); color: var(--dark-bg); border-color: var(--primary-color); }
.game-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.5rem; max-width: 1200px; margin: 0 auto; }
.game-card { background-color: #2a2a3e; border-radius: 10px; text-align: center; border: 1px solid transparent; transition: all 0.3s; overflow: hidden; position: relative; aspect-ratio: 1 / 1.3; }
.game-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.4); border-color: var(--secondary-color); }
.game-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.game-card:hover img { transform: scale(1.05); }
.game-title { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(13, 13, 26, 1), rgba(13, 13, 26, 0.8), transparent); padding: 2rem 1rem 1rem 1rem; font-weight: bold; font-size: 1.1rem; }

/* --- Sección Tarifas --- */
#tarifas { background-color: var(--light-bg); }
.tarifas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2.5rem; max-width: 900px; margin: 0 auto; }
.price { font-size: 3.5rem; font-weight: bold; margin-bottom: 1rem; color: var(--text-color); }
.price span { font-size: 1.2rem; color: #aaa; }
.tarifas-grid ul { list-style: none; space-y: 0.5rem; color: #bbb; }
.featured { border: 2px solid var(--primary-color); transform: scale(1.05); box-shadow: 0 0 25px rgba(0, 168, 243, 0.3); }

/* --- Sección Galería (Slider) --- */
.slider-container { position: relative; max-width: 900px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: 15px; overflow: hidden; box-shadow: 0 0 25px rgba(247, 0, 84, 0.3); }
.slider-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.7s ease-in-out; opacity: 0; }
.slider-image.active { opacity: 1; }
.slider-button { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; border: none; padding: 1rem; cursor: pointer; z-index: 10; border-radius: 50%; width: 50px; height: 50px; display: flex; justify-content: center; align-items: center; }
.prev { left: 1rem; }
.next { right: 1rem; }
.slider-controls { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.5rem; z-index: 10; }
.slider-controls button { width: 12px; height: 12px; border-radius: 50%; border: none; background: rgba(255,255,255,0.5); cursor: pointer; }
.slider-controls button.active { background: white; }

/* --- NUEVO FORMULARIO DE CONTACTO --- */
#contacto { background-color: var(--dark-bg); }
.contact-container { display: flex; flex-wrap: wrap; gap: 3rem; max-width: 1200px; margin: 0 auto; align-items: stretch;}
.contact-info { background: var(--light-bg); padding: 2.5rem; border-radius: 15px; flex: 1.5; }
.map-container { flex: 2; min-width: 320px; }
.map-container iframe { width: 100%; height: 100%; min-height: 450px; border-radius: 15px; border: 2px solid var(--primary-color); }
.contact-form .form-group { margin-bottom: 1.5rem; }
.contact-form label { display: block; margin-bottom: 0.5rem; color: #ccc; }
.contact-form input, .contact-form textarea {
    width: 100%; background-color: #2a2a3e; border: 1px solid var(--primary-color);
    color: white; padding: 0.75rem 1rem; border-radius: 8px; font-size: 1rem; transition: box-shadow 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none; box-shadow: 0 0 10px var(--primary-color);
}
.btn-submit {
    display: block; width: 100%; background-color: var(--secondary-color); color: white; padding: 0.8rem 1.5rem;
    border-radius: 25px; text-decoration: none; font-weight: bold; border: none;
    margin-top: 1rem; cursor: pointer; transition: background-color 0.3s, transform 0.3s;
}
.btn-submit:hover { background-color: #ff337a; transform: scale(1.02); }
.social-links { margin-top: 2rem; text-align: center; }
.social-links a { color: var(--text-color); font-size: 2.5rem; text-decoration: none; transition: color 0.3s; margin: 0 1rem;}
.social-links a:hover { color: var(--primary-color); }

/* --- Widgets Flotantes y Chatbot --- */
.floating-widgets { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1001; display: flex; flex-direction: column; align-items: flex-end; gap: 1rem; }
.chat-bubble, .whatsapp-float { width: 65px; height: 65px; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 15px rgba(0,0,0,0.4); cursor: pointer; transition: transform 0.2s ease; }
.chat-bubble:hover, .whatsapp-float:hover { transform: scale(1.1); }
.chat-bubble { background-color: var(--primary-color); color: var(--dark-bg); font-size: 2rem; }
.whatsapp-float { background-color: #25D366; color: white; font-size: 2.5rem; text-decoration: none; }
.chatbot-container { display: none; position: absolute; bottom: 80px; right: 0; width: 350px; max-width: 90vw; background-color: var(--light-bg); border-radius: 15px; box-shadow: 0 5px 25px rgba(0,0,0,0.5); border: 1px solid rgba(255, 255, 255, 0.1); flex-direction: column; }
.chatbot-header { background-color: var(--secondary-color); padding: 1rem; border-top-left-radius: 15px; border-top-right-radius: 15px; display: flex; justify-content: space-between; align-items: center; }
.close-chatbot { font-size: 1.8rem; cursor: pointer; }
.chatbot-body { height: 350px; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.chat-message { padding: 0.75rem 1rem; border-radius: 10px; max-width: 85%; }
.chat-message.bot { background-color: var(--dark-bg); align-self: flex-start; }
.chat-message.user { background-color: var(--primary-color); color: var(--dark-bg); align-self: flex-end; }
.chatbot-footer { display: flex; padding: 1rem; border-top: 1px solid #333; }
#userInput { flex: 1; padding: 0.75rem; border-radius: 8px; border: 1px solid #555; background: #252525; color: white; }
#sendMessage { background: var(--secondary-color); color: white; border: none; padding: 0.75rem 1rem; border-radius: 8px; margin-left: 0.5rem; cursor: pointer; }
footer { text-align: center; padding: 30px; background-color: var(--dark-bg); border-top: 1px solid var(--secondary-color); }

/* --- Responsividad --- */
@media (max-width: 768px) {
    h2 { font-size: 2.2rem; }
    .navbar { padding: 1rem 1.5rem; }
    .nav-menu { display: none; }
    .hero-logo { max-width: 250px; }
    .dynamic-text-container { font-size: 1.8rem; min-height: 80px; }
    .contact-container { flex-direction: column; }
    .promo-content p { font-size: 1.2rem; }
    .game-filter-controls { gap: 0.5rem; }
    .game-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .torneos-grid { grid-template-columns: 1fr; }
}
/* --- Sección de Facebook --- */
#facebook-feed {
    background-color: var(--dark-bg);
    text-align: center;
}
.facebook-widget-container {
    margin: 0 auto;
    width: 100%;
    max-width: 500px; /* Cambiado de 1800px a 500px */
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    overflow: hidden; 
}
/* --- Estilos para la Nueva Sección de Facebook --- */
#facebook-feed {
    background-color: var(--light-bg);
}

.facebook-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Alinea los items al inicio */
    gap: 2.5rem; /* Espacio entre columnas */
    max-width: 1200px;
    margin: 0 auto;
}

.facebook-widget-container,
.facebook-contact-info {
    flex: 1; /* Hace que cada columna ocupe el espacio disponible */
}

.facebook-widget-container {
    max-width: 500px; /* Ancho máximo del plugin */
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    overflow: hidden;
}

.facebook-contact-info h3 {
    color: var(--secondary-color);
    text-shadow: 0 0 8px var(--secondary-color);
    margin-bottom: 2rem;
}

.facebook-contact-info p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
}

.facebook-contact-info i {
    color: var(--primary-color);
    margin-right: 15px;
    width: 25px;
    text-align: center;
    margin-top: 5px; /* Alinea el ícono con la primera línea de texto */
}

/* --- Responsividad para la sección de Facebook --- */
@media (max-width: 900px) {
    .facebook-grid {
        flex-direction: column; /* Apila las columnas en pantallas más pequeñas */
        align-items: center;
    }
}