body {
    background: #181818 url("../images/backgrounds/theme_mk8.png") repeat;
    margin: 0;
    padding-bottom: 8px;
    font-family: 'SourceSansPro', sans-serif;
    color: #bbbbbb;
}

#body_panel {
    max-width: 1334px;
    padding: 0 8px;
    margin: 0 auto;
}

div#footer {
    max-width: 1334px;
    padding: 0 8px;
    margin: 0 auto;
}

b {
    font-weight: 600;
}


h1  {
    font-weight: 400;
}

h2 {
    font-weight: 400;
}

h3, h4 {
    font-weight: 400;
}

select::-ms-expand {
    display: none;
}

select {
    height: 30px;
    border-left: none;
    border-top: none;
    border-right: none;
    border-radius: 0;
    border-bottom: 2px solid #19105a;
    overflow: hidden;
    font-family: 'SourceSansPro', sans-serif;
    font-size: 16px;
    padding-left: 4px;
    padding-right: 4px;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #656087; /* Arrow doesn't show on iOS Safari, the least we can do is just show the background color (this is overriden on the next line on other browsers). */
    background: #656087 url('../images/icons/down_arrow.png') no-repeat right 5px center;
    background-size: 12px;
    color: white;
}

select:hover {
    background: #656087;
    background: #656087 url('../images/icons/down_arrow_hover.png') no-repeat right 5px center;
    background-size: 12px;
}

[type="text"], [type="password"], [type="email"] {
    height: 24px;
    border-left: none;
    border-top: none;
    border-right: none;
    border-radius: 0;
    margin: 8px 0;
    font-family: 'SourceSansPro', sans-serif;
    font-size: 16px;
    padding: 1px 4px;
    -webkit-appearance: none;
    -moz-appearance: none;
    border-bottom: 2px solid #19105a;
    background-color: #656087;
    color: white;
}

textarea {
    border-left: none;
    border-top: none;
    border-right: none;
    margin: 4px 0;
    font-family: 'SourceSansPro', sans-serif;
    font-size: 16px;
    padding: 4px;
    border-bottom: 2px solid #19105a;
    background-color: #656087;
    color: white;
}

[type="submit"], [type="reset"], [type="button"] {
    margin: 2px;
    height: 32px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 6px;
    font-family: 'SourceSansPro', sans-serif;
    font-size: 16px;
    text-decoration: none;
    -webkit-transition: all 0.3s linear 0s;
    -moz-transition: all 0.3s linear 0s;
    -ms-transition: all 0.3s linear 0s;
    -o-transition: all 0.3s linear 0s;
    transition: all 0.3s linear 0s;
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
}

[type="submit"], [type="reset"], [type="button"] {
    color: white;
    background-color: #512da8;
    border-bottom: 3px solid #311b92;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

[type="submit"]:hover, [type="reset"]:hover, [type="button"]:hover {
    background-color: #673ab7;
    cursor: pointer;
}

div.error {
    padding: 4px;
    background-color: #592727;
    color: #de858f;
}

div.success {
    padding: 4px;
    background-color: #3f5b3f;
    color: #8dc98f;
}

span.error {
    background-color: #592727;
    color: #de858f;
}

.error [type="text"], .error [type="password"] {
    height: 24px;
    border-left: none;
    border-top: none;
    border-right: none;
    font-family: SourceSansPro, sans-serif;
    font-size: 16px;
    padding-left: 4px;
    padding-right: 4px;
    border-bottom: 2px solid #281919;
    background-color: #592727;
}

.error textarea {
    border-left: none;
    border-top: none;
    border-right: none;
    margin: 4px 0;
    font-family: SourceSansPro, sans-serif;
    font-size: 16px;
    padding: 4px;
    border-bottom: 2px solid #281919;
    background-color: #592727;
}

.error select {
    height: 30px;
    border-left: none;
    border-top: none;
    border-right: none;
    font-family: SourceSansPro, sans-serif;
    font-size: 16px;
    padding-left: 4px;
    padding-right: 4px;
    border-bottom: 2px solid #281919;
    background-color: #592727;
}

div.panel {
    padding: 8px 8px 8px 16px;
    margin: 8px -8px;
    background-color: rgba(161, 117, 222, 0.04);
    box-shadow: 0 0 4px #111111;
}

div.inline_box {
    padding: 8px;
    margin: 8px;
    display: inline-block;
}

.small_text {
    font-size: 12px;
}

.no_display {
    display: none;
}

a {
    text-decoration: none;
    color: #b292e7;
    -webkit-transition: all 0.3s linear 0s;
    -moz-transition: all 0.3s linear 0s;
    -ms-transition: all 0.3s linear 0s;
    -o-transition: all 0.3s linear 0s;
    transition: all 0.3s linear 0s;
}

a:visited {
    text-decoration: none;
    color: #b292e7;
}

a:link {
    text-decoration: none;
    color: #b292e7;
}


a.black_link, a.black_link:visited, a.black_link:link {
    color: white;
}

a:hover, a.black_link:hover {
    text-decoration: none;
    color: #e5d9ff;
}

.green_text {
    color: #8dc98f;
}

.red_text {
    color: #de858f;
}

.yellow_text {
    color: #dec885;
}

.bold {
    font-weight: 700;
}

span.circle_button {
    margin: 4px;
    width: 12px;
    height: 12px;
    border-radius: 6px;
    display: inline-block;
    background-color: #b292e7;
}

span.circle_button:hover {
    background-color: #e5d9ff;
}

hr {
    height: 2px;
    border: 0;
    background-color: #8a6fac;
    color: #8a6fac;
}

div.homepage_category_gradient_left {
    display: inline-block;
    padding: 0;
    margin: 0;
    height: 30px;
    line-height: 30px;
    width: 20px;
    background: #5b0c75;
    background: linear-gradient(to right, rgba(91, 12, 117, 0), rgba(91, 12, 117, 1));
}

div.homepage_category_gradient_right {
    display: inline-block;
    padding: 0;
    margin: 0;
    height: 30px;
    line-height: 30px;
    width: 20px;
    background: #5b0c75;
    background: linear-gradient(to left, rgba(91, 12, 117, 0), rgba(91, 12, 117, 1));
}

div.homepage_category {
    display: inline-block;
    padding: 0;
    margin: 0;
    height: 30px;
    line-height: 30px;
    width: 200px;
    color: white;
    background: #5b0c75;
}

.homepage_badge {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 16px;
    margin: 6px;
}

.homepage_badge:hover {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 16px;
}

.homepage_badge.selected {
    background: rgba(181, 153, 255, 0.4);
    border-radius: 10px;
    padding: 16px;
}

span#user_name {
    font-size: 24px;
    font-variant: small-caps;
}

#nav_logo img {
    height: 34px;
}

.profile_menu {
    cursor: pointer;
}

#profile_menu {
    background-color: rgb(77, 10, 99);
    position: fixed;
    z-index: 3;
    top: 48px;
    right: 0;
    display: none;
    box-shadow: 4px 8px 4px #2e2e2e;
}

#profile_menu a {
    padding: 9px 8px;
    text-decoration: none;
    font-size: 18px;
    vertical-align: middle;
    color: rgb(225, 129, 250);
    display: block;
    transition: 0.3s;
}

#profile_menu a:hover {
    color: white;
    background-color: rgb(108, 11, 140);
}

#profile_menu a.selected {
    background-color: rgb(110, 13, 143);
}

img.small_flag {
    position: relative;
    top: -1px;
    height: 20px;
    vertical-align: middle;
}

table.table {
    background-color: rgba(32, 5, 46, 0.6);
    width: 100%;
    font-size: 95%;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 0 4px #111111;
}

table.table td {
    border-bottom: #350a4a 1px solid;
    padding: 4px 4px;
}

table.table td.shade1 {
    background-color: rgba(26, 3, 35, 0.6);
}

table.table td.shade2 {
    background-color: rgba(20, 2, 28, 0.6);
}

table.table td.shade3 {
    background-color: rgba(14, 1, 19, 0.6);
}

table.table td.shade4 {
    background-color: rgba(10, 1, 12, 0.6);
}

table.table tr.header td {
    background-color: rgba(45, 10, 64, 0.6);
    font-weight: bold;
}

table.table tr.header td.shade1 {
    background-color: rgba(32, 5, 47, 0.6);
}

table.table tr.header td.shade2 {
    background-color: rgba(32, 5, 46, 0.6);
}

table.table tr.header td.shade3 {
    background-color: rgba(29, 4, 40, 0.6);
}

table.table tr.header td.shade4 {
    background-color: rgba(20, 2, 28, 0.6);
}

table.table tr.highlight td {
    background-color: rgba(63, 17, 88, 0.6);
}

table.table td.highlight {
    background-color: rgba(63, 17, 88, 0.6);
}

table.table tr:first-of-type td {
    border-top: #350a4a 1px solid;
}


a.cup_link {
    width: 40px;
    height: 40px;
    padding: 4px;
    margin: 2px;
    border-radius: 26px;
    display: inline-block;
    background-color: rgba(32, 5, 46, 0.5);
}

a.cup_link:hover {
    background-color: rgba(56, 20, 76, 0.5);
}

a.cup_link.selected {
    background-color: rgba(56, 20, 76, 0.5);
}

a.cup_link img {
    width: 40px;
    height: 40px;
}

.centered {
    text-align: center;
}

.left_align {
    text-align: left;
}

.right_align {
    text-align: right;
}

.full_justify {
    text-align: justify;
}

div.hidden_on_mobile, td.hidden_on_mobile, span.hidden_on_mobile, a.hidden_on_mobile {
    display: none;
}

span.grey_text {
    color: #9d9d9e;
}

div.big_button {
    margin: 8px;
    padding: 16px 8px;
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    border-radius: 6px;
    max-width: 600px;
}

span.rank_badge_1 {
    display: inline-block;
    height: 22px;
    width: 22px;
    text-align: center;
    line-height: 22px;
    padding: 0;
    border-radius: 6px;
    background-color: #ab974f;
    color: black;
}

span.rank_badge_2 {
    display: inline-block;
    height: 22px;
    width: 22px;
    text-align: center;
    line-height: 22px;
    padding: 0;
    border-radius: 6px;
    background-color: #b2b2b2;
    color: black;
}

span.rank_badge_3 {
    display: inline-block;
    height: 22px;
    width: 22px;
    text-align: center;
    line-height: 22px;
    padding: 0;
    border-radius: 6px;
    background-color: #825c37;
    color: black;
}

#matchups_table {
    max-width: 380px;
}

.diff_col {
    display: none;
}

span.delete_button {
    width: 20px;
    height: 20px;
    display: inline-block;
    background-image: url('../images/icons/icon_delete2_dark.png');
    background-size: 20px 20px;
}

span.delete_button:hover {
    background-image: url('../images/icons/icon_delete2_dark_hover.png');
}

span.photo_button {
    width: 20px;
    height: 20px;
    display: inline-block;
    background-image: url('../images/icons/icon_image_dark.png');
    background-size: 20px 20px;
}

span.photo_button:hover {
    background-image: url('../images/icons/icon_image_dark_hover.png');
}

span.video_button {
    width: 20px;
    height: 20px;
    display: inline-block;
    background-image: url('../images/icons/icon_video_dark.png');
    background-size: 20px 20px;
}

span.video_button:hover {
    background-image: url('../images/icons/icon_video_dark_hover.png');
}

span.link_button {
    width: 20px;
    height: 20px;
    display: inline-block;
    background-image: url('../images/icons/icon_link_dark.png');
    background-size: 20px 20px;
}

span.link_button:hover {
    background-image: url('../images/icons/icon_link_dark_hover.png');
}

span.ghost_button {
    width: 20px;
    height: 20px;
    display: inline-block;
    background-image: url('../images/icons/icon_boo.png');
    background-size: 20px 20px;
    opacity: 0.7;
}

span.ghost_button:hover {
    opacity: 1;
}

span.pending_time_notif {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: inline-block;
    background-color: #5d7eb8;
    background-image: url('../images/icons/icon_uploaded_times.png');
    background-size: 28px 28px;
    background-repeat: no-repeat;
    background-position-x: 6px;
    background-position-y: 6px;
}

span.approved_time_notif {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: inline-block;
    background-color: #53b876;
    background-image: url('../images/icons/icon_checkmark.png');
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position-x: 10px;
    background-position-y: 10px;
}

span.discarded_time_notif {
    width: 40px;
    height: 40px;
    display: inline-block;
    background-color: #b85e5e;
    background-image: url('../images/icons/icon_cancel.png');
    background-size: 28px 28px;
    background-repeat: no-repeat;
    background-position-x: 6px;
    background-position-y: 6px;
}

#popup {
    width: 270px;
    background-color: rgb(102, 44, 113);
    color: white;
    padding: 8px;
    box-shadow: 0 0 16px #2e2e2e;
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 100;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

@media screen and (max-width: 899px) {

    header#header {
        display: none;
    }

    header#header_mobile {
        display: block;
        background: #350c4b;
        padding: 0;
        margin: 0;
        width: 100%;
        height: 45px;
        position: relative;
        top: -3px;
        line-height: 45px;
        z-index: 100;
    }

    div#header_mobile_left {
        left: 0;
        display: inline-block;
    }

    div#header_mobile_right {
        float: right;
        display: inline-block;
    }

    div#header_mobile_left a {
        padding: 8px 0;
        margin-left: 5px;
        position: relative;
        top: 4px;
    }

    div#header_mobile_left a:first-of-type {
        padding: 8px;
    }

    div#shadow {
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        background-color: rgba(0, 0, 0, 0.15);
        display: none;
        z-index: 199;
    }

    div#menu_mobile {
        height: 100%;
        width: 225px;
        position: fixed;
        z-index: 200;
        top: 0;
        left: -250px;/* change with JavaScript */
        background-color: #350c4b;
        color: #ed9ef3;
        overflow: hidden;
        overflow-y: auto;
    }

    div#menu_mobile_title_container {
        height: 28px;
        padding: 10px;
        background-color: rgba(223, 223, 223, 0.05);
        border-bottom: 1px solid rgba(223, 223, 223, 0.25);
        color: #ffffff;
        font-size: 20px;
        vertical-align: top;
        display: block;
        position: relative;
    }

    div#menu_mobile_title {
        display: inline-block;
        height: 28px;
        left: 0;
    }

    div#menu_mobile_close {
        height: 28px;
        font-size: 28px;
        float: right;
        vertical-align: top;
    }

    .nav_close {
        position: relative;
        display: inline-block;
        height: 28px;
        top: -6px;
    }

    div.nav_link {
        height: 28px;
        line-height: 28px;
        padding: 10px;
        border-bottom: 1px solid rgba(223, 223, 223, 0.25);
        color: #e8b5f3;
        font-size: 15px;
        display: block;
    }

    div.nav_link a {
        display: inline-block;
        width: 160px;
        border-right: 1px solid rgba(223, 223, 223, 0.25);
    }

    div.nav_link a.mobile_menu_toggle {
        display: inline-block;
        width: 30px;
        height: 30px;
        background-image: url("../images/icons/chevron_right.png");
        background-size: 30px;
        border-right: none;
        float: right;
    }

    div.nav_link a.mobile_menu_toggle.selected {
        background-image: url("../images/icons/chevron_down.png");
    }

    div.nav_link:hover {
        background-color: rgba(223, 223, 223, 0.05);
    }

    div.dropdown_content {
        display: none;
        background-color: rgba(223, 223, 223, 0.08);
        padding-bottom: 10px;
    }

    div.dropdown_content a {
        color: #e8b5f3;
        font-size: 13px;
        padding: 6px 10px;
        display: block;
    }

    div.dropdown_content a:hover {
        background-color: rgba(223, 223, 223, 0.1);
    }

    div.user_link {
        display: inline-block;
        font-size: 15px;
        margin: 0;
        padding: 0 8px;
        position: relative;
    }

    div.user_link a {
        color: #e8b5f3;
    }

    div.user_link:hover {
        background-color: rgba(257, 158, 243, 0.06);
    }

    .user_dropdown_content {
        display: none;
        position: absolute;
        z-index: 105;
        right: 0;
        margin-top: -1px;
    }

    .user_link:hover .user_dropdown_content {
        display: block;
    }

    div#user_links .user_dropdown_content {
        position: absolute;
        right: 8px;
    }

    div#user_links .user_dropdown_content a {
        width: 150px;
        background-color: black;
        padding: 6px 0 6px 12px;
        font-size: 13px;
        height: 18px;
        line-height: 18px;
        position: relative;
        right: -8px;
        display: block;
    }

    div#user_links .user_dropdown_content a:hover {
        background: #633274;
    }
}

@media screen and (min-width: 400px) {
    .diff_col {
        display: table-cell;
    }
}

@media screen and (min-width: 900px) {
    #body_panel {
        margin: 8px auto 0 auto;
    }

    .hidden_on_desktop {
        display: none !important;
    }

    body {
        padding-top: 48px;
    }

    div#body_panel {
        margin-top: 48px;
    }

    header#header {
        display: block;
        background: #350c4b;
        padding: 6px 0;
        margin: 0;
        text-align: center;
        height: 40px;
        position: fixed;
        width: 100%;
        top: 0;
        z-index: 100;
    }


    div#navigation {
        display: block;
        background: #350c4b;
        padding: 0;
        margin: 0;
        text-align: center;
        position: fixed;
        width: 100%;
        top: 52px;
        border-bottom: 1px solid rgba(91, 12, 117, 0.15);
        z-index: 100;
    }

    div#top_pane {
        margin: 86px 0 0 0;
    }

    div.nav_link {
        display: inline-block;
        font-size: 15px;
        margin: 0;
        padding: 8px 16px 8px 8px;
        position: relative;
    }

    div.nav_link a {
        color: #e8b5f3;
    }

    div.nav_link:hover {
        background-color: rgba(257, 158, 243, 0.06);
    }

    .dropdown_content {
        display: none;
        position: absolute;
        z-index: 105;
    }

    .nav_link:hover .dropdown_content {
        display: block;
    }


    div#header_inner  {
        max-width: 1350px;
        margin: 0 auto;
        text-align: left;
    }

    div#navigation_inner {
        max-width: 1350px;
        margin: 0 auto;
        text-align: left;
    }

    div#navigation_left {
        left: 0;
        display: inline-block;
    }

    div#navigation_right {
        float: right;
        display: inline-block;
    }

    .dropdown_content a {
        width: 240px;
        background-color: black;
        box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
        padding: 6px 12px;
        font-size: 13px;
        height: 18px;
        position: relative;
        left: -8px;
        top: 8px;
        display: block;
    }

    div#navigation_right .dropdown_content {
        position: absolute;
        right: -8px;
    }

    div#navigation_right .dropdown_content a {
        width: 150px;
    }

    .dropdown_content a:hover {
        background: #633274;
    }

    div.hidden_on_mobile.inline_box {
        display: inline-block;
    }

    span.hidden_on_mobile {
        display: inline;
    }

    a.hidden_on_mobile {
        display: inline;
    }

    td.hidden_on_mobile, th.hidden_on_mobile {
        display: table-cell;
    }

    div.inline_on_desktop {
        display: inline-block;
        padding: 0 4px;
    }

    a.cup_link {
        width: 60px;
        height: 60px;
        padding: 8px;
        margin: 4px;
        border-radius: 36px;
        display: inline-block;
    }

    a.cup_link img {
        width: 60px;
        height: 60px;
    }

    #matchups_table {
        max-width: 600px;
    }

    .mkw_shifted_badge {
        position: relative;
        top: -46px;
    }
}