body {
    background-color: #0f0f0f; /* Un poco más oscuro */
    color: #d1d1d1;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    color: #e64a19;
    font-size: 2.5em;
    text-shadow: 2px 2px #000;
    margin-bottom: 5px;
}

.breadcrumb {
    background: #1a1a1a;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 0.9em;
    border: 1px solid #333;
}

.breadcrumb a {
    color: #ff9800;
    text-decoration: none;
}

.forum-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1a1a1a;
    border: 1px solid #333;
}

.th-main { text-align: left; padding: 12px; background: #222; color: #ff9800; border-bottom: 2px solid #ff9800; }
.th-stats { width: 80px; background: #1a1a1a; padding: 12px; font-size: 0.85em; text-align: center; }
.th-last { width: 200px; background: #1a1a1a; padding: 12px; font-size: 0.85em; text-align: left; }

.td-info {
    padding: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.cat-title {
    color: #4da6ff;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.2em;
}

.cat-title:hover { color: #ff9800; }

.cat-desc {
    margin: 5px 0 0;
    font-size: 0.85em;
    color: #888;
}

.td-stats {
    text-align: center;
    border-bottom: 1px solid #2a2a2a;
    border-left: 1px solid #2a2a2a;
    font-weight: bold;
}

.td-last {
    padding: 10px;
    border-bottom: 1px solid #2a2a2a;
    border-left: 1px solid #2a2a2a;
}

.user-admin { color: #f44336; font-weight: bold; }

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    border-top: 1px solid #333;
    font-size: 0.8em;
    color: #555;
}

.action-bar {
    margin-bottom: 15px;
    text-align: right;
}

.btn-new-topic {
    background-color: #ff4500;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8em;
    border-radius: 3px;
    border: 1px solid #ff6a33;
}

.btn-new-topic:hover {
    background-color: #e63e00;
}


/* Form Styles */
.form-container {
    background: #1a1a1a;
    padding: 20px;
    border: 1px solid #333;
}

.forum-form .form-group {
    margin-bottom: 20px;
}

.forum-form label {
    display: block;
    margin-bottom: 8px;
    color: #ff9800;
    font-weight: bold;
}

.forum-form input[type="text"], 
.forum-form textarea {
    width: 100%;
    padding: 12px;
    background: #262626;
    border: 1px solid #444;
    color: #fff;
    box-sizing: border-box; /* Para que el padding no ensanche el input */
}

.forum-form textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-submit {
    background: #4caf50; /* Verde para publicar */
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
}

.btn-submit:hover { background: #45a049; }

.btn-cancel {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9em;
}

.btn-cancel:hover { color: #fff; }






/* Topic & Posts Display */
.topic-header {
    background: #222;
    padding: 15px;
    border: 1px solid #333;
    border-bottom: 2px solid #ff4500;
    margin-bottom: 10px;
}

.topic-header h2 {
    margin: 0;
    font-size: 1.4em;
    color: #fff;
}

.post-container {
    display: flex;
    background: #1a1a1a;
    border: 1px solid #333;
    margin-bottom: 15px;
    min-height: 200px;
}

.post-sidebar {
    width: 180px;
    padding: 15px;
    background: #222;
    text-align: center;
    border-right: 1px solid #333;
}

.user-name {
    font-weight: bold;
    color: #ff9800;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.user-rank {
    font-size: 0.8em;
    color: #f44336;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.user-avatar img {
    max-width: 100px;
    border: 2px solid #333;
    border-radius: 4px;
}

.post-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.post-date {
    font-size: 0.8em;
    color: #666;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.post-body {
    line-height: 1.6;
    color: #ddd;
    white-space: pre-wrap; /* Mantiene los saltos de línea */
}




.user-bar {
    background: #222;
    padding: 10px 15px;
    border: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    margin-bottom: 15px;
    border-radius: 4px;
}

.user-links a {
    color: #ff9800;
    text-decoration: none;
    margin: 0 5px;
}

.user-links a:hover {
    text-decoration: underline;
}




/* User Ranks Colors */
.rank-admin {
    color: #ff4500; /* Naranja rojizo para Admin */
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 69, 0, 0.3);
}

.rank-moderator {
    color: #4da6ff; /* Azul para Mods */
    font-weight: bold;
}

.rank-user {
    color: #999;
}

/* Ajuste para el avatar por si no hay imagen */
.user-avatar img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    background: #333;
}



/* Estilo para la barra de usuario logueado */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
}

.logged-username {
    color: #ff9800; /* Naranja PyroMu */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-role-tag {
    font-size: 0.75em;
    color: #888;
    margin-left: 5px;
}

/* El puntito de "Online" */
.status-dot {
    height: 8px;
    width: 8px;
    background-color: #4caf50; /* Verde online */
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 5px #4caf50;
}

.status-dot.offline {
    background-color: #bbb;
    box-shadow: none;
}

.logout-link {
    color: #f44336 !important; /* Rojo para el Logout */
    font-weight: bold;
}

.logout-link:hover {
    text-decoration: underline;
}



/* --- Estilos de Rangos y Efectos de Pulso --- */

/* Administrador (Rojo) */
.rank-administrator {
    color: #ff0000;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
    animation: pulse-red 2s infinite;
}

/* Moderador (Azul) */
.rank-moderator {
    color: #00aaff;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(0, 170, 255, 0.6);
    animation: pulse-blue 2s infinite;
}

/* Animación Pulso Rojo */
@keyframes pulse-red {
    0% { text-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
    50% { text-shadow: 0 0 20px rgba(255, 0, 0, 0.9), 0 0 30px rgba(255, 0, 0, 0.4); }
    100% { text-shadow: 0 0 5px rgba(255, 0, 0, 0.5); }
}

/* Animación Pulso Azul */
@keyframes pulse-blue {
    0% { text-shadow: 0 0 5px rgba(0, 170, 255, 0.5); }
    50% { text-shadow: 0 0 20px rgba(0, 170, 255, 0.9), 0 0 30px rgba(0, 170, 255, 0.4); }
    100% { text-shadow: 0 0 5px rgba(0, 170, 255, 0.5); }
}