html {
    --background-primary: #222527;
    --background-secondary-hover: #27292D; /* Almost secondary, for button hover actions */
    --background-secondary: #2c2d32;
    --background-tertiary: #393a41;
    --background-quaternary: #484b53;

    --background-off: #b70000;
    --background-danger: #201416;

    --rule-primary: #797979;

    --text-primary: #cccddc;
    --text-secondary: #9d9cae;
    --text-tertiary: #6a6972;

    --text-danger: #e2706d;

    --sv-margin: calc(5vw + 7px);
    --sv-width: 4vw;

    /* This seems pretty effective! :D */
    --smallest: 0.7vw;
    --smaller: 0.8vw;
    --small: 0.9vw;
    --medium: 1vw;
    --large: 1.1vw;
    --larger: 1.3vw;

    --monochrome: grayscale(100%);
}

hr {
    border: 0px solid transparent;
    border-top: 1px solid var(--rule-primary);
    margin-block: 1vh; /*Yes, I'm overriding this. The default em padding looks weird at low res. */
}

h1 {
    font-size: var(--large);
    color: var(--text-primary);
}
h2 {
    font-size: var(--medium);
    color: var(--text-secondary);
}
h3 {
    font-size: var(--small);
    color: var(--text-secondary);
}
h4 {
    font-size: var(--smaller);
    color: var(--text-tertiary);
}
h5 {
    font-size: var(--smallest);
    color: var(--text-tertiary);
}

input {
    font-size: var(--medium);
    border: 0;
    border-radius: 0.3vh;
    background-color: var(--background-tertiary);
    color: var(--text-secondary);
}

body {
    background-color: var(--background-primary); 
}

button {
    font-size: var(--medium);
    background-color: var(--background-secondary);
    color: var(--text-primary);
    border-radius: 1vh;
    border-style: none;
    cursor: pointer;
    user-select: none;
}
button:hover {
    background-color: var(--background-tertiary);
}

a {
    text-decoration: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.shortbtndiv {
    display: flex;
    margin-inline: auto;
    width: 100%;
    height: 6vh;
    border-bottom: var(--rule-primary) solid 1px;
}
.shortbtn {
    width: 90%;
    height: 3.4vh;
    margin: auto;
    font-weight: bold;
    font-size: var(--small);
}

.shortlink {
    font-size: var(--medium);
    font-weight: bold;
    color: var(--text-secondary);
    line-height: 150%;
    filter: var(--monochrome); /*Hacky and temporary*/
    padding: 0.4vh;
    margin: 0;
}
.shortlink:hover {
    background-color: var(--background-secondary-hover);
}

.loginform {
    text-align: center;
}
.loginform > * {
    display: block;
    margin-block: 2vh;
}

.guildunit {
    margin-top: 10%;
    margin-bottom: 10%;
    margin-left: auto;
    margin-right: auto;
    height: 3vw;
    display: block;
    border-radius: 20%;
}

.guildunit:hover {
    border-radius: 10%;
}

.friendspanel {
}

.fullw {
    display: inline-block;
    width: 100%;
}

.dmlist {
    overflow-y: scroll;
}

.dmunit {
    width: 90%;
    padding-left: 1vw;
    padding-block: 0.4vw;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    border-radius: 0.3vw;
    font-size: var(--small);
}
.dmunit:hover {
    background-color: var(--background-secondary-hover);
}

.dmunit > img {
    width: 13%;
}

.settinglink {
    display: block;
    margin: 3%;
    width: 94%; /* Hacky I know, but not sure what causes the overflow that this solves. */
    height: min-content;
    border-radius: 3%;
    background-color: var(--background-primary);
}
.settingheader {
    font-size: var(--medium);
    padding: 3%;
    margin: 0;
    color: var(--text-secondary);
    user-select: none;
}
.settingslist {
    float: left;
    width: 15vw;
    height: 100%;
    background-color: var(--background-secondary);
}
.settingsexit {
    position: absolute;
    top: 3%;
    right: 3%;
    z-index: 10;
    height: 8vh;
    width: 8vh;
    text-align: center;
}

.callgrid {
    display: flex;
    height: 80%;
    width: 100%;
}

.callgridunit {
    margin: auto;
    height: 40vh;
}
.callgridunit > video {
    border-radius: 2%;
    height: 100%;
    object-fit: fill;
}

.callcontrols {
    display: flex;
    margin-inline: auto;
    height: 10%;
    width: min-content;
    justify-content: center;
}
.callcontrols > input {
    background-color: var(--background-secondary);
    padding: 1vh;
    border-radius: 20%;
    margin: auto;
    height: 50%;
    filter: none;
}
.callcontrols > input:active {
    filter: brightness(1.25);
}

.guildlist {
    padding-top: 1vh;
    float: left; 
    width: var(--sv-width);
    height: 100vh;
    border-right: 1px solid var(--rule-primary);
}

.quickpanel {
    display: flex;
    flex-direction: column;
    flex: 1 1;
}

.dmpanel {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.mepanel {
    display: flex;
    border-top: 1px solid var(--rule-primary);
    padding-left: 0.8vw; /* Bullshit */
    height: 10vh;
}

.mebutton {
    height: 3vh;
    margin-block: auto;
    margin-inline: 0.1vw;
    background-color: transparent;
}

.accpfpoverlay {
    z-index: 10;
    position: absolute;
    top: 0;
    left: 0;
    height: 13vh;
    width: 13vh;
    display: inline;
    opacity: 0%;
}
.accpfpoverlay:hover {
    opacity: 40%;
}

.convopanel {
    background-color: var(--background-primary);
    border-left: 1px solid var(--rule-primary);
    width: calc(100vw - (var(--sv-width) + 21vw));
    position: relative;
    top: 100%;
    height: 100vh;
    float: right;
}

.convoicondeck {
    display: flex;
    width: 50%;
    margin-right: 1%;
}
.convoicondeck > input {
    background-color: transparent;
    margin-left: auto;
    margin-block: auto;
    height: 60%;
    cursor: pointer;
}

.msgbarform {
    display: flex;
    align-items: center;
    height: 3vh;
}

.msgbartext {
    flex-grow: 1;
    height: 3vh;
    margin-left: 0.5vw;
    outline: none;
    font-size: var(--small);
}

.msglist {
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
    height: 100%;
}

/* I love naming things */
.msgmsg {
    display: block;
    margin-block: 1vh;
    margin-inline: 1vw;
    font-size: var(--small);
    word-break: break-all;
}

.msgpfp {
    float: left;
    width: 5vh;
    height: 5vh;
    user-select: none;
    border-radius: 50%;
    margin-right: 1vw;
}

.msgusr {
    display: inline;
    font-size: var(--small);
    color: var(--text-tertiary);
}

.msgtxt {
    display: inline;
    font-size: var(--medium);
    color: var(--text-secondary);
}

.hr-text {
    border: 0;
    font-size: var(--small);
    height: 1.5em;
    line-height: 1em;
    position: relative;
    text-align: center;
}
.hr-text::before {
    content: "";
    background-color: var(--rule-primary);
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
}
.hr-text::after {
    background-color: var(--background-secondary);
    color: var(--text-tertiary);
    content: attr(data-content);
    line-height: 1.5em;
    padding: 0.2vh 0.4vw;
    position: relative;
}

/* I really need to find a better way to do this stuff. */
.shiny {
    color: var(--text-secondary);
}
.shiny:hover {
    color: var(--text-primary);
}

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

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

.inviscroll {
    overflow-y: scroll;
}
.inviscroll::-webkit-scrollbar {
    display: none;
}
.inviscroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.noselect {
    user-select: none;
}
.doselect {
    user-select: text;
}

/*
Commented to save ram, bandwidth etc. Can be uncommented if needed
@font-face {
    font-family: "Whitney";
    src: url("font/whitneybold.otf");
    font-weight: bolder;
}
*/
@font-face {
    font-family: "Whitney";
    src: url("font/whitneysemibold.otf");
    font-weight: bold;
}
@font-face {
    font-family: "Whitney";
    src: url("font/whitneymedium.otf");
    font-weight: normal;
}
/*
Same as above comment
@font-face {
    font-family: "Whitney";
    src: url("font/whitneylight.otf");
    font-weight: lighter;
}
*/

* {
    font-family: Whitney, Verdana, Geneva, Tahoma, sans-serif;
}