:root {
    color-scheme: light !important;
    background-color: white !important;
    color: #003865 !important;
}

html,
body{
    background: #ffffff !important;
    color: #003865 !important;
}

.h1 {
    color: #003865 !important;
}

.filter-bar {
    margin-bottom: 1.5rem;
}

.filter-bar label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #334155;
}

.filter-bar select {
    max-width: 400px;
}

.results-table {
    width: auto !important;
    margin: 0 auto !important;
    table-layout: auto !important;
}

.team-cell {
    width: 35%;
    text-align: center;
    vertical-align: middle;
}

.team-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.team-block img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
}

.team-block span {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    line-height: 1.2;
}

.match-line td {
    vertical-align: middle;
    text-align: center;
    padding: 20px 10px;
}

.load-result {
    width: 70px;
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
}

.load-vs {
    width: 60px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #64748b;
}

/* =========================================
   RESET Y BASE
========================================= */

* {
    box-sizing: border-box;
}

html,
body {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    font-family: 'Inter', sans-serif;
    background: #ffffff !important;
    color: #003865;
}

/* =========================================
   LAYOUT GENERAL
========================================= */

.content {
    min-height: 600px;
    flex: 1 !important;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 20px;
    box-sizing: border-box;
}

main.container {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 2rem !important;
}

/* =========================================
   HEADER
========================================= */

.header,
.main-header {
    background: linear-gradient(90deg, #003865, #1e293b);
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    flex-wrap: wrap;
}

.main-header {
    padding: 15px;
}

.main-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    width: 60px;
    height: auto;
    display: block;
}

.main-logo {
    width: 200px !important;
    height: auto !important;
    display: block;
}

.mascota-logo {
    width: 75px !important;
    height: auto !important;
}

.mascota-logo2 {
    margin-top: 20px;
    margin-left: 20px;
    width: 85px !important;
    height: auto !important;
}

.mascota-rank {
    width: 55px !important;
    height: auto !important;

}

/* =========================================
   MENÚ
========================================= */

.main-nav {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 25px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: background 0.3s;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-info,
.full-name {
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

.full-name {
    float: right;
}

.user-info a,
.full-name a {
    color: #38bdf8;
    text-decoration: none;
}

/* =========================================
   FOOTER
========================================= */

.footer,
.site-footer {
    text-align: center;
    color: #64748b !important;
    font-size: 13px;
    border-top: 1px solid #e5e7eb !important;
}

.footer {
    margin-top: auto !important;
    padding: 1.5rem 0 !important;
}

.site-footer {
    margin-top: 50px;
    padding: 20px 0;
}

/* =========================================
   LOGIN
========================================= */

.login-card {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-image img {
    display: table-cell;
    vertical-align: middle;
    margin: auto;
}

.main-img img {
    width: 20%;
}

/* =========================================
   FORMULARIOS
========================================= */

input.result {
    color: gray;
    min-width: 70px;
    text-align: center;
}

.error {
    color: red;
}

.form-error {
    color: yellow;
    padding: 4px;
    margin: auto;
}

/* =========================================
   REGISTER
========================================= */

.register-container {
    min-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.register-card {
    width: 100%;
    max-width: 640px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.register-logo {
    display: block;
    width: 160px;
    height: auto;
    margin: 0 auto 20px auto;
}

.register-title {
    text-align: center;
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    color: #0f172a;
}

.register-subtitle {
    text-align: center;
    margin: 10px 0 30px 0;
    color: #64748b;
    font-size: 12px;
}

.register-card label {
    font-weight: 550;
    color: #334155;
    display: block;
}

.register-card input,
.register-card select {
    width: 90%;
    margin-bottom: 5px !important;
    border-radius: 14px;
    border: 1px solid #dbe2ea;
    font-size: 14px;
    box-sizing: border-box;
    transition: 0.3s;
    padding: 15px 14px !important;
    height: 50px !important;
}

.register-card input:focus,
.register-card select:focus {
    outline: none;
    border-color: #ffb81c;
    box-shadow: 0 0 0 4px rgba(239,68,68,0.15);
}

.register-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(90deg, #00c1d4, #6fc7cf);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: block;
    margin-top: 10px;
}

.register-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.2);
}

/* =========================================
   DASHBOARD
========================================= */

.dashboard {
    line-height: 38px;
}

.dashboard-card,
.rules-card,
.load-card,
.stat-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.dashboard-card {
    padding: 32px;
}

.rules-card {
    padding: 10px;
}

.load-card {
    padding: 50px;
}

.stat-card {
    padding: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card h3 {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 32px;
    font-weight: 800;
}

.rules-card li {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.load-card li {
    margin-left: 50px;
    margin-bottom: 0;    
    font-size: 20px;
}


.rules-card strong {
    display: block;
    margin-top: 10px;
    font-size: 30px;
    font-weight: 700;
}

.load-card strong {
    display: block;
    margin-top: 10px;
    font-size: 30px;
    font-weight: 700;
}

.admin-panel {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.admin-panel a {
    display: inline-block;
    margin-right: 12px;
    margin-top: 10px;
    padding: 10px 16px;
    background: #f1f5f9;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    color: #334155;
}

.admin-panel a:hover {
    background: #e2e8f0;
}

/* =========================================
   UTILIDADES
========================================= */

.featured {
    font-weight: bolder;
    font-size: 28px;
    margin-left: 4px;
    margin-right: 4px;
}

.user-selected {
    font-weight: bold;
    font-size: 19px;
}

.user-selected .full-name {
    color: aqua !important;
}

.full-name {
    display: block;
    text-transform: capitalize;
    overflow: auto;
}

.primary-button {
    display: inline-block;
    padding: 14px 24px;
    border-radius: 12px;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    color: white;
    text-decoration: none;
    font-weight: 700;
}

.show-msg {
    text-align: center;
    margin: auto;
}

/* =========================================
   TABLA QUINIELA
========================================= */
.table-responsive {
    text-align: center;
}
.quiniela-table {
    width: auto !important;
    margin: 0 auto
}

.results {
    font-size: 0.95rem;
    text-align: center;
    width: auto !important;
    margin: 0 auto !important;
}

.results td {
    border: 0;
    padding-bottom: 20px;
}

.results h3 {
    margin: 30px 0 20px 0;
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    text-align: left;
}

.results tbody {
    width: auto;
}

/* Hora partido */

.match-hour td {
    background: #eaf2ff;
    color: #0a3d62;
    font-weight: 700;
    text-align: center;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
}

/* Partido */

.match-line {
/*     width: 100%;*/
    text-align: center;
}
.match-line td {
    vertical-align: middle;
    text-align: center !important;
    padding: 18px 6px;
    border: none;
}



.match-line td:nth-child(1),
.match-line td:nth-child(5) {
    width: 20%;
}

.match-line td:nth-child(2),
.match-line td:nth-child(4) {
    width: 8%;
}

.match-line td:nth-child(3) {
    width: 8%;
}

/* Equipos */

.team-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.team-block img {
    width: 38px;
    height: auto;
    display: block;
}

.team-block span {
    font-size: 0.9rem;
    line-height: 1.1;
    font-weight: 700;
    text-align: center;
    color: #1e293b;
}

/* Resultados */

.load-result {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
}

.load-result input.result {
    width: 52px !important;
    min-width: 52px;
    height: 48px !important;
    padding: 0 !important;
    margin: 0 auto !important;

    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;

    border-radius: 10px;
    border: 1px solid #cbd5e1;

    background: #fff;
    color: #1e293b;
}

/* VS */

.load-vs {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

/* Botón */

#submit {
    margin-top: 1.5rem;
    width: 100%;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 768px) {

    .team-block img {
        width: 38px;
        height: 38px;
    }

    .team-block span {
        font-size: 0.78rem;
    }

    .load-result {
        font-size: 1.4rem;
        width: 45px;
    }

    .load-vs {
        font-size: 1rem;
        width: 40px;
    }

    .match-line td {
        padding: 12px 4px;
    }

        .ranking-card {
        padding: 1rem;
        border-radius: 18px;
    }

    .ranking-header h2 {
        font-size: 1.5rem;
    }

    .ranking-table thead th,
    .ranking-table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.82rem;        
    }

    .user-name {
        max-width: 140px;
        word-break: break-word;
    }

    .header {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }

    .main-nav {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .main-nav a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.85rem;
        background: rgba(255,255,255,0.08);
        border-radius: 10px;
    }

    .user-info {
        order: -1;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .logo img {
        width: 70px;
        margin: 0 !important;
    }

    .mascota-logo {
        width: 65px !important;
    }

    .register-card {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .register-title {
        font-size: 28px;
    }

    .register-logo {
        width: 130px;
    }

    /* Quiniela responsive */

    .results h3 {
        font-size: 1.5rem;
        margin: 20px 0 14px 0;
    }

    .match-hour td {
        font-size: 0.8rem;
        padding: 10px;
        border-radius: 10px;
    }

    .match-line td {
        padding: 12px 2px;
    }

    .match-line td:nth-child(1),
    .match-line td:nth-child(5) {
        width: 30%;
    }

    .match-line td:nth-child(2),
    .match-line td:nth-child(4) {
        width: 46px;
    }

    .match-line td:nth-child(3) {
        width: 40px;
    }

    .team-block {
        gap: 4px;
    }

    .team-block img {
        width: 28px;
    }

    .team-block span {
        font-size: 0.7rem;
        line-height: 1.1;
        max-width: 65px;
        word-break: break-word;
    }

    .load-result {
        font-size: 1.4rem;
    }

    .load-result input.result {
        width: 38px !important;
        min-width: 38px;
        height: 38px !important;
        font-size: 1rem;
    }

    .load-vs {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {

    .login-card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .login-logo {
        width: 120px;
    }

    .login-title {
        font-size: 26px;
    }

    .login-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }

    .register-link {
        font-size: 14px;
    }
}


/* =========================
   RANKING QUINIELA
========================= */

.ranking-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-top: 2rem;
}

.ranking-header {
    margin-bottom: 1.5rem;
}

.ranking-header h2 {
    margin: 0;
    font-size: 2rem;
    color: #0f172a;
}

.ranking-header p {
    margin-top: 0.4rem;
    color: #64748b;
}

.ranking-table-container {
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.ranking-table thead {
    background: linear-gradient(90deg, #003865, #1e3a5f);
}

.ranking-table thead th {
    color: #003865;
    padding: 1rem;
    font-size: 0.95rem;
    text-align: center;
    border: none;
}

.ranking-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: 0.2s ease;
    color: #0f172a;    
}

.ranking-table tbody tr:hover {
    background: #f8fafc;
}

.ranking-table tbody td {
    padding: 1rem;
    text-align: center;
    font-size: 0.95rem;
}

/* Usuario */
.user-name {
    text-align: left !important;
    font-weight: 600;
    color: #003865;
}

/* Punteo */
.score {
    font-weight: 700;
    color: #2563eb;
    font-size: 1rem;
}

/* Top 3 */
.ranking-table tbody tr:nth-child(1) .score {
    color: #eab308;
}

.ranking-table tbody tr:nth-child(2) .score {
    color: #94a3b8;
}

.ranking-table tbody tr:nth-child(3) .score {
    color: #b45309;
}





/*__________________________________*/
/*FORZAR MODO CLARO*/
/*__________________________________*/

:root:not([data-theme]){
    --pico-background-color: white !important;
    --pico-color: #003865 !important;        
    --pico-h1-color: #000;
    --pico-h2-color: #000;
    --pico-h3-color: #000;
    --pico-h4-color: #000;
    --pico-h5-color: #000;
    --pico-h6-color: #000;
    --pico-card-background-color: white !important;
    --pico-form-element-background-color: white !important;
    --pico-form-element-active-background-color: white !important;
    --pico-form-element-color: #000 !important;
}
