
/* Estilos Generales */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 20px 0;
    background-color: #1a202c;
    color: #e2e8f0;
}

.container {
    width: 100%; /* Ocupa todo el ancho disponible */
    margin: 0 auto;
    background-color: #2d3748;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Eliminamos max-width y box-shadow para restaurar pantalla completa */
}

/* Estructura de Dos Columnas (Si aplica a alguna página) */
.body-wrapper {
    display: flex;
    flex-grow: 1;
}

/* Barra Lateral (Menú) - CÓDIGO ACTUALIZADO */
.sidebar {
    width: 220px;
    padding: 20px;
    border-right: 1px solid #1f73f2;
    flex-shrink: 0;
    background-color: rgba(0,0,0,0.1);
}
.sidebar h4 {
    color: #6690D0;
    font-size: 1.1em;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid #1f73f2;
    padding-bottom: 5px;
}
.sidebar h4:first-child { margin-top: 0; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }

.sidebar li a {
    display: block;
    color: #cbd5e0;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    position: relative;
    transition: color 0.3s ease;
}

.sidebar li a:hover {
    color: #ffffff;
}

.sidebar li a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: #1f73f2;
  bottom: 0;
  left: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease-out;
}

.sidebar li a:hover::after {
  transform: scaleX(1);
}

/* Contenido Principal (Columna Derecha o Única) */
.main-content {
    flex-grow: 1;
    padding: 20px 40px;
    min-width: 0; /* Necesario para flexbox */
}

/* Estilos de la Cabecera (Header) */
header { display: flex; justify-content: space-between; align-items: center; padding: 15px 40px; border-bottom: 1px solid #1f73f2; flex-shrink: 0; } /* Padding ajustado */
.logo { display: flex; align-items: center; }
.logo img { width: 45px; height: auto; margin-right: 15px; } /* Tamaño ajustado */
.logo h1 { margin: 0; font-size: 1.8em; color: #6690D0; } /* Tamaño ajustado */
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; align-items: center; } /* Añadido align-items */
nav a { text-decoration: none; color: #cbd5e0; font-weight: bold; font-size: 1em; transition: color 0.3s ease; } /* Tamaño ajustado */
nav a:hover { color: #ffffff; }

/* Botón de Chat en Navegación */
.chat-nav-button {
  background-color: #1f73f2;
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}
.chat-nav-button:hover {
  background-color: #0056b3;
  color: #ffffff !important;
}

/* Estilos Genéricos del Contenido Principal (main) */
.main-content h2 { color: #6690D0; font-size: 2em; text-align: center; border-bottom: 1px solid #1f73f2; padding-bottom: 15px; margin-bottom: 25px;} /* Tamaño ajustado */
.main-content h3 { color: #ffffff; font-size: 1.4em; margin-bottom: 1rem; text-align: center; } /* Tamaño ajustado */
.main-content p { font-size: 1.1em; line-height: 1.6; max-width: 800px; margin: 20px auto; text-align: justify; } /* Justificado y tamaño ajustado */
.main-image img { max-width: 100%; height: auto; border-radius: 8px; margin: 30px 0; display: block; margin-left: auto; margin-right: auto; } /* Centrado */
.chat-promo { background-color: rgba(0, 0, 0, 0.2); padding: 30px; border-radius: 8px; margin-top: 40px; border: 1px solid #1f73f2; text-align: center; }
.chat-promo h3 { margin-top: 0; font-size: 1.6em; color: #ffffff; } /* Tamaño ajustado */
.chat-button { display: inline-block; background-color: #6690D0; color: #fff; padding: 12px 25px; text-decoration: none; font-weight: bold; border-radius: 5px; margin-top: 20px; transition: background-color 0.3s ease; } /* Padding ajustado */
.chat-button:hover { background-color: #4B6399; }

/* Pie de Página (footer) */
footer { text-align: center; padding: 20px; background-color: #111827; color: #a0aec0; border-top: 1px solid #1f73f2; flex-shrink: 0; margin-top: auto; } /* Añadido margin-top: auto para empujar al fondo */

/* --- ESTILOS PÁGINA KEDADA --- */
.image-container { position: relative; margin-top: 30px; color: white; text-align: center; }
.image-container img { width: 100%; height: auto; border-radius: 8px; display: block; }
.overlay-box { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 700px; background-color: rgba(0, 0, 0, 0.7); padding: 15px; border-radius: 5px; font-weight: bold; font-size: 0.9em; }
.overlay-text-middle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 1.8em; font-weight: bold; text-shadow: 2px 2px 5px #000000; }
.overlay-text-bottom { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); width: 90%; font-weight: bold; font-size: 1.1em; text-shadow: 2px 2px 5px #000000; }
.comments-section h3 { color: #6690D0; font-size: 1.6em; margin-bottom: 20px; text-align: center; } /* Tamaño ajustado */
.comment { background-color: rgba(0, 0, 0, 0.2); border: 1px solid #1f73f2; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.comment-header { border-bottom: 1px dashed #1f73f2; padding-bottom: 10px; margin-bottom: 15px; font-size: 1em; } /* Tamaño ajustado */
.comment-author { font-weight: bold; color: #ffffff; }
.comment-date { color: #a0aec0; margin-left: 10px; font-size: 0.9em; } /* Tamaño ajustado */
.comment-body p { margin: 0 0 1em 0; text-align: left; font-size: 1em; line-height: 1.7; }
.comment-body br { display: block; margin: 0.5em 0; }

/* --- ESTILOS PÁGINA NOTICIAS --- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; margin-top: 40px; text-align: left; }
.news-card { background-color: rgba(0, 0, 0, 0.2); border: 1px solid #1f73f2; border-radius: 8px; padding: 20px; text-decoration: none; color: #e2e8f0; display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,0,0,0.4); }
.news-card img { max-height: 50px; width: auto; object-fit: contain; margin-bottom: 15px; align-self: flex-start; }
.news-card h3 { margin: 0 0 10px 0; color: #ffffff; font-size: 1.1em;} /* Tamaño ajustado */
.news-card p { margin: 0; font-size: 0.9em; line-height: 1.5; color: #cbd5e0; flex-grow: 1; text-align: left; }

/* --- ESTILOS PÁGINA COMENTARIOS (Formulario genérico) --- */
.comment-form { background-color: rgba(0, 0, 0, 0.2); border: 1px solid #1f73f2; border-radius: 8px; padding: 25px; margin-top: 40px; text-align: left; }
.comment-form h3 { margin: 0 0 20px 0; color: #ffffff; text-align: center; font-size: 1.4em;} /* Tamaño ajustado */
.comment-form input, .comment-form textarea { width: 100%; padding: 12px; margin-bottom: 15px; border-radius: 4px; border: 1px solid #1f73f2; background-color: #1a202c; color: #e2e8f0; font-size: 1em; box-sizing: border-box; }
.comment-form button { width: 100%; padding: 12px; background-color: #6690D0; color: #fff; border: none; border-radius: 4px; font-weight: bold; font-size: 1.1em; cursor: pointer; transition: background-color 0.3s ease; }
.comment-form button:hover { background-color: #4B6399; }
.form-message { text-align: center; margin-top: 15px; font-weight: bold; }
.no-comments { text-align: center; color: #a0aec0; margin-top: 20px; font-style: italic; }

/* --- ESTILOS PÁGINA JUEGOS --- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 40px; }
.game-card { border: 2px solid #1f73f2; border-radius: 8px; text-decoration: none; color: #e2e8f0; overflow: hidden; display: block; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.game-card:hover { transform: scale(1.05); box-shadow: 0 8px 20px rgba(0,0,0,0.5); border-color: #6690D0; }
.game-card img { width: 100%; height: 150px; object-fit: contain; display: block; background-color: rgba(0, 0, 0, 0.2); }
.game-card h3 { margin: 0; padding: 15px; background-color: rgba(0, 0, 0, 0.3); text-align: center; font-size: 1.1em;} /* Tamaño ajustado */

/* --- ESTILOS PARA PESTAÑAS (ENTRETENIMIENTO, ETC.) --- */
.tab-buttons { display: flex; flex-wrap: wrap; border-bottom: 2px solid #6690D0; margin-bottom: 20px; }
.tab-button { padding: 10px 20px; cursor: pointer; background-color: transparent; border: none; color: #cbd5e0; font-size: 1em; font-weight: bold; transition: all 0.3s ease; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab-button:hover { color: #ffffff; border-bottom-color: #ffffff; transform: translateY(-3px); } 
.tab-button.active { color: #ffffff; border-bottom-color: #6690D0; } 
.tab-content { position: relative; min-height: 300px; }

/* --- AQUÍ ESTÁ LA CORRECCIÓN --- */
.tab-content .tab-panel { 
    display: none; /* Ocultamos las inactivas por completo para que no molesten */
    opacity: 0; 
    transition: opacity 0.4s ease; 
} 

.tab-content .tab-panel.active { 
    display: block; /* La activa se muestra como bloque SÓLIDO */
    opacity: 1; 
    position: relative; /* IMPORTANTE: Ocupa espacio real y empuja el footer */
    animation: fadeIn 0.5s;
}

.content-box { background-color: rgba(0, 0, 0, 0.2); border-radius: 8px; padding: 20px; text-align: left; font-size: 1.1em; line-height: 1.8; }
.comment-area { margin-top: 40px; }

/* --- ESTILOS PÁGINA COVID --- */
.content-image { max-width: 100%; height: auto; border-radius: 8px; margin: 20px auto; display: block; }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; background: #000; margin: 20px 0; border-radius: 8px; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.video-caption { font-style: italic; font-size: 0.9em; color: #a0aec0; text-align: center; margin-top: 10px; }

/* --- ESTILOS ÁLBUM DE FOTOS --- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; margin-top: 20px; }
.photo-grid a { display: block; border: 3px solid #1f73f2; border-radius: 8px; overflow: hidden; height: 180px; transition: transform 0.3s ease, border-color 0.3s ease; }
.photo-grid a:hover { transform: scale(1.05); border-color: #6690D0; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }

/* --- ESTILOS PÁGINA DE CONTACTO --- */
.contact-box { background-color: rgba(0, 0, 0, 0.2); border: 1px solid #1f73f2; border-radius: 8px; padding: 25px; margin-top: 30px; text-align: center; }
.contact-box h3 { margin: 0 0 15px 0; color: #ffffff; font-size: 1.4em;} /* Tamaño ajustado */
.email-display { background-color: #1a202c; color: #6690D0; padding: 15px; border-radius: 5px; font-family: monospace; font-size: 1.2em; font-weight: bold; margin-top: 10px; display: inline-block; }

/* --- ESTILOS "EN CONSTRUCCIÓN" --- */
.construction-container { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.construction-container img { max-width: 400px; width: 100%; margin-bottom: 30px; }
.construction-tag { font-size: 0.7em; font-weight: bold; color: #00ff00; background-color: rgba(0, 255, 0, 0.1); padding: 4px 8px; border-radius: 5px; margin-left: 15px; vertical-align: middle; white-space: nowrap; }
body.light-mode .construction-tag { color: #009900; background-color: rgba(0, 153, 0, 0.1); }

/* --- ESTILO BOTÓN DE RADIO --- */
.header-radio-btn { width: 40px; height: 40px; background-color: #006ED2; border: none; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.4); cursor: pointer; display: flex; justify-content: center; align-items: center; transition: transform 0.3s; }
.header-radio-btn:hover { transform: scale(1.1); }
.header-radio-btn img { width: 22px; margin: 0; }

/* ===== ESTILOS PARA LA GALERÍA DE VÍDEOS ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 20px; }
.video-item {}
.video-item video { width: 100%; height: auto; border-radius: 0.5rem; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); border: 2px solid #1f73f2; }
.video-title { text-align: center; margin-top: 0.5rem; font-weight: 600; color: #e2e8f0; }

/* --- ESTILOS PARA EL MODO DÍA / CLARO --- */
body.light-mode { background-color: #f0f2f5; color: #333333; }
body.light-mode header { background-color: #ffffff; border-bottom: 1px solid #dcdcdc; }
body.light-mode h1, body.light-mode h2, body.light-mode h3, body.light-mode h4 { color: #1a1a1a; }
body.light-mode a { color: #0056b3; }
body.light-mode .sidebar { background-color: #ffffff; border-right: 1px solid #dcdcdc; }
body.light-mode .sidebar h4 { color: #0056b3; border-bottom-color: #dcdcdc; }
body.light-mode .sidebar li a { color: #333333; }
body.light-mode .sidebar li a:hover { color: #0056b3; }
body.light-mode .sidebar li a::after { background-color: #0056b3; }
body.light-mode .main-content, body.light-mode .content-box, body.light-mode .comment { background-color: #ffffff; }
body.light-mode .chat-button, body.light-mode .chat-nav-button { background-color: #007bff; color: #ffffff !important; }
body.light-mode .chat-button:hover, body.light-mode .chat-nav-button:hover { background-color: #0056b3; }
body.light-mode .comment { border-color: #dcdcdc; }
body.light-mode .comment-header { border-bottom-color: #dcdcdc; }
body.light-mode .comment-author { color: #1a1a1a; }
body.light-mode .comment-date { color: #555555; }
body.light-mode .comment-form { background-color: #f8f9fa; border-color: #dcdcdc; }
body.light-mode .comment-form h3 { color: #1a1a1a; }
body.light-mode .comment-form input, body.light-mode .comment-form textarea { background-color: #ffffff; border-color: #ced4da; color: #333333; }
body.light-mode .comment-form button { background-color: #007bff; }
body.light-mode .comment-form button:hover { background-color: #0056b3; }
body.light-mode .news-card { background-color: #ffffff; border-color: #dcdcdc; }
body.light-mode .news-card h3 { color: #1a1a1a; }
body.light-mode .news-card p { color: #555555; }
body.light-mode .game-card { border-color: #dcdcdc; }
body.light-mode .game-card:hover { border-color: #007bff; }
body.light-mode .game-card img { background-color: #f8f9fa; }
body.light-mode .game-card h3 { background-color: #f8f9fa; }
body.light-mode .tab-buttons { border-bottom-color: #ced4da; }
body.light-mode .tab-button { color: #555555; }
body.light-mode .tab-button:hover { color: #0056b3; border-bottom-color: #0056b3; }
body.light-mode .tab-button.active { color: #0056b3; border-bottom-color: #0056b3; }
body.light-mode .contact-box { background-color: #ffffff; border-color: #dcdcdc; }
body.light-mode .contact-box h3 { color: #1a1a1a; }
body.light-mode .email-display { background-color: #e9ecef; color: #0056b3; }
body.light-mode footer { background-color: #e9ecef; color: #555555; border-top-color: #dcdcdc; }
body.light-mode .gallery-grid video { border-color: #dcdcdc; }
body.light-mode .video-title { color: #333333; }

/* --- ESTILOS PARA EL CONTADOR DE USUARIOS --- */
.live-stats { display: flex; align-items: center; margin: 0 20px; font-size: 0.9em; color: #cbd5e0; font-weight: bold; }
.live-stats span { margin-left: 8px; font-size: 1.1em; color: #ffffff; }
body.light-mode .live-stats { color: #555555; }
body.light-mode .live-stats span { color: #1a1a1a; }


/* =============================================================== */
/* =========== ESTILOS UNIFICADOS Y LIMPIOS PARA EL FORO ========= */
/* =============================================================== */

/* --- Estilos Generales del Foro (foro.html) --- */
.forum-title {
    font-size: 2.2rem; /* Ligeramente más pequeño */
    color: #f0f0f0;
    text-align: center;
    margin-bottom: 0.5rem;
}

.forum-subtitle {
    text-align: center;
    color: #cccccc;
    margin-bottom: 2.5rem; /* Menos espacio */
}

.categories-grid {
    display: grid;
    /* Cambiamos 280px a 320px para hacer las columnas (y tarjetas) más anchas */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background-color: #2c3e50;
    border: 1px solid #445a70;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.category-card h3 {
    margin-top: 0;
    /* Aumentamos de 1.2rem a 1.35rem */
    font-size: 1.35rem;
    color: #87ceeb;
    margin-bottom: 0.8rem;
}

.category-card p {
    /* Aumentamos de 0.9rem a 1rem */
    font-size: 1rem;
    color: #bdc3c7;
    line-height: 1.5;
}

/* --- Estilos Comunes (topics.html, posts.html) --- */
.breadcrumb {
    margin-bottom: 1.5rem; /* Menos espacio */
    font-size: 0.9em; /* Ligeramente más pequeño */
    color: #bdc3c7;
    display: flex; /* Para alinear el "Volver" */
    align-items: center;
}

.breadcrumb span {
    color: #ffffff;
    font-weight: bold;
}

.breadcrumb a {
    color: #87ceeb;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .back-link {
    margin-left: auto; /* Empuja el enlace "Volver" a la derecha */
    font-size: 0.9em;
    color: #bdc3c7;
    text-decoration: none;
}
.breadcrumb .back-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.error-message {
    text-align: center;
    color: #e74c3c;
    font-weight: bold;
    padding: 1.5rem; /* Menos padding */
    background-color: #3e2723;
    border: 1px solid #e74c3c;
    border-radius: 8px;
    margin-top: 1rem; /* Espacio si aparece */
}

/* --- Estilos Página de Temas (topics.html) --- */
.forum-header { /* Cabecera con breadcrumb y botón crear */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem; /* Menos espacio */
    /* El breadcrumb ya tiene margen inferior, no necesitamos más aquí */
}

.forum-actions { /* Contenedor del botón/prompt login */
    text-align: right;
}

.create-topic-button {
    background-color: #87ceeb;
    color: #1c2833;
    border: none;
    padding: 10px 18px; /* Ajustado */
    border-radius: 5px;
    font-size: 0.9em; /* Ajustado */
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.create-topic-button:hover { background-color: #a0e0ff; }

.login-prompt { /* Mensaje "Inicia sesión para..." */
    text-align: right;
    margin: 0; /* Quitamos margen si está dentro de .forum-actions */
    color: #bdc3c7;
    font-size: 0.9em;
}
.login-prompt a { color: #87ceeb; text-decoration: none; font-weight: bold; }
.login-prompt a:hover { text-decoration: underline; }


.no-topics-message {
    text-align: center;
    padding: 2.5rem; /* Menos padding */
    background-color: #34495e;
    border: 1px dashed #567086;
    border-radius: 8px;
    color: #bdc3c7;
    margin-top: 1rem;
}

.topics-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #2c3e50;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
}

.topics-table th,
.topics-table td {
    padding: 0.9rem 1.2rem; /* Menos padding */
    text-align: left;
    border-bottom: 1px solid #445a70;
}

.topics-table thead { background-color: #34495e; }

.topics-table th {
    font-weight: 700;
    color: #EAEAEA;
    font-size: 0.85em; /* Ligeramente más pequeño */
    text-transform: uppercase;
    white-space: nowrap; /* Evitar que se partan los títulos */
}

.topics-table td { color: #D0D0D0; }

.topics-table td a { /* Título del tema */
    font-weight: 700;
    color: #87ceeb;
    text-decoration: none;
    font-size: 1em; /* Tamaño normal */
}
.topics-table td a:hover { text-decoration: underline; }

/* Celdas específicas de Autor y Fecha */
.topics-table td:nth-child(2),
.topics-table td:nth-child(3) {
    color: #B0B0B0; /* Gris ligeramente diferente */
    font-size: 0.85em; /* Más pequeño */
    white-space: nowrap;
}

.topics-table tbody tr:last-child td { border-bottom: none; }
.topics-table tbody tr:hover { background-color: #34495e; }

/* --- Estilos Modal Crear Tema (sin cambios, ya estaban bien) --- */
.modal-backdrop { /* ... */ }
.modal-content { /* ... */ }
.modal-content h2 { /* ... */ }
/* (Mantenemos los estilos del modal y sus formularios como estaban) */

/* --- Estilos Página de Mensajes (posts.html) --- */
.topic-main-title {
    font-size: 2rem; /* Ligeramente más pequeño */
    color: #f0f0f0;
    margin-bottom: 1.5rem; /* Menos espacio */
    border-bottom: 2px solid #567086;
    padding-bottom: 0.8rem; /* Menos padding */
}

#posts-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    background-color: #2c3e50;
    border: 1px solid #445a70;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.post-header {
    background-color: #34495e;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #445a70;
    display: flex;
    justify-content: space-between;
    font-size: 0.85em; /* Ligeramente más pequeño */
    color: #bdc3c7;
}

.post-author {
    font-weight: bold;
    color: #ffffff;
}

.post-content {
    padding: 1.5rem;
    line-height: 1.6;
    color: #ecf0f1;
}

.post-content p { margin-top: 0; }

/* --- ¡ESTILO PARA ENLACES DENTRO DE LOS POSTS! --- */
.post-content a {
    color: #87ceeb; /* Azul cielo */
    text-decoration: underline;
}
.post-content a:hover {
    color: #a0e0ff; /* Azul más claro */
    text-decoration: none;
}


/* --- Estilos Formulario de Respuesta (posts.html) --- */
.reply-form-container {
    margin-top: 2.5rem; /* Menos espacio */
    padding-top: 1.5rem; /* Menos padding */
    border-top: 2px solid #567086;
}

.reply-form-container h3 {
    margin-top: 0;
    color: #f0f0f0;
    font-size: 1.3em; /* Ligeramente más pequeño */
    margin-bottom: 1rem;
}

#reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #567086;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    margin-bottom: 1rem;
    font-family: 'Roboto', sans-serif;
    background-color: #34495e;
    color: #ecf0f1;
    min-height: 100px; /* Altura mínima */
}

#reply-form .button-primary {
    background-color: #87ceeb;
    color: #1c2833;
    padding: 10px 20px; /* Ajustado */
    font-size: 0.95em; /* Ajustado */
}
#reply-form .button-primary:hover { background-color: #a0e0ff; }

/* Estilo prompt login en posts.html (heredado de .login-prompt) */
#login-prompt-reply {
     /* Ya tiene estilos de .login-prompt */
}


/* --- ESTILOS PARA LA PÁGINA DE LOGIN (Ajustados para fondo oscuro) --- */
/* (Mantenemos los estilos del login como estaban, ya adaptados) */
.login-container { /* ... */ }
.login-container h2 { /* ... */ }
.form-group label { /* ... */ }
.form-group input { /* ... */ }
.login-button { /* ... */ }
.login-button:hover { /* ... */ }
.error-message-login { /* ... */ }

/* --- ESTILOS BOTONES LOGIN/REGISTRO EN NAVEGACIÓN --- */
nav ul {
    align-items: center; /* Asegura alineación vertical si no estaba */
}

.auth-button {
    display: inline-block;
    padding: 6px 12px; /* Un poco más pequeño para la barra nav */
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em; /* Un poco más pequeño */
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
    margin: 0 5px; /* Espacio alrededor */
}

.auth-button.login {
    background-color: #87ceeb; /* Azul cielo */
    color: #1c2833 !important; /* Texto oscuro */
    border-color: #87ceeb;
}
.auth-button.login:hover {
    background-color: #a0e0ff;
    border-color: #a0e0ff;
    color: #1c2833 !important;
}

.auth-button.register {
    background-color: transparent;
    color: #87ceeb !important; /* Texto azul cielo */
    border: 1px solid #87ceeb;
}
.auth-button.register:hover {
    background-color: rgba(135, 206, 235, 0.1);
    color: #a0e0ff !important;
    border-color: #a0e0ff;
}

/* Ajuste para que el botón CHAT no se pegue */
.chat-nav-button {
    margin-left: 10px; /* Añade margen a la izquierda del botón Chat */
}

/* --- ESTILOS PARA EL MODAL DE LOGIN --- */

/* Fondo semitransparente */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* Más oscuro */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050; /* Asegurar que esté por encima de otros elementos */
    opacity: 0; /* Inicialmente invisible */
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s; /* Transición suave */
}
.modal-backdrop.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

/* Contenedor del contenido del modal */
.modal-content {
    background-color: #2c3e50; /* Fondo oscuro modal */
    padding: 2.5rem; /* Más padding */
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    position: relative; /* Para posicionar el botón de cerrar */
    width: 90%;
    max-width: 450px; /* Ancho máximo */
    border: 1px solid #445a70;
    transform: translateY(-50px); /* Posición inicial para animación */
    transition: transform 0.3s ease-out;
}
.modal-backdrop.visible .modal-content {
    transform: translateY(0); /* Posición final animada */
}


/* Tamaño específico para el modal de login (si es diferente a otros modales) */
.login-modal-size {
   /* Puedes ajustar max-width aquí si es necesario */
}

/* Botón de cerrar (X) */
.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5rem; /* Más grande */
    color: #bdc3c7; /* Color gris claro */
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}
.modal-close-btn:hover {
    color: #ffffff; /* Blanco al pasar el ratón */
}

/* Título del modal */
.modal-content h2 {
    margin-top: 0;
    margin-bottom: 2rem;
    color: #f0f0f0;
    text-align: center;
    font-size: 1.8rem;
}

/* Estilos heredados/ajustados del formulario de login.html */
.modal-content .form-group label {
    color: #bdc3c7;
}
.modal-content .form-group input {
    background-color: #34495e;
    color: #ecf0f1;
    border-color: #567086;
}
.modal-content .form-actions {
    margin-top: 1.5rem; /* Menos margen */
    justify-content: center; /* Centrar botón */
}
.modal-content .login-button { /* Botón 'Entrar' */
     width: auto; /* Ancho automático */
     min-width: 120px; /* Ancho mínimo */
     background-color: #87ceeb;
     color: #1c2833;
}
.modal-content .login-button:hover {
    background-color: #a0e0ff;
}
.modal-content .error-message-login { /* Mensaje de error */
    background-color: #3e2723;
    color: #ffab91;
    border-color: #e74c3c;
    margin-bottom: 1rem;
}

/* Mensaje "¿No tienes cuenta?" */
.modal-register-prompt {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9em;
    color: #bdc3c7;
}
.modal-register-prompt a {
    color: #87ceeb;
    text-decoration: none;
    font-weight: bold;
}
.modal-register-prompt a:hover {
    text-decoration: underline;
}

/* Asegurar que el botón del header tenga estilo de botón */
#open-login-modal-btn {
    /* Hereda .auth-button.login, pero aseguramos cursor */
    cursor: pointer;
}

/* ======================================= */
/* --- ESTILOS PARA EL BUSCADOR DE ARCHIVOS --- */
/* ======================================= */

.file-search-container {
    background-color: #34495e; /* Fondo oscuro azulado, como la tabla */
    border: 1px solid #445a70;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.file-search-container h3 {
    margin-top: 0;
    color: #f0f0f0;
    border-bottom: 1px solid #445a70;
    padding-bottom: 0.75rem;
    font-size: 1.25rem;
}

.search-icon {
    display: inline-block;
    transform: rotate(10deg);
    margin-right: 8px;
}

#file-search-form {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

#search-term-input {
    flex-grow: 1; /* El campo de texto ocupa el espacio disponible */
    padding: 10px;
    border: 1px solid #567086;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #2c3e50; /* Fondo oscuro */
    color: #ecf0f1; /* Texto claro */
}

#search-term-input:focus {
    outline: none;
    border-color: #87ceeb;
    box-shadow: 0 0 5px rgba(135, 206, 235, 0.5);
}

/* Usamos el mismo estilo que el botón de "Publicar Respuesta" */
#file-search-form .button-primary {
    background-color: #87ceeb;
    color: #1c2833;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#file-search-form .button-primary:hover {
     background-color: #a0e0ff;
}

#search-results-container {
    margin-top: 1.5rem;
    color: #ecf0f1;
}

#search-results-container h4 {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.search-results-list {
    list-style-type: none;
    padding-left: 0;
}

.search-results-list li {
    background-color: #2c3e50;
    border: 1px solid #445a70;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-results-list li a {
    color: #87ceeb;
    text-decoration: none;
    font-weight: bold;
}

.search-results-list li a:hover {
    text-decoration: underline;
}

.login-prompt-inline {
    font-size: 0.9em;
    font-style: italic;
    color: #bdc3c7;
}

/* --- Fin Estilos Buscador --- */

/* =================================================================
    ESTILOS PARA EL MODAL "CREAR NUEVO TEMA"
    ================================================================= */

/* El fondo oscuro semitransparente (usa el que ya tienes) */
.modal-backdrop {
    /* ... (Ya deberías tener esto de 'modalLogin.js') ... */
    /* background-color: rgba(0, 0, 0, 0.7); 
        display: flex;
        ... */
}

/* La caja blanca/oscura del contenido */
#new-topic-modal .modal-content {
    background-color: #2c3e50; /* Un azul oscuro, como tu tema */
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px; /* Ancho máximo del modal */
    border: 1px solid #4a6582; /* Un borde sutil */
    color: #ecf0f1; /* Texto claro */
}

#new-topic-modal h2 {
    text-align: center;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 700;
}

/* Grupos del formulario (label + input) */
#new-topic-modal .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

#new-topic-modal label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #bdc3c7; /* Un gris claro para las etiquetas */
}

/* Cajas de texto e email */
#new-topic-modal input[type="text"],
#new-topic-modal textarea {
    width: 100%;
    padding: 12px;
    background-color: #1a2531; /* Fondo de input más oscuro */
    border: 1px solid #4a6582;
    border-radius: 6px;
    color: #ecf0f1; /* Texto que escribes */
    font-size: 1rem;
    box-sizing: border-box; /* Importante para que el padding no rompa el ancho */
}

#new-topic-modal input[type="text"]:focus,
#new-topic-modal textarea:focus {
    border-color: #3498db; /* Resaltar en azul al hacer foco */
    outline: none;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

/* Contenedor de los botones */
#new-topic-modal .form-actions {
    display: flex;
    justify-content: flex-end; /* Alinea los botones a la derecha */
    gap: 15px; /* Espacio entre botones */
    margin-top: 25px;
}

/* Estilo de TODOS los botones del modal */
#new-topic-modal .form-actions button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

/* Botón Primario (Publicar) */
#new-topic-modal .button-primary {
    background-color: #3498db; /* Azul principal */
    color: white;
}

#new-topic-modal .button-primary:hover {
    background-color: #5dade2;
}

/* Botón Secundario (Cancelar) */
#new-topic-modal .button-secondary {
    background-color: #7f8c8d; /* Gris */
    color: white;
}

#new-topic-modal .button-secondary:hover {
    background-color: #95a5a6;
}

/* =================================================================
    ESTILOS PARA EL MODAL "LOGIN FORO" (EL "COJONUDO 2.0")
    ================================================================= */

/* La caja de contenido del modal de Login */
#login-modal-backdrop .modal-content {
    background-color: #2c3e50; /* Mismo azul oscuro */
    padding: 25px 30px;
    border-radius: 10px; /* ¡Borde redondeado! */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 450px; /* Un poco más estrecho, ideal para login */
    border: 2px solid #3498db; /* ¡¡¡TU BORDE AZUL CIELO!!! */
    color: #ecf0f1; 
}

/* Título (Iniciar Sesión) */
#login-modal-backdrop h2 {
    text-align: center;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 700;
}

/* Grupos del formulario (Label + Input) */
#login-modal-backdrop .form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

#login-modal-backdrop label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #bdc3c7; /* Gris claro */
}

/* Cajas de Email y Contraseña */
#login-modal-backdrop input[type="email"],
#login-modal-backdrop input[type="password"] {
    width: 100%;
    padding: 12px;
    background-color: #1a2531; /* Fondo de input más oscuro */
    border: 1px solid #4a6582;
    border-radius: 6px;
    color: #ecf0f1; /* Texto que escribes */
    font-size: 1rem;
    box-sizing: border-box; 
}

#login-modal-backdrop input[type="email"]:focus,
#login-modal-backdrop input[type="password"]:focus {
    border-color: #3498db; /* Resaltar en azul */
    outline: none;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

/* Contenedor del botón "Entrar" */
#login-modal-backdrop .form-actions {
    display: flex;
    justify-content: center; /* Centramos el botón */
    margin-top: 25px;
}

/* Botón "Entrar" */
#login-modal-backdrop .button-primary.login-button {
    width: 100%; /* Que ocupe todo el ancho */
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem; /* Un poco más grande */
    transition: all 0.2s ease;
    background-color: #3498db; /* Azul principal */
    color: white;
}

#login-modal-backdrop .button-primary.login-button:hover {
    background-color: #5dade2; /* Azul más claro al pasar el ratón */
}

/* Texto de "¿No tienes cuenta?" */
#login-modal-backdrop .modal-register-prompt {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
    color: #bdc3c7;
}

#login-modal-backdrop .modal-register-prompt a {
    color: #3498db; /* Azul */
    font-weight: bold;
    text-decoration: none;
}

#login-modal-backdrop .modal-register-prompt a:hover {
    text-decoration: underline;
}

/* Mensaje de Error (Email/Pass incorrecto) */
#login-modal-backdrop .error-message-login {
    color: #e74c3c; /* Rojo para errores */
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid #e74c3c;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9em;
    margin-top: 15px;
    /* Se muestra con JS (display: block) */
} /* <--- ¡¡¡LA LLAVE QUE FALTABA ESTÁ AQUÍ!!! */
    
/* --- ESTILOS FORO (FIX DEFINITIVO CON !IMPORTANT) --- */

/*
 * Forzamos el color de la descripción (el <p>) 
 * para que no herede el color fucsia del enlace.
 */
.category-card p {
    color: #bdc3c7 !important; /* ¡FORZAMOS EL GRIS! */
}

/*
 * Forzamos el color del "chivato" de última actividad
 * para que tampoco herede el color del enlace.
 */
.category-last-post {
    font-size: 0.9em;
    font-style: italic;
    color: rgba(255, 255, 255, 0.6) !important; /* ¡FORZAMOS EL BLANCO! */
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
}

/* =================================== */
/* --- Página de Comunidad y Stats --- */
/* =================================== */

/* La tarjeta superior para el conteo */
.community-stats-card {
    background-color: var(--color-fondo-secundario, #2c3e50);
    padding: 25px 30px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
    border-top: 4px solid #00a5a0; /* Color menta */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.community-stats-card p {
    font-size: 1.3em;
    color: var(--text-color-secundario, #bdc3c7);
    margin: 0;
    text-align: center; /* Aseguramos centrado */
}

.community-stats-card .count-number {
    font-size: 3.5em;
    font-weight: bold;
    color: #ffd700; /* Color dorado */
    display: block;
    margin: 10px 0;
}

/* El contenedor para la lista de usuarios (¡AHORA CON #!) */
#user-list-container {
    display: grid;
    /* Creamos 3 columnas de usuarios */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

/* Cada "tarjetita" de usuario */
.user-list-item {
    background-color: var(--color-fondo-terciario, #22303e);
    padding: 15px 20px;
    border-radius: 6px;
    border-left: 3px solid #00a5a0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.user-list-item .nickname {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--text-color, #ecf0f1);
    margin: 0;
    text-align: left; /* Alineamos a la izquierda */
}

.user-list-item .joined-date {
    font-size: 0.85em;
    color: var(--text-color-secundario, #95a5a6);
    margin: 5px 0 0 0;
    text-align: left; /* Alineamos a la izquierda */
}

/* Estilo para el enlace activo en la barra lateral */
.sidebar ul .active-link {
    background-color: #00a5a0;
    color: #ffffff !important;
    font-weight: bold;
    border-radius: 4px;
}

.sidebar ul .active-link a {
    color: #ffffff !important;
}

.sidebar ul .active-link:hover {
    background-color: #008f8a;
}

/* Ajuste para el subtítulo de la página de comunidad */
.main-content .community-subtitle {
    max-width: none; /* Anulamos el max-width de 800px */
    text-align: center; /* Lo centramos en lugar de justificarlo */
}


.snowflake {
    color: #fff; /* Color de la nieve */
    font-size: 1em; /* Tamaño del copo */
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px #000; /* Sombra ligera */
    position: fixed; /* Fija la posición en la pantalla */
    top: -10%; /* Empieza por encima de la pantalla */
    z-index: 9999; /* Asegura que está por encima de todo */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
    /* Define la animación de caída */
    -webkit-animation: snow-fall linear infinite;
    animation: snow-fall linear infinite;
}

/* Define la animación de caída (navegadores basados en Webkit) */
@-webkit-keyframes snow-fall {
    0% { top: -10%; }
    100% { top: 100%; }
}

/* Define la animación de caída (Estándar) */
@keyframes snow-fall {
    0% { top: -10%; }
    100% { top: 100%; }
}