header {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  margin-bottom: 0;
  line-height: 90px;
  z-index: 2;

  padding-right: 50px;
  box-sizing: border-box;
}

header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 140px;
  background: url("../images/header-bg.png") 0 0 repeat-x;
  background-size: auto 100%;
  pointer-events: none;
  z-index: 2;
}
header .logo {
  /*position: absolute;
  left: 50px;
  top: 20px;*/
  font-size: 0;
  float: left;
  margin-left: 50px;
  margin-top: 20px;
}
header nav {
  float: left;
  color: #ccc;
  margin-top: 7px;
  margin-left: 50px;
  font-size: 18px;
}
header nav a {
  font-size: 20px;
  color: #ccc;
  margin: 0 15px 0 8px;
}
header nav a:hover {
  color: #fff;
}

header .btn-login {
  position: absolute;
  right: 50px;
  font-size: 20px;
  color: #ccc;
  margin: 7px 85px 0 8px;
  cursor: pointer;
}
header .btn-login:hover {
  color:white;
}
/* 🔥 注册按钮 → 绝对定位靠右 */
header .btn-register {
  position: absolute;
  right: 50px;
  font-size: 20px;
  color: #ccc;
  margin: 7px 15px 0 8px;
  cursor: pointer;
}

header .btn-register:hover {
  color:white;
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translate3d(0, -100%, 0);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
.fadeInDown {
  animation-name: fadeInDown;
  animation-duration: 1s;         /* 必须加！动画时长 */
  animation-fill-mode: both;      /* 必须加！保持结束状态 */
  animation-timing-function: ease;/* 平滑过渡 */
}

 .btn-pre,
    .btn-dl,
    .state1,
    .state2 {
        float: right;
    }

    .btn-dl {
        width: 174px;
        height: 48px;
        line-height: 48px;
        text-align: center;
        color: #ffe7a6;
        font-size: 20px;
        margin: 26px 67px 0 0;
        background: url("../images/btn.png") 0 0 no-repeat;

        &:hover {
            background-position: -175px 0;
        }
    }

    .state1,
    .state2 {
        display: none;
        margin-top: 5px;
        font-size: 20px;
        margin-right: 40px;
        &.show {
            display: block;
        }
    }

    .state1 {

        span {
            color: #e3e3e3;
            margin-left: 17px;
            cursor: pointer;
            &:hover{
                color: #fff;
            }
        }
        
    }

    .state2 {
        position: relative;
        &:hover{
            .box{
                display: block;
            }
        }

        .username {
            position: relative;
            padding-right: 26px;
            color: #e3e3e3;
            &::after{
                content: "";
                position: absolute;
                right: 0;
                top: 8px;
                width: 11px;
                height: 7px;
                background: url("../images/user-icon.png") 0 -28px no-repeat;
                cursor: pointer;
            }
        }

        .box {
            display: none;
            position: absolute;
            top: 80px;
            right: 0;
            font-size: 16px;
            background-color: #222931;
            width: 190px;
            color: #fff;

            a {
                color: #fff;
                display: block;
                height: 54px;
                line-height: 54px;
                transition: background-color .3s;
                padding-left: 56px;
                background-image: url("../images/user-icon.png");
                background-repeat: no-repeat;
                box-sizing: content-box;

                &:hover {
                    background-color: #29313b;
                }
            }

            .acc {
                background-position: 27px -43px;
            }

            .logout {
                background-position: 28px -97px;
            }
        }
    }


footer {
  position: relative;
  text-align: center;
  padding: 60px 20px;
  color: #999;
  line-height: 1.8;
  background-color: #000;
  font-size: 14px;
}
footer a {
  color: #999;
}
footer a:hover {
  color: #fff;
}
footer .logo,
footer .wrap {
  display: inline-block;
  vertical-align: top;
}
footer .logo {
  margin-right: 30px;
  position: static;
  margin-top: 28px;
}
footer .logo img {
  height: auto;
}
footer .wrap {
  text-align: left;
}
footer nav a {
  margin-right: 8px;
}
footer .btn-age {
  position: absolute;
  right: 20px;
  bottom: 80pxx;
  width: 80px;
  cursor: pointer;
}
footer .pop-ageReminder {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 70;
}
footer .pop-ageReminder .layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}
footer .pop-ageReminder .close {
  position: absolute;
  top: 0;
  right: -10px;
  width: 69px;
  height: 64px;
  background: url("//www.mythofempires.cn/static/web202204/images/close.png") 0 0 no-repeat;
  background-size: 100%;
  cursor: pointer;
}
footer .pop-ageReminder .wrap {
  position: absolute;
  left: 50%;
  top: 18%;
  margin-left: -500px;
  width: 1000px;
  padding: 40px 60px;
  background-color: #000;
}
footer .pop-ageReminder h2 {
  color: #fff;
  text-align: center;
  font-size: 30px;
  margin-bottom: 28px;
}
footer .pop-ageReminder p {
  font-size: 14px;
  color: #999;
  margin-bottom: 15px;
}
/* ========== 平板 1024px以下适配 ========== */
@media screen and (max-width: 1024px) {
  header {
    line-height: 70px;
    padding: 0 15px;
  }
  header::before {
    height: 100px;
  }
  header .logo {
    margin-left: 0;
    margin-top: 12px;
  }
  header .logo img {
    height: 46px;
    width: auto;
  }
  /* 移动端隐藏横向导航，无模板改动 */
  header nav {
    /* display: none; */
    margin-top: 0px;
    margin-left: 15px;
    font-size: 12px;
  }
  header nav a {
    font-size: 14px;
    color: #ccc;
    margin: 0 5px 0 2px;
  }
  /* 登录、注册按钮缩小，靠右内缩 */
  header .btn-login {
    right: 40px;
    font-size: 16px;
    margin: 0;
  }
  header .btn-register {
    right: 15px;
    font-size: 16px;
    margin: 0;
  }

  /* 新闻顶部导航适配 */
  .topNav {
    margin-top: 80px;
  }
  .topNav .tabs {
    text-align: center;
  }
  .topNav .breadcrumb {
    margin-top: 10px;
    text-align: center;
  }

  /* 新闻列表自适应 */
  ul.list.clearfix li {
    width: 48%;
    margin-bottom: 30px;
  }

  /* 页脚适配 */
  footer {
    padding: 40px 15px 100px;
  }
  footer .logo,
  footer .wrap {
    display: block;
    margin: 0 auto 20px;
    text-align: center;
  }
  footer .wrap {
    text-align: center;
  }
  footer .btn-age {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
    width: 60px;
  }
  /* 适龄弹窗平板适配 */
  footer .pop-ageReminder .wrap {
    width: 90%;
    margin-left: -45%;
    padding: 30px 40px;
  }
}

/* ========== 手机 768px以下适配 ========== */
@media screen and (max-width: 768px) {
  header {
    line-height: 60px;
  }
  header::before {
    height: 85px;
  }
  header nav {
    /* display: none; */
    margin-top: 0px;
    margin-left: 15px;
    font-size: 12px;
  }
  header nav a {
    font-size: 14px;
    color: #ccc;
    margin: 0 5px 0 2px;
  }
  header .logo img {
    height: 38px;
  }
  header .btn-login,
  header .btn-register {
    font-size: 14px;
  }
  header .btn-login {
    right: 45px;
  }
  header .btn-register {
    right: 10px;
  }

  .topNav {
    margin-top: 70px;
  }
  .topNav .tabs a {
    font-size: 16px;
    padding: 4px 8px;
  }

  /* 新闻列表单列 */
  ul.list.clearfix li {
    width: 100%;
    float: none;
  }

  /* 适龄弹窗手机全屏适配 */
  footer .pop-ageReminder .wrap {
    left: 15px;
    right: 15px;
    top: 10%;
    width: auto;
    margin-left: 0;
    padding: 20px 15px;
  }
  footer .pop-ageReminder .close {
    right: 0;
    top: -50px;
    width: 45px;
    height: 42px;
  }
  footer .pop-ageReminder h2 {
    font-size: 22px;
  }
  footer .pop-ageReminder p {
    font-size: 13px;
  }
}