/* ============================================================
   风驰直播 - 教学复刻版样式表
   配色体系: 红(#e64444) + 深蓝灰(#405c70) + 灰阶
   字体: Microsoft YaHei (微软雅黑)
   基准容器宽度: 1170px
   ============================================================ */

/* --- 重置与基础 --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
ul, ol, dl, dt, dd { margin: 0; padding: 0; }
ul li, ol li { list-style: none; }
img { border: none; }
a { text-decoration: none; color: #666; transition: color 0.5s ease, background-color 0.5s ease; cursor: pointer; }
a:hover { color: #ff5555; }
em { font-style: normal; color: #999; font-size: 14px; }

body {
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 16px;
  color: #333;
  background-color: #fafafa;
}

/* ============================================================
   1. 顶部导航栏 (g-nav)
   ============================================================ */
.g-nav {
  width: 100%;
  background-color: #405c70;
  margin-bottom: 15px;
  position: relative;
  z-index: 10;
}

.g-nav-box {
  width: 1170px;
  height: 70px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.logo-show {
  margin-left: 2%;
  height: 40px;
  width: 121px;
  flex-shrink: 0;
}

.logo-show p {
  font-size: 26px;
  color: #ff5b5c;
  height: inherit;
  align-items: flex-end;
  display: flex;
}

.g-nav-box ul {
  width: 100%;
  padding-top: 3px;
  display: flex;
  justify-content: space-between;
  color: #ff5b5c;
  opacity: 0.8;
}

.g-nav-box ul li {
  position: relative;
  height: 30px;
  width: 20%;
  margin: 0 15px;
  text-align: center;
  font-size: 20px;
}

/* 下拉子菜单默认隐藏 */
.g-nav-box ul li div { display: none; }

.g-nav-box ul li > a,
.g-nav-box ul li .nav-main {
  display: flex;
  height: 26px;
  align-items: center;
  justify-content: center;
  background-color: floralwhite;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  color: #ff5b5c;
}

/* "首页" 当前页高亮为黑色 */
.g-nav-box ul li.fir > a {
  color: black;
}

.g-nav-box ul li > a:hover,
.g-nav-box ul li .nav-main:hover {
  color: black;
  background-color: rgba(255, 0, 0, 0.5);
  cursor: pointer;
  border-radius: 10px;
}

/* 下拉菜单 — hover 时显示 */
.nav-an:hover .nav-select { display: block; }

.nav-select {
  position: absolute;
  top: 26px;
  left: 0;
  width: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 999;
  padding: 5px 0;
}

.nav-select a {
  display: block;
  padding: 8px 0;
  font-size: 16px;
  color: #666;
  background-color: floralwhite;
  border-radius: 10px;
  margin: 2px 0;
}

.nav-select a:hover {
  color: black;
  background-color: rgba(255, 0, 0, 0.5);
  cursor: pointer;
}

.nav-select a em {
  font-size: 19px;
  color: red;
  margin-left: 3px;
}

/* ============================================================
   2. 赛事分类标签栏 (live_index_nav)
   ============================================================ */
.live_index_nav {
  width: 1170px;
  margin: 45px auto 5px auto;
  height: 40px;
  position: relative;
  top: 10px;
  overflow-x: scroll;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.live_index_nav::-webkit-scrollbar { display: none; }

.live_index_nav li {
  width: 9%;
  display: inline-block;
  height: 26px;
  line-height: 26px;
  margin-right: 1%;
  border-radius: 5px;
  text-align: center;
  background: #e64444;
}

.live_index_nav li:first-child { margin-left: 5px; }

.live_index_nav li a {
  color: #fafafa;
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.live_index_nav li a:hover { color: #fff; }

/* ============================================================
   3. 主内容区容器 (index_con)
   ============================================================ */
.index_con {
  width: 1170px;
  margin: 20px auto 0;
  height: 1000px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #e0e0e0;
}

/* ============================================================
   4. 内容筛选导航 (live_nav)
   — float:right 让它和 date_info 同行显示
   ============================================================ */
.live_content { width: 1170px; margin: 0 auto; }

.live_nav {
  width: 30%;
  float: right;
  line-height: 35px;
  text-align: center;
  margin-right: 25px;
}

.live_nav span {
  width: 24%;
  margin: 0 0.5%;
  cursor: pointer;
  background-color: #fff;
  border-radius: 20px;
  display: inline-block;
  line-height: 28px;
  color: #565656;
  border: 1px solid #808080;
  transition: all 0.3s ease;
}

.live_nav span.on {
  background-color: #cf5858;
  color: #f5f5f5;
  border-color: #cf5858;
}

.live_nav span:hover:not(.on) {
  border-color: #cf5858;
  color: #cf5858;
}

/* ============================================================
   5. 日期分组头 (date_info)
   — 不使用 clear:both，让它和 float:right 的 live_nav 同行
   ============================================================ */
.date_info {
  width: 10%;
  background-color: #4a90e2;
  color: #fff;
  line-height: 35px;
  text-align: center;
}

/* ============================================================
   6. 赛事列表 (live-con)
   ============================================================ */
.live-con {
  width: 100%;
  line-height: 50px;
  border-top: 1px solid #e0e0e0;
  color: #333;
}

.live-con dd {
  cursor: pointer;
  border-bottom: 1px solid #e0e0e0;
  overflow: hidden;
}

.live-con dd::after {
  content: "";
  display: block;
  visibility: hidden;
  clear: both;
}

.live-con dd:hover { background: #F5F7FA; }

/* 时间列 */
.live_time {
  width: 15%;
  margin: 0;
  padding-left: 30px;
  float: left;
}

/* 赛事信息区 */
.live_match_info {
  width: 85%;
  text-align: center;
  overflow: hidden;
}

.live_match_info span {
  float: left;
  height: 50px;
  line-height: 50px;
  white-space: nowrap;
}

/* 赛事名称 */
.live_match {
  margin-right: 10px;
  width: 15%;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* 队名 */
.teamname {
  width: 18%;
  text-overflow: ellipsis;
  overflow: hidden;
}

.live_match_info span:nth-child(2) { text-align: right; }
.live_match_info span:nth-child(6) { text-align: left; }

/* 队徽 */
.live_logo {
  width: 50px;
  text-align: center;
}

.live_logo img {
  height: 30px;
  width: 30px;
  margin: 10px;
  object-fit: cover;
  vertical-align: middle;
  border-radius: 50%;
  background-color: #eee;
}

.live-con div { float: left; }

/* 比分 / VS */
.live_match_info span:nth-child(4) {
  width: 10%;
  color: #666;
}

.match-started span:nth-child(4) { color: #dd0000 !important; }
.match-upcoming span:nth-child(4) { color: #f66 !important; }

/* ============================================================
   7. 赛事状态按钮 (live_signal)
   ============================================================ */
.live_signal { margin-left: 140px; }

.live_signal p {
  width: 109px;
  text-align: center;
  border: 1px solid #666;
  border-radius: 8px;
  line-height: 28px;
  margin: 11px auto;
}

.live_signal p a { color: #666; }

.match-started .live_signal p { border-color: #dd0000; }
.match-started .live_signal p a { color: #dd0000; }

.match-upcoming .live_signal p { border-color: #f66; }
.match-upcoming .live_signal p a { color: #f66; }

.match-scheduled .live_signal p { border-color: #666; }
.match-scheduled .live_signal p a { color: #666; }

/* 热门赛事加粗 */
dd.imp .live_match { font-weight: bold; }
dd.imp .teamname { font-weight: bold; }

/* ============================================================
   8. 底部 (g-foot)
   ============================================================ */
.g-foot {
  clear: both;
  border-top: 8px solid #ff5555;
  background-color: #000;
  overflow: hidden;
  padding-bottom: 30px;
}

.g-footbox {
  width: 1170px;
  margin: 0 auto;
}

.g-footbox p.txt {
  float: left;
  width: 650px;
  margin: 12px 0 0 5px;
}

.g-footbox p.txt span {
  display: block;
  line-height: 23px;
  margin: 0 0 6px;
  font-size: 12px;
  color: #555;
}

.g-footbox p.txt span a {
  font-size: 16px;
  color: #656565;
  padding: 0 5px;
}

.g-footbox p.txt span a:hover { color: #ff5555; }

/* ============================================================
   9. 回到顶部 — 红色方块样式，匹配原站
   ============================================================ */
.back-top {
  display: none;
  position: fixed;
  bottom: 30px;
  left: 50%;
  margin-left: 610px;
  z-index: 99;
  cursor: pointer;
}

.back-top .back-btn {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto;
  background-color: #e64444;
  border-radius: 6px;
  text-align: center;
  padding-top: 10px;
}

.back-top .back-btn .arrow {
  display: block;
  width: 0;
  height: 0;
  margin: 0 auto;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-bottom: 18px solid #fff;
}

.back-top .back-btn .arrow-base {
  display: block;
  width: 12px;
  height: 6px;
  margin: 0 auto;
  background: #fff;
}

.back-top .back-btn .lines {
  display: block;
  width: 20px;
  margin: 3px auto 0;
  border-top: 2px solid #fff;
  padding-top: 3px;
  border-bottom: 2px solid #fff;
}

.back-top .back-btn .text {
  display: block;
  color: #fff;
  font-size: 12px;
  margin-top: 2px;
  letter-spacing: 2px;
}

.back-top.show { display: block; }

/* ============================================================
   10. 响应式适配
   ============================================================ */
@media screen and (max-width: 1080px) {
  .g-nav-box { width: 100%; height: 83px; }
  .logo-show { height: 50px; }
  .g-nav-box ul { width: 100%; padding-top: 10px; }
  .g-nav-box ul li { height: 70px; font-size: 15px; margin: 0 1.5%; }
  .g-nav-box ul li > a, .g-nav-box ul li .nav-main { height: 21px; border-radius: 5px; }

  .live_index_nav { width: 100%; height: 30px; top: 0; }
  .live_index_nav li { width: 10%; font-size: 15px; height: 23px; line-height: 23px; }

  .index_con { width: 100%; border: none; margin-top: 0; }
  .live_content { width: 100%; margin: 0; }

  .live_nav { width: 96%; overflow: auto; margin: 0 2% 5px 2%; }
  .live_nav span { font-size: 16px; }

  .date_info {
    width: 100%;
    text-align: left;
    padding-left: 15px;
    font-size: 16px;
    line-height: 30px;
  }

  .live-con { font-size: 15px; }
  .live-con dd span { line-height: 35px; height: 35px; overflow: hidden; }
  .live_time { width: 13%; padding-left: 15px; line-height: 105px; }
  .teamname { width: 90px; }

  .g-foot { width: 100%; }
  .g-footbox { width: 100%; }
  .g-footbox p.txt { width: 98%; }

  .back-top { left: 85%; margin: 0; bottom: 50px; }
  .back-top .back-btn { width: 50px; height: 50px; padding-top: 6px; }
  .back-top .back-btn .arrow { border-left-width: 10px; border-right-width: 10px; border-bottom-width: 14px; }
  .back-top .back-btn .arrow-base { width: 8px; height: 4px; }
  .back-top .back-btn .text { font-size: 10px; }
}

@media screen and (max-width: 480px) {
  .live-con { font-size: 13px; }
  .teamname { width: 78px; }
  .live_time, .date_info { padding-left: 8px; }
  .date_info { font-size: 15px; }
}
