/* =========================
   VARIABLES DE TEMA
========================= */
:root {
    --bg-overlay: rgba(255, 255, 255, 0.228);
    --bg: #f8f9fa54;
    --text: #141719;

    --card-bg: rgba(255, 255, 255, 0.155);
    --border: #dee2e6;

    --primary: #f1e8e80c;
    --primary-hover: #ece8e8ab;
    


/* DARK MODE */
body.dark-mode {
    --bg-overlay: rgba(0,0,0,0.65);
    --bg: #121212;
    --text: #e6e6e6;

    --card-bg: rgba(0,0,0,0.65);
    --border: #333;
}
/* AVATAR NAVBAR */
.nav-user img.avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;

    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

/* =========================
   FONDO PRINCIPAL
========================= */
body {
    background:
        linear-gradient(var(--bg-overlay), var(--bg-overlay)),
        url("img/bg-circuito.jpg") center / cover no-repeat fixed;
    color: var(--text);
}

/* =========================
   BASE
========================= */
html, body {
    color: var(--text) !important;
}

/* =========================
   CARDS
========================= */
.card,
.auth-card,
.carrera-card,
.ranking-card {
    background: var(--card-bg) !important;
    color: var(--text) !important;
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* =========================
   TABLAS (GLASS)
========================= */
.table {
    background: var(--card-bg) !important;
    color: var(--text) !important;
    backdrop-filter: blur(6px);
}

.table th,
.table td {
    background: transparent !important;
    color: var(--text) !important;
    border-color: var(--border);
}

/* =========================
   NAVBAR
========================= */
.navbar {
    height: 60px;
    min-height: 60px;

    display: flex;
    align-items: center;

    padding: 0 18px;

    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(10px);

    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
    z-index: 1050;
}
.dropdown-menu {
    z-index: 2000;
}
.nav-links a,
.nav-user span {
    color: var(--text);
}

.nav-left .logo {
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
}

/* =========================
   BOTONES
========================= */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* =========================
   LINKS
========================= */
a {
    text-decoration: none;
}

body.dark-mode a {
    color: #66b2ff;
}

/* =========================
   AVATARES
========================= */
.avatar-select {
    border: 2px solid transparent;
    transition: transform 0.2s, border 0.2s;
}

input[type="radio"]:checked + .avatar-select {
    border: 3px solid var(--primary);
    transform: scale(1.1);
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {

    h1, h2, h3 {
        text-align: center;
    }

    table thead {
        display: none;
    }

    table tr {
        display: block;
        margin-bottom: 10px;
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 10px;
    }

    table td {
        display: flex;
        justify-content: space-between;
    }

    table td::before {
        content: attr(data-label);
        font-weight: bold;
    }

    body {
        background-attachment: scroll;
    }
}
@media (max-width: 768px) {

    .navbar {
        height: auto;
        flex-wrap: wrap;
        padding: 10px 14px;
    }

    .nav-left {
        flex: 1;
    }

    .nav-toggle {
        display: block;
        color: var(--text);
        font-size: 1.5rem;
    }

    .nav-user {
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
        gap: 8px;
    }

    .nav-user .username {
        display: none;
    }

    .nav-links {
        width: 100%;
        margin-top: 10px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links a {
        padding: 10px 0;
    }
}
<style>
.bg-exacto {
    background-color: #c8f7c5 !important; /* verde */
    font-weight: bold;
}

.bg-parcial {
    background-color: #d6e9ff !important; /* celeste */
}
</style>
td.bg-exacto {
    background-color: #c8f7c5 !important;
    font-weight: bold;
}

td.bg-parcial {
    background-color: #d6e9ff !important;
}
@media (max-width: 768px) {
    .carreras-lista {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .carrera-card {
        width: 100%;
    }
}
