:root {
    /*    https: //coolors.co/6479b9-e9ecf5-7785a6-202531-365ebd */
    /* --header_bg: #6479B9;
    --btn_accent: #365EBD;
    --graph_bg: rgba(100, 121, 185, 0.97);
    --bg: #B9C2DF;
    --pill_bg: #7785A6;
    --text: #00175C;
    --contrast_text: #E9ECF5*/
    /*Above this there is actual light settings, but the dark settings looked better. A proper light mode would be nice*/

    --code_bg: #202632;
    --header_bg: #30384A;
    --header_bg_hover: #282F3E;
    --btn_accent: #365EBD;
    --btn_accent_hover: #4069C9;
    --graph_bg: #30384af7;
    --bg: #3A4359;
    --pill_bg: #596688;
    --text: #E9ECF5;
    --contrast_text: #E9ECF5
}

@media (prefers-color-scheme: dark) {
    :root {
        /*        https: //coolors.co/30384a-3a4359-596688-e9ecf5-365ebd*/
        /*--header_bg: #30384A;
        --header_bg_hover: #282F3E;
        --btn_accent: #365EBD;
        --btn_accent_hover: #4069C9;
        --graph_bg: rgba(48, 56, 74, 0.97);
        --bg: #3A4359;
        --pill_bg: #596688;
        --text: #E9ECF5;
        --contrast_text: #E9ECF5*/
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }   
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    height: 100%;
    font-size: 16px;
    position: relative;
    min-height: 100%;
    background-color: var(--bg)
}

body {
    height: 100%;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.discordbutton {
    margin-left: 16px;
    display: inline-block;
    outline: none;
    cursor: pointer;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 500;
    padding: 16px;
    min-height: 38px;
    color: rgb(255, 255, 255);
    text-align: center;
    background-color: rgb(88, 101, 242);
    transition: background-color 0.17s ease 0s, color 0.17s ease 0s;
    text-decoration: none;
    position:relative;
}

.discordbutton a {
    text-decoration: none;
}

.formbutton {
    margin: auto;
    display: inline-block;
    outline: none;
    cursor: pointer;
    border-radius: 40px 40px;
    font-size: 16px;
    font-weight: 500;
    padding: 8px;
    border: medium;
    color: rgb(255, 255, 255);
    text-align: center;
    background-color: var(--header_bg);
    transition: background-color 0.3s ease-in-out;
    text-decoration: none;
}

.formbutton:hover {
    background-color: var(--header_bg);
    opacity:0.6;
}

body {
  margin-bottom: 60px;
  text-align:center;
  color: var(--text);
  background-color: var(--bg);
}

.header {
    background-color: var(--header_bg);
    color:var(--text);
    
}

.header a, .header a:link, .header a:visited {
    color: var(--text);
    font-weight:bold;
    text-transform: uppercase;
}

footer a, footer a:link, footer a:visited {
    color: var(--text);
    text-decoration: none;
}

a, a:hover {
   color: var(--text);
}

h1, h2, h3,h4 {
    font-weight: bold;
}

.grid-container {
    display: grid;
    grid-template-columns: 33.33% 33.33% 33.33%;
}

.grid-item {
    text-align: center;
    width: 100%
}


@media only screen and (max-width: 800px) {
    .grid-container {
        display: grid;
        grid-template-columns: 100%
    }
}

/* Dropdown: parent must be positioned. keep inline by default. */
.dropdown {
    position: relative;
    display: inline-block;
    margin-left: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    margin-top: 0px;
    box-sizing: border-box;
}

/* Dropdown content:
   - min-width: 100% ensures it is at least as wide as parent
   - width: max-content lets it grow if item text is wider
   - left: 0 anchors it to parent's left edge
*/
.dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 100%;
    width: max-content;
    max-width: 90vw; /* avoid extreme overflow on very small viewports */
    box-sizing: border-box;
    transition: background-color 0.3s ease-in-out;
    background-color: var(--header_bg);
    z-index: 9999;
    white-space: nowrap; /* prevents line-wrapping so the background grows horizontally */
    padding: 4px 0;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    overflow: visible;
}

/* Items inside should be block-level, padded and use the site text color */
.dropdown-content a {
    display: block;
    color: var(--text);
    text-decoration: none;
    padding: 8px 12px;
    white-space: normal; /* allow wrapping inside items if you prefer */
    overflow-wrap: anywhere;
}

/* Hover styles */
.dropdown-content a:hover {
    background-color: var(--header_bg_hover);
    opacity: 0.9;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Utilities */
.tabbutton {
    display: block;
    width: 100%;
    outline: none;
    cursor: pointer;
    font-size: 24px;
    font-weight: 500;
    padding: 8px;
    border: medium;
    color: rgb(255, 255, 255);
    text-align: center;
    background-color: var(--header_bg);
    transition: background-color 0.05s ease-out;
    text-decoration: none;
}

    .tabbutton:hover {
        background-color: var(--header_bg_hover);
    }


.selectedtabbutton {
    background-color: var(--btn_accent);
    transition: background-color 0.05s ease-in;
}

    .selectedtabbutton:hover {
        background-color: var(--btn_accent_hover);
    }

.modal-content {
    background-color: var(--bg);
}