/* 1. Estilos generales y colores base tipo BoxRec */
body {
    font-family: Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
}

/* 2. Diseño del Encabezado */
header {
    background-color: #1f1f1f;
    text-align: center;
    padding: 20px;
    border-bottom: 3px solid #ff4444;
}

header h1 {
    margin: 0;
    color: #ffffff;
    font-size: 2rem;
}

header p {
    color: #a0a0a0;
    margin-top: 5px;
}

/* 3. Sección de búsqueda */
.search-section {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.search-section input {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    font-size: 1rem;
    background-color: #2b2b2b;
    border: 1px solid #444;
    color: #fff;
    border-radius: 5px;
}

.search-section input:focus {
    outline: none;
    border-color: #ff4444;
}

/* 4. Contenedor Principal y Títulos */
main {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
}

main h2 {
    color: #ffffff;
    border-bottom: 2px solid #333;
    padding-bottom: 8px;
}

/* 5. Estilos del Formulario */
.form-section {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    border: 1px solid #2c2c2c;
}

.form-section h2 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #ff4444;
}

#fighterForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#fighterForm input {
    padding: 10px 15px;
    font-size: 0.95rem;
    background-color: #2b2b2b;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
}

#fighterForm input:focus {
    outline: none;
    border-color: #ff4444;
}

.btn-submit {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-submit:hover {
    background-color: #218838;
}

/* 6. Estilo de las Tablas */
.fighters-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: #1a1a1a;
    border-radius: 5px;
    overflow: hidden;
}

.fighters-table th, 
.fighters-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #2c2c2c;
}

.fighters-table th {
    background-color: #252525;
    color: #ff4444;
    font-weight: bold;
}

.fighters-table tr:hover {
    background-color: #222;
}

/* 7. Estilo de Botones Generales */
.fighters-table button {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.fighters-table button:hover {
    background-color: #cc0000;
}

/* 8. Estilos para la Vista de Perfil y Foto */
.btn-back {
    background-color: #444;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.btn-back:hover {
    background-color: #666;
}

.profile-card {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #2c2c2c;
}

.profile-header-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.fighter-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff4444;
    background-color: #2b2b2b;
}

.profile-card h2 {
    color: #ff4444;
    margin-bottom: 5px;
}

.profile-subtitle {
    color: #a0a0a0;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.social-links-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.social-link {
    background-color: #2b2b2b;
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid #444;
    transition: background 0.2s;
}

.social-link:hover {
    background-color: #ff4444;
    border-color: #ff4444;
}

.btn-video {
    background-color: #1a73e8;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-block;
    transition: background 0.2s;
}

.btn-video:hover {
    background-color: #1557b0;
}

/* 9. Pie de página */
footer {
    text-align: center;
    padding: 20px;
    background-color: #1f1f1f;
    color: #777;
    font-size: 0.9rem;
    margin-top: 40px;
}

/* Estilo para el botón de eliminar en la tabla */
.fighters-table .btn-delete {
    background-color: #d9534f; /* Rojo alerta */
    margin-left: 5px;
    transition: background 0.2s;
}

.fighters-table .btn-delete:hover {
    background-color: #c9302c; /* Se oscurece al pasar el cursor */
}

/* Estilos para el formulario de agregar peleas en el perfil */
.add-fight-box {
    background-color: #212121;
    border: 1px solid #333;
    padding: 20px;
    border-radius: 5px;
    margin-top: 25px;
}

.add-fight-box h4 {
    color: #ff4444;
    margin-top: 0;
    margin-bottom: 15px;
}

#fightForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#fightForm input {
    padding: 8px 12px;
    font-size: 0.9rem;
    background-color: #2b2b2b;
    border: 1px solid #444;
    color: #fff;
    border-radius: 4px;
}

#fightForm input:focus {
    outline: none;
    border-color: #ff4444;
}

/* Estilos para la cuenta regresiva */
.countdown-container {
    margin-top: 15px;
    background-color: #161616;
    padding: 12px 20px;
    border-radius: 6px;
    border: 1px solid #2a2a2a;
    display: inline-block;
    max-width: 400px;
}

.countdown-container h3 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: #ff4444;
}

.countdown-timer {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.countdown-timer div {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #222;
    padding: 6px 10px;
    border-radius: 4px;
    min-width: 45px;
    border: 1px solid #333;
}

.countdown-timer span {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
}

.countdown-timer small {
    font-size: 0.7rem;
    color: #a0a0a0;
    text-transform: uppercase;
}

.profile-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ff4444;
}

/* Estilos para la sección de Eventos */
.events-section {
    margin: 30px 0;
}

.events-section h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #fff;
    border-left: 4px solid #ff4444;
    padding-left: 10px;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.event-card {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    padding: 15px;
    border-radius: 6px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.event-card:hover {
    transform: translateY(-3px);
    border-color: #ff4444;
}

.event-card h3 {
    margin: 0 0 8px 0;
    color: #ff4444;
    font-size: 1.1rem;
}

.event-card p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: #ccc;
}
/* --- Mejoras finales: accesibilidad, tablas móviles y atributos hidden. --- */
[hidden] { display: none !important; }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .fighters-table { min-width: 640px; }
.profile-header { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.social-container { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.empty-state { text-align: center; color: #aaa; padding: 22px; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #ff8888; outline-offset: 3px; }
@media (max-width: 640px) {
  main { padding: 0 12px; }
  .profile-img { width: 95px; height: 95px; }
  .events-grid { grid-template-columns: 1fr; }
}
