/* CSS reset */
body,
header,
nav,
main,
footer,
h1,
div,
img,
ul {
    margin: 0;
    padding: 0;
    border: 0;
}

body {
    background-color: black;
    background-image: url("/pictures/milky_way.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    color: antiquewhite;
    font-family: swiss721;
    transition: 0.2s;
}

header {
    background-color: rgba(38, 0, 99, 0.5);
    padding: 0.5em;
    box-shadow: 0 0 5em 0 rgb(38, 0, 99);
}

header img {
    width: 100%;
}

header a {
    font-size: 32px;
    text-decoration: none;
    display: block;
    text-align: center;
}

header a:link,
header a:visited,
header a:active {
    color: antiquewhite;
}

nav {
    width: 100%;
    padding: 0.5em;
}

nav a {
    width: auto;
    margin: 1.2em auto 0.2em;
    color: antiquewhite;
    background-color: rgb(100, 0, 66);
    border: 3px solid rgb(10, 0, 33);
    padding: 0.2em 0.5em;
    font-size: 1em;
    text-decoration: none;
}

nav a:hover {
    color: white;
    background-color: rgb(155, 0, 103);
    border: 3px solid rgb(5, 0, 14);
    cursor: pointer;
}

form {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 1em;
    margin: 0;
}

label {
    font-size: 1.6em;
    padding: 0.2em;
}

input {
    font-size: 1.3em;
}

input[type=text],
input[type=password] {
    margin: 0 auto 0.3em;
    width: auto;
    padding: 0.4em;
    background-color: rgb(20, 0, 40);
    border: 2px solid rgb(10, 0, 33);
    color: antiquewhite;
}

input[type=checkbox] {
    margin-bottom: 1em;
}

input[type=date] {
    width: auto;
    margin: 0 auto 0.3em;
    min-width: 100px;
    background-color: rgb(20, 0, 40);
    border: 2px solid rgb(10, 0, 33);
    color: antiquewhite;
}

input[type=submit] {
    width: auto;
    margin: 1.2em auto 0.2em;
    color: antiquewhite;
    background-color: rgb(100, 0, 66);
    border: 4px solid rgb(10, 0, 33);
    padding: 0.3em 1em;
    font-size: 2em;
    font-weight: bold;
}

input[type=submit]:hover {
    color: white;
    background-color: rgb(155, 0, 103);
    border: 4px solid rgb(5, 0, 14);
    cursor: pointer;
}

gmp-map {
    height: 100%;
}

.map {
    height: 75vh;
    width: 100%;
    margin: 3em auto;
    border-top: solid black 3px;
    border-bottom: solid black 3px;
}

.navopenbtn {
    color: antiquewhite;
    font-size: 2em;
    cursor: pointer;
    background-color: rgb(100, 0, 66);
    border: 4px solid rgb(10, 0, 33);
    margin: auto 0;
}

.navopenbtn:hover {
    color: white;
    background-color: rgb(155, 0, 103);
    border: 4px solid rgb(5, 0, 14);
    cursor: pointer;
}

.error-message {
    color: #f00;
    font-size: 1.5em;
}

.success-message {
    color: #090;
    text-align: center;
    font-weight: bold;
    font-size: 2em;
    padding: 0.5em 1em;
}

.user-information table {
    width: 100%;
    margin-top: 1em;
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 1em 1em rgba(0, 0, 0, 0.5);
    padding: 1em;
    border-radius: 4px;
}

.user-information caption {
    font-size: 2.2em;
    margin: 1.1em 0;
}

.user-information th {
    text-align: right;
    padding: 0.3em;
}

.user-information td {
    text-align: left;
    padding: 0.3em;
}

.circle-container {
    position: relative;
    width: 100%;
    margin-top: 220px;
    text-align: center;
}

.timmy-box {
    position: relative;
    width: 5em;
    height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    background-color: rgba(5, 5, 5, 0.5);
    border-radius: 1em;
    box-shadow: 0 0 1em 1em rgba(5, 5, 5, 0.5);

    /* Center each box then reposition */
    left: 50%;
    margin-left: -2.5em;
    margin-top: -32px;
}

.timmy-box:nth-child(1) {
    transform: translateY(-130px);
}

.timmy-box:nth-child(2) {
    transform: rotate(51.4deg) translateY(-130px);
}

.timmy-box:nth-child(3) {
    transform: rotate(102.8deg) translateY(-130px);
}

.timmy-box:nth-child(4) {
    transform: rotate(154.2deg) translateY(-130px);
}

.timmy-box:nth-child(5) {
    transform: rotate(205.6deg) translateY(-130px);
}

.timmy-box:nth-child(6) {
    transform: rotate(257deg) translateY(-130px);
}

.timmy-box:nth-child(7) {
    transform: rotate(308.4deg) translateY(-130px);
}

.desktop-nav {
    display: none;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: 0.5s;
    width: 100%;
}

.icon {
    display: inline-block;
    cursor: pointer;
    margin: auto;
}

.bar1,
.bar2,
.bar3 {
    width: 35px;
    height: 5px;
    background-color: antiquewhite;
    margin: 6px 0;
    transition: 0.4s;
}

.change .bar1 {
    transform: translate(0, 11px) rotate(-45deg);
}

.change .bar2 {
    opacity: 0;
}

.change .bar3 {
    transform: translate(0, -11px) rotate(45deg);
}

.graph-container {
    max-width: 100%;
    margin: auto;
}

.graph {
    margin: 2em auto;
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 1em 1em rgba(5, 5, 5, 0.5);
    width: 100%;
    height: 400px;
    display: none;
}

.graph.visible,
.graph-title.visible {
    display: block;
}

.graph-title {
    margin: 1em 0;
    display: none;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 1em 1em rgba(5, 5, 5, 0.5);
}

.current-readings {
    display: none;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1rem;
    color: antiquewhite;
    font-size: 1.2rem;
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 1em 1em rgba(5, 5, 5, 0.5);
    text-align: center;
}

.current-readings.visible {
    display: flex;
    flex-direction: column;
}

.current-readings span {
    padding: 0.3rem 1rem;
}

#login_signup a.active {
    background-color: rgb(130, 0, 98);
    border: 4px solid rgb(5, 0, 14);
}

#nav_links {
    display: none;
}

#login_signup a.icon {
    background-color: transparent;
    border: none;
}

#login_signup a.icon:hover {
    background-color: transparent;
    border: none;
}

#login_signup a {
    margin: 0.4em auto;
    padding: 0.1em 0.3em;
    background-color: rgb(100, 0, 66);
    border: 4px solid rgb(10, 0, 33);
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* mouse over link */
#login_signup a:hover {
    color: white;
    background-color: rgb(155, 0, 103);
    border: 4px solid rgb(5, 0, 14);
    cursor: pointer;
}


/* Admin Console */
.admin-console {
    max-width: 1200px;
    margin: 3em auto;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1.5em;
    border-radius: 4px;
    box-shadow: 0 0 1em 1em rgba(0, 0, 0, 0.5);
}

.admin-console h2 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 1em;
    color: antiquewhite;
}

.search-bar {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1.5em;
    justify-content: center;
    align-items: center;
}

.search-bar input[type="text"] {
    flex: 1;
    padding: 0.6em;
    font-size: 1.1em;
    background-color: rgb(20, 0, 40);
    border: 2px solid rgb(10, 0, 33);
    color: antiquewhite;
    border-radius: 4px;
}

.search-bar button {
    background-color: rgb(100, 0, 66);
    color: antiquewhite;
    border: 4px solid rgb(10, 0, 33);
    padding: 0.3em 1.5em;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    width: 7em;
}

.search-bar button:hover {
    background-color: rgb(155, 0, 103);
    border-color: rgb(5, 0, 14);
    color: white;
}

#users-table-wrapper {
    overflow-x: auto;
}

#users-table {
    width: 100%;
    border-collapse: collapse;
    color: antiquewhite;
    background-color: rgba(0, 0, 0, 0.3);
}

#users-table th,
#users-table td {
    padding: 0.8em;
    text-align: left;
    border-bottom: 1px solid rgba(255, 235, 205, 0.2);
}

#users-table th {
    background-color: rgba(100, 0, 66, 0.5);
    font-size: 1.1em;
    font-weight: bold;
}

#users-table tbody tr:hover {
    background-color: rgba(100, 0, 66, 0.3);
}

.actions {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.3em 0.8em;
    font-size: 0.9em;
    font-weight: bold;
    border: 2px solid rgb(10, 0, 33);
    border-radius: 4px;
    cursor: pointer;
    color: antiquewhite;
    transition: all 0.2s;
}

.action-btn.delete {
    background-color: #8b0000;
}

.action-btn.delete:hover {
    background-color: #a50000;
    border-color: rgb(5, 0, 14);
}

.action-btn.promote {
    background-color: #006400;
}

.action-btn.promote:hover {
    background-color: #008000;
    border-color: rgb(5, 0, 14);
}

.action-btn.demote {
    background-color: #b8860b;
}

.action-btn.demote:hover {
    background-color: #cd950c;
    border-color: rgb(5, 0, 14);
}


@media screen and (min-width: 630px) {

    header {
        display: flex;
    }

    header img {
        width: 6.3em;
    }

    form {
        max-width: 630px;
        margin: 5em auto;
        box-shadow: 0 0 1em 1em rgba(0, 0, 0, 0.5);
    }

    .user-information table {
        width: auto;
        margin: auto;
        font-size: 1.2em;
    }

    .user-information caption {
        font-size: 2.5em;
        margin: 1.3em 0;
    }

    .user-information th {
        padding: 0.4em;
    }

    .user-information td {
        padding: 0.4em;
    }

    .circle-container {
        position: relative;
        width: 100%;
        margin-top: 220px;
        text-align: center;
    }

    .timmy-box {
        position: relative;
        width: 5em;
        height: 2em;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1em;
        background-color: rgba(5, 5, 5, 0.5);
        border-radius: 1em;
        box-shadow: 0 0 1em 1em rgba(5, 5, 5, 0.5);

        /* Center each box then reposition */
        left: 50%;
        margin-left: -2.5em;
        margin-top: -32px;
    }

    .circle-container {
        margin-top: 450px;
    }

    .timmy-box {
        font-size: 2em;
        margin-top: -2em;
    }

    .timmy-box:nth-child(1) {
        transform: translateY(-250px);
    }

    .timmy-box:nth-child(2) {
        transform: rotate(51.4deg) translateY(-250px);
    }

    .timmy-box:nth-child(3) {
        transform: rotate(102.8deg) translateY(-250px);
    }

    .timmy-box:nth-child(4) {
        transform: rotate(154.2deg) translateY(-250px);
    }

    .timmy-box:nth-child(5) {
        transform: rotate(205.6deg) translateY(-250px);
    }

    .timmy-box:nth-child(6) {
        transform: rotate(257deg) translateY(-250px);
    }

    .timmy-box:nth-child(7) {
        transform: rotate(308.4deg) translateY(-250px);
    }

    .success-message {
        margin-top: 2em;
    }

    .desktop-nav {
        display: flex;
        flex-direction: row;
    }

    .mobile-nav {
        display: none;
    }

    .map {
        border: solid black 3px;
        max-width: 80vw;
    }

    .current-readings.visible {
        display: flex;
        flex-direction: row;
    }

    .admin-console {
        margin: 3em auto;
        padding: 1em;
    }

    .actions {
        flex-direction: column;
    }

    .graph-container {
        max-width: 90vw;
    }

    #login_signup {
        display: flex;
        margin-left: auto;
    }

    #login_signup a {
        margin: 0 0.2em;
    }

    #users-table th,
    #users-table td {
        padding: 0.5em;
        font-size: 0.9em;
    }

}

@font-face {
    font-family: swiss721;
    src: url(/fonts/swiss721.otf);
}