:root {
    --dropdownmenu-text-color: #321540;
}

@keyframes infinite-glow {
    0% {
        opacity: 0.2;
    }
    100% {
        opacity: 1;
    }
}

#header {
    height: 0;
}

#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: var(--topbar-height);
    line-height: var(--topbar-height);
    background-color: #321540;
    width: 100%;
    min-width: 1240px;
    z-index: 8009;
}

#top-bar-inner {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1920px;
}

#top-bar::before {
    content: ' ';
    width: 100%;
    height: 39px;
    position: absolute;
    left: 0;
    bottom: -38px;
    animation: infinite-glow linear 1200ms infinite alternate;
    background: url(/static/img/home/glow.png) center no-repeat;
    pointer-events: none;
}

#menu-bar {
    height: 34px;
    background: rgba(50, 21, 64, 0.45);
    position: fixed;
    top: 53px;
    left: 0;
    right: 0;
    z-index: 98;
}

#menu-bar #menu {
    width: 1240px;
    height: 100%;
    margin: auto;
    position: relative;
}

#menu-bar #menu #menu-inner-left {
    position: absolute;
    right: 745px;
}

#menu-bar #menu #menu-inner-right {
    position: absolute;
    left: 745px;
}

#menu-bar #menu li {
    display: inline-block;
    margin: 0 10px;
    height: 34px;
}

#menu-bar #menu li a {
    color: #FFFFFF;
    font-family: "Alegreya Sans SC", sans-serif;
    font-size: 14px;
    line-height: 34px;
    font-weight: normal;
    text-shadow: 0 0 4px #2d2d2d, 0 0 1px #e6e4e4;
}

#menu-bar #menu li.main-menu-event a {
    font-weight: bold;
    transition: text-shadow ease-in-out 200ms;
}

#menu-bar #menu li.main-menu-event a:hover {
    text-shadow: 0 0 7px white;
}

#menu-bar #menu li.main-menu-event.selected a {
    font-weight: 900;
}

#menu-bar #menu li.selected a {
    font-weight: bold;
}

/* Logo Eldarya et liens */
#header-left {
    height: var(--topbar-height);
    position: absolute;
    top: 0;
    left: 40px;
}

#header-left #header-logo {
    height: var(--topbar-height);
    display: inline-block;
}

#header-left #header-logo img {
    vertical-align: middle;
    height: 80%;
}

/* Titre de la saison */
#top-bar h1 {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-color);
    font-family: "Alegreya Sans SC", sans-serif;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 8px var(--main-season-color);
    letter-spacing: 4px;
    transition: opacity ease-in-out 300ms;
    min-width: 260px;
}

#top-bar h1.s1 {
    text-shadow: 0 0 8px var(--s1-color);
}

#top-bar h1.s2 {
    text-shadow: 0 0 8px var(--s2-color)
}

/* Notifications */
#header-right {
    height: var(--topbar-height);
    position: absolute;
    top: 0;
    right: 210px;
    padding-top: 4px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

@media (max-width: 1240px) {
    #header-right {
        right: 250px;
    }
}

@media (max-width: 1190px) {
    #header-right {
        right: 300px;
    }
}

@media (max-width: 1150px) {
    #header-right {
        right: 40px;
    }

    #beemoov {
        display: none;
    }
}

#header-right li {
    display: inline;
    margin: 0 10px;
    height: 100%;
    position: relative;
}

#header-right li a {
    vertical-align: middle;
    transform: translateY(-25%);
    font-family: "Alegreya Sans SC", sans-serif;
    text-transform: none;
    font-size: 15px;
    font-weight: bold;
}

#header-right li a.login {
    color: #fff;
}

#header-right #header-messages a {
    display: inline-block;
    width: 25px;
    height: 22px;
    background: url(/static/img/new-layout/header/messages.png);
    background-size: 100% 100%;
}

#header-right #header-notifications a {
    display: inline-block;
    width: 21px;
    height: 21px;
    background: url(/static/img/new-layout/header/notifications.png);
    background-size: 100% 100%;
}

#header-right #header-messages,
#header-right #header-notifications {
    transition: transform ease-in-out 200ms;
}

#header-right #header-messages:hover,
#header-right #header-notifications:hover {
    transform: scale(1.3);
}

#header-right li.active::after {
    content: ' ';
    width: 10px;
    height: 10px;
    background: var(--main-season-color);
    border-radius: 100%;
    position: absolute;
    top: 7px;
    left: -3px;
    box-shadow: 0 0 2px 2px rgba(255, 255, 255, 0.4);
}

#header-right #header-profile {
    height: 100%;
    background: url(/static/img/new-layout/header/profile.png) no-repeat right;
    padding-right: 37px;
    color: var(--text-color);
    line-height: 27px;
    font-family: "Alegreya Sans", sans-serif;
    font-size: 15px;
    margin-bottom: 0.1em;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Cristal */
#header #crystal-images-container {
    position: fixed;
    width: 100%;
    min-width: 1240px;
    height: 0;
    z-index: 101;
    top: 53px;
}

#header #crystal-images-inner {
    width: 260px;
    height: 65px;
    margin: auto;
    position: relative;
}

#header #crystal-images-inner img {
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity ease-in-out 400ms;
}

#header #crystal-images-container.s1 #season-2-crystal {
    opacity: 0;
}

#header #crystal-images-container.s1:hover #season-2-crystal {
    opacity: 1;
}

#header #crystal-images-container.s1:hover #season-1-crystal {
    opacity: 0;
}

#header #crystal-images-container.s2 #season-1-crystal {
    opacity: 0;
}

#header #crystal-images-container.s2:hover #season-1-crystal {
    opacity: 1;
}

#header #crystal-images-container.s2:hover #season-2-crystal {
    opacity: 0;
}

/* Switcher de saison */
#season-switcher {
    position: absolute;
    top: var(--topbar-height);
    left: -40px;
    width: 400px;
    height: 250px;
    max-height: 0;
    background: #fff;
    text-align: center;
    /*display: none;*/
    box-shadow: var(--dropdownmenu-box-shadow);
    transition: max-height ease-in-out 300ms;
    overflow: hidden;
}

#header-logo:hover #season-switcher {
    max-height: 250px;
    overflow: visible;
}

#season-switcher::after {
    content: ' ';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 6px 8px 6px;
    border-color: transparent transparent #ffffff transparent;
    -webkit-transform: rotate(360deg);
    position: absolute;
    top: -5px;
    left: 90px;
}

#season-switcher .switch-season h2 {
    color: var(--text-color);
    font-size: 35px;
    line-height: 26px;
    position: absolute;
    bottom: 10%;
    font-family: "Alegreya Sans SC", sans-serif;
    padding: 0 0.5em;
    font-weight: 800;
    filter: drop-shadow(0 0 5px rgba(65, 64, 65, 0.75));
}

#season-switcher #switch-s1 h2 {
    text-shadow: 2px 2px 10px #00e4ff, -2px -2px 10px #00e4ff;
}

#season-switcher #switch-s2 h2 {
    text-shadow: 2px 2px 10px #F600FF, -2px -2px 10px #F600FF;
}

#season-switcher .switch-season {
    width: 155px;
    height: 201px;
    display: inline-block;
    margin: 26px 14px 0;
    border-radius: 16px;
    cursor: pointer;
    filter: saturate(0.1);
    position: relative;
    transition: all ease-in-out 300ms;
}

#season-switcher .switch-season:hover {
    filter: saturate(1);
}

#season-switcher .switch-season.active {
    filter: saturate(1);
    box-shadow: 0 0 2px 2px rgba(var(--main-season-color-rgb), 0.3);
}

#season-switcher #switch-s1 {
    background: url(/static/img/new-layout/header/switch-s1.jpg);
}

#season-switcher #switch-s2 {
    background: url(/static/img/new-layout/header/switch-s2.jpg);
}

/* Dropdown menu joueur */
#header-right #header-profile:hover #player-dropdown-menu,
#header-right #header-profile.displayed #player-dropdown-menu {
    height: 400px;
    padding-top: 10px;
    transition: height ease-in-out 500ms, padding-top step-start 500ms;
}

#player-dropdown-menu #avatar-menu-container-outer {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-height: 150px;
    height: 150px;
}

#player-dropdown-menu #avatar-menu-container-outer p {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: #FFFFFF;
    font-family: "Alegreya Sans SC", sans-serif;
    font-size: 23px;
    font-weight: 900;
    line-height: 23px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
    width: 90%;
    word-break: break-all;
    text-align: center;
}

#header-right #header-profile #avatar-menu-container {
    width: 630px;
    height: 891px;
    position: relative;
}

#player-dropdown-menu #player-infos-container {
    display: block;
}

#player-dropdown-menu {
    box-shadow: var(--dropdownmenu-box-shadow);
    width: 214px;
    height: 0;
    position: absolute;
    z-index: 1;
    top: calc(100% - 10px);
    right: -94px;
    color: var(--dropdownmenu-text-color);
    text-transform: uppercase;
    font-weight: bold;
    transition: height ease-in-out 500ms, padding-top step-end 500ms;
    overflow: hidden;
    background: transparent;
    padding-top: 0;
}

#player-dropdown-menu #player-level-text {
    font-size: 15px;
    line-height: 15px;
    font-family: "Alegreya Sans SC", sans-serif;
    font-weight: 800;
    text-shadow: 0 0 3px rgba(50, 21, 64, 0.3);
    text-transform: none;
}

#player-dropdown-menu #player-level {
    font-size: 25px;
    line-height: 25px;
}

#player-dropdown-menu a {
    color: var(--dropdownmenu-text-color);
}

#player-dropdown-menu canvas {
    position: absolute;
    left: -212px;
    top: -175px;
}

#player-dropdown-menu::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 5px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(255, 255, 255, 1);
    transform: translateX(-50%);
}

#player-dropdown-menu #player-level-bar {
    position: relative;
    width: 50%;
    height: 15px;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 0 5px 0 rgba(27, 27, 27, 0.34);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5px;
    margin-bottom: 14px;
}

#player-dropdown-menu #player-level-bar p {
    color: var(--text-color);
    z-index: 1;
    font-size: 0.8em;
    line-height: 0.8em;
    text-shadow: 0 0 3px rgba(62, 62, 62, 0.9);
}

#player-dropdown-menu #player-level-bar-inner {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--containers-season-background);
    border-radius: 50px;
}

#player-dropdown-menu #player-infos-container {
    padding: 0 23px 18px;
    position: relative;
    background: #fff;
}

#player-dropdown-menu #player-infos-container hr {
    border-bottom: 2px solid rgba(0, 0, 0, 0.2);
    margin: 1px 0;
}

#guard-icon {
    position: absolute;
    transform: translate(0, -50%);
    right: 5px;
    top: 0;
}

#player-dropdown-menu #logout-button {
    color: var(--text-color);
    margin-top: 1em;
    display: block;
    max-width: 80%;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}
