@font-face {
    font-family: 'DS Digital';
    src: url('../fonts/ds_digital.TTF') format('truetype');
}

:root {
    --dark-blue: #15193A;
    --dark-blue-hover: #5b5e75;
    --blue: #009FE3;
    --red: #F71F20;
    --white: #FFFFFF;
    --light-gray: #CCCCCC;
    --dark: #2A2A2A;
}

body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main {
    flex: 1 0 auto;
}

#navbar, #main {
    margin-bottom: 1.5em;
}

#navbar .container {
    justify-content: center;
}

#navbar {
    background-color: var(--dark-blue);
}

#navbar .navbar {
    padding: 0 !important;
}

#navbar .navbar-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 1.5rem;
    align-items: center;
    color: var(--white);
    font-size: 1.25em;
}

#navbarNav {
    justify-content: end;
}

#navbar .navbar-brand {
    margin: 0;
}

#results_url {
    color: var(--white);
}

#results_url:hover {
    color: var(--light-gray);
}

#logo {
    width: 180px;
    margin-top: -5px;
}

#navbar i {
    font-size: 1.5em;
}

.school-logo-container {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
}

#school-logo {
    width: 100%;
}

#robot-name {
    font-size: 4.5em;
    text-align: center;    
}

#categories-title {
    font-size: 3em;
    text-align: center;
    color: var(--dark);
    margin-top: -.5em;
}

#robot-name:hover {
    cursor: pointer;
}

#controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#clock {
    font-family: 'DS Digital', sans-serif;
    color: var(--red);
    margin: -2em 0;
}

#clock #principal {
    font-size: 11.95em;
}

#clock #milliseconds {
    font-size: 4.45em;
}

.lap-data {
    margin-bottom: 0.78em;
}

.lap-data.titles {
    font-weight: bold;
}

.lap-data span {
    font-size: 1.25em;
    color: var(--dark);
}

#footer {
    color: var(--bs-secondary-color);
    flex-shrink: 0;
}

#author {
    font-weight: bold;
}

.hidden {
    display: none !important;
}

#config-buttons {
    position: absolute;
    font-size: 1.75em;
    color: var(--dark-blue);
    left: .8em;
    top: 4em;
}

#config-buttons span {
    font-size: .75em;
}

.btn-dark-blue {
    background-color: var(--dark-blue);
    color: var(--white);
}

.btn-dark-blue:hover,
.btn-dark-blue:disabled,
.btn-dark-blue:active,
#register-buttons #manual,
#register-buttons #control-chronometer {
    background-color: var(--dark-blue-hover) !important;
    color: var(--white) !important;
}

#register-buttons button {
    margin-top: 1.5em;
}

#register-manual .fields {
    margin-bottom: 1em;
}

#config-buttons i:hover {
    color: var(--dark-blue-hover);
}

.cards {
    justify-content: center;
}

.card.col-md-4 {
    width: 32%;
    margin: 0 .5em;
}

.card-image img {
    width: 14em;
    margin-top: 1em;
}

.card-title {
    font-size: 1.75em;
    font-weight: 600;
}

.card-footer {
    background: none;
    border: none;
}

#sumo-chronometer #main {
    margin-bottom: 1em;
}

#sumo-chronometer #robot-name,
#speedster-results #robot-name,
#candidates #robot-name,
#maze-results #robot-name,
#sumo-results #robot-name {
    font-size: 3em;
}

#sumo-chronometer #clock {
    margin-top: -10px;
}

#sumo-chronometer #clock #principal {
    font-size: 6em;
}

#initial-position {
    width: 310px;
    max-width: 310px;
    height: 310px;
    max-height: 310px;
    border: 5px solid var(--dark-blue);
    border-radius: 100%;
}

#initial-position img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#initial-position i {
    font-size: 15em;
    color: var(--dark-blue);
}

.clickable:hover {
    cursor: pointer;
}

#speedster-results #robot-name,
#maze-results #robot-name {
    cursor: default;
}

#speedster-results table,
#maze-results table {
    margin-top: 1em;
}

#speedster-results table th,
#maze-results table th {
    background-color: var(--dark-blue);
    color: var(--white);
}

#speedster-results table th, 
#speedster-results table td,
#maze-results table th,
#maze-results table td {
    text-align: center;
}

#rounds {
    display: flex;
    gap: 40px;
    justify-content: space-between;
    align-items: center;
}

.round, .brackets {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex: 1;
}

.round:nth-child(1),
.round:nth-child(1) .brackets,
.round:nth-child(7),
.round:nth-child(7) .brackets {
    gap: 40px;
}
        
.round:nth-child(2),
.round:nth-child(2) .brackets,
.round:nth-child(6),
.round:nth-child(6) .brackets {
    gap: 180px;
}

.fight {
    width: 150px;
    position: relative;
}

.robot {
    padding: 8px 12px;
    margin: 5px 0;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
}

.robot.winner {
    background-color: var(--blue);
    font-weight: bold;
    color: var(--white);
    border-radius: 10px;
}

.round:nth-child(1) .fight::after,
.round:nth-child(2) .fight::after,
.round:nth-child(3) .fight::after {
    content: "";
    position: absolute;
    right: -20px;
    top: 50%;
    width: 15px;
    height: 2px;
    background-color: var(--light-gray);
}

.round:nth-child(5) .fight::after,
.round:nth-child(6) .fight::after,
.round:nth-child(7) .fight::after {
    content: "";
    position: absolute;
    left: -20px;
    top: 50%;
    width: 15px;
    height: 2px;
    background-color: var(--light-gray);
}

.round:nth-child(1) .fight:nth-child(2n+1)::before {
    content: "";
    position: absolute;
    right: -20px;
    top: 50%;
    width: 20px;
    height: 8.75em;
    border-right: 2px solid var(--light-gray);
}

.round:nth-child(2) .fight:nth-child(1)::before {
    content: "";
    position: absolute;
    right: -20px;
    top: 50%;
    width: 20px;
    height: 17.5em;
    border-right: 2px solid var(--light-gray);
}

.round:nth-child(7) .fight:nth-child(2n+1)::before {
    content: "";
    position: absolute;
    left: -40px;
    top: 50%;
    width: 20px;
    height: 8.75em;
    border-right: 2px solid var(--light-gray);
}

.round:nth-child(6) .fight:nth-child(1)::before {
    content: "";
    position: absolute;
    left: -40px;
    top: 50%;
    width: 20px;
    height: 17.5em;
    border-right: 2px solid var(--light-gray);
}

.finals {
    margin-top: 9em;
    text-align: center;
    gap: 10px;
}

.finals .title {
    font-size: 1.5em; 
    font-weight: bold;
}

.finals .final {
    margin-bottom: 2em;
}


@media (min-width: 1600px) {
    #navbar, #main {
        margin-bottom: 2.5em;
    }

    #logo {
        width: 200px;
        margin-top: -5px;
    }

    #clock {
        margin: 0;
    }

    #clock #principal{
        font-size: 15.5em;
    }

    #clock #milliseconds {
        font-size: 8em;
    }

    .school-logo-container {
        width: 86px;
        height: 86px;
        display: flex;
        align-items: center;
    }

    #config-buttons {
        left: .8em;
        top: 4em;
    }
}