/* Variables */
:root {
    --primary: #003d6d;
    --secondary: #818992;
    --accent: #ffffff;
    --text: #003d6d;
    --light: #f4faff;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Formula1', Arial, sans-serif;
}

@font-face {
    font-family: 'Formula1';
    src: local('Arial Black'), local('Arial Bold'), local('Impact');
    font-weight: bold;
}

body {
    background-color: var(--light);
    color: var(--text);
}

header {
    background: var(--text) /*linear-gradient(180deg, var(--secondary) 0%, var(--primary) 100%)*/;
    color: var(--accent);
    padding: 1rem 0;
    position: relative;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: relative;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;                   /* Altura fija */
    width: auto;                    /* Ancho automático (mantiene proporción) */
    max-width: 100%;                /* Nunca superará el ancho del contenedor */
    margin-right: 1rem;
    background: transparent;
    border-radius: 6px;
    padding: 4px;
    object-fit: contain;            /* Mantiene relación de aspecto */
}

.logo-text h1 {
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
}

.logo-text span {
    font-size: 1rem;
    display: block;
    margin-top: -5px;
}

.countdown {
    background-color: rgba(0,0,0,0.5);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 1.2rem;
    z-index: 1;
}

nav {
    background-color: var(--secondary);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav li {
    margin: 0 1.5rem;
    position: relative;
}

nav a {
    color: var(--accent);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary);
}

.hero {
    background-image: url('/arena/Logos/banner.jpg');
    background-size: cover;
    background-position: center;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.hero-content {
    z-index: 1;
    text-align: center;
    color: var(--accent);
    padding: 2rem;
    max-width: 800px;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--primary);
    color: var(--accent);
    padding: 0.8rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--secondary);
}

.categories {
    padding: 4rem 2rem;
    background-color: var(--accent);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    background-color: var(--light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-img {
    height: 200px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f8f9fa;
}

.category-content {
    padding: 1.5rem;
}

.category-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.category-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}


.category-content p {
    margin-bottom: 1.5rem;
    color: var(--text);
}

.regulation-details {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.regulation-details h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.regulation-details ul {
    margin-bottom: 1.5rem;
    padding-left: 1.2rem;
}

.regulation-details li {
    margin-bottom: 0.5rem;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.news {
    padding: 4rem 2rem;
    background-color: var(--light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background-color: var(--accent);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.news-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.news-content p {
    margin-bottom: 1rem;
}

.results {
    padding: 4rem 2rem;
    background-color: var(--accent);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.results-table th, .results-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.results-table th {
    background-color: var(--primary);
    color: var(--accent);
    text-transform: uppercase;
}

.results-table tr:nth-child(even) {
    background-color: var(--light);
}

.results-table tr:hover {
    background-color: #f1f1f1;
}

footer {
    background-color: var(--primary);
    color: var(--accent);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: var(--accent);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

#judge-login-btn {
    background-color: var(--secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Estilos para el modal de jueces */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.auth-content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.auth-content h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
}

.auth-content button[type="submit"] {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-content button[type="submit"]:hover {
    background-color: var(--secondary);
}

.error-message {
    color: red;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}



@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        text-align: center;
    }
   
    .logo {
        margin-bottom: 1rem;
        justify-content: center;
    }
   
    nav ul {
        flex-direction: column;
        align-items: center;
    }
   
    nav li {
        margin: 0.5rem 0;
    }
   
    .hero-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 900px) {
    .header-top {
        flex-direction: column;
        gap: 1rem;
    }
    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    #judge-login-btn {
        margin-left: 0;
        margin-top: 1rem;
    }
}

.admin-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0; /* Cambiado de right: 0 a left: 0 */
    width: 400px;
    height: 100vh;
    background-color: white;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1); /* Cambiado el shadow para que coincida con la izquierda */
    z-index: 1001;
    overflow-y: auto;
    padding: 1rem;
}

.admin-content {
    padding: 1rem;
}

.admin-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.admin-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.teams-list {
    list-style: none;
}

.teams-list li {
    background-color: var(--light);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
}

textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
}

select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

/* Añadir al final del archivo */
.matches-list li {
    background-color: var(--light);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.score-input {
    margin: 0.8rem 0;
    display: flex;
    align-items: center;
}

.score-input label {
    min-width: 150px;
    font-weight: bold;
}

.score-input input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.submit-scores {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-scores:hover {
    background-color: var(--secondary);
}

.close-panel {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

.close-panel:hover {
    color: var(--secondary);
}

/* Brackets visualización */
.bracket-container {
    margin: 2rem 0;
    padding: 1rem;
    background-color: var(--light);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.bracket-round {
    margin-bottom: 1.5rem;
}

.bracket-round h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.bracket-match {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background-color: white;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bracket-team {
    flex: 1;
    padding: 0.3rem;
}

.bracket-team.winner {
    font-weight: bold;
    color: var(--primary);
}

.bracket-vs {
    margin: 0 1rem;
    color: #666;
    font-weight: bold;
}

.match-status {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    margin-left: 1rem;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-in-progress {
    background-color: #cce5ff;
    color: #004085;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.btn-register {
    background-color: var(--primary);
    margin-top: 0.8rem;
}

.btn-register:hover {
    background-color: var(--secondary);
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

@media (min-width: 768px) {
    .download-links {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .download-links .btn {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .admin-panel {
        width: 100%;
    }
}