/*
Theme Name:  好体育 Sports - 暗黑电竞版
Theme URI:   https://haotiyu8.com
Author:      好体育团队
Author URI:  https://haotiyu8.com
Description: 好体育旗下haotiyu8.com专业体育资讯主题，专注格斗与极限运动，EEAT深度优化。
Version:     2.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.2
License:     GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: haotiyu8
Tags: sports, news, seo-optimized, custom-post-types, responsive-layout, dark-theme
*/

/* ============================================================
   好体育主题 - 全局设计变量
   ============================================================ */
:root {
  --ht-red:        #FF003C;
  --ht-accent:     #FF00FF;
  --ht-gold:       #FF9900;
  --ht-dark:       #030303;
  --ht-charcoal:   #0A0A0A;
  --ht-mid:        #141414;
  --ht-light:      #F0EDE8;
  --ht-muted:      #888888;
  --ht-white:      #FFFFFF;
  --ht-radius:     0px;
  --ht-font-body:  'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --ht-font-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --ht-font-disp:  'Bebas Neue', 'Impact', sans-serif;
  --ht-transition: 0.3s ease;
  --ht-shadow:     0 4px 24px rgba(0,0,0,0.4);
}

/* ============================================================
   重置 & 基础
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--ht-dark);
  color: var(--ht-light);
  font-family: var(--ht-font-body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ht-red); text-decoration: none; transition: color var(--ht-transition); }
a:hover { color: var(--ht-accent); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--ht-dark); }
::-webkit-scrollbar-thumb { background: var(--ht-red); }

/* ============================================================
   排版系统
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ht-font-serif);
  color: var(--ht-white);
  line-height: 1.2;
  font-weight: 900;
}

h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

p { margin-bottom: 1.2em; color: rgba(240,237,232,0.75); }

/* ============================================================
   布局容器
   ============================================================ */
.ht-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

.ht-container--wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
}

.ht-grid-2  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.ht-grid-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ht-grid-4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 1024px) {
  .ht-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ht-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .ht-container, .ht-container--wide { padding: 0 20px; }
  .ht-grid-2, .ht-grid-3, .ht-grid-4 { grid-template-columns: 1fr; }
}

/* ============================================================
   导航栏
   ============================================================ */
.ht-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(232,0,28,0.15);
  height: 72px;
  display: flex; align-items: center;
  transition: all var(--ht-transition);
}

.ht-nav.scrolled {
  height: 60px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.6);
}

.ht-nav__inner {
  display: flex; align-items: center;
  justify-content: space-between;
  width: 100%;
}

.ht-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--ht-font-disp);
  font-size: 26px; letter-spacing: 3px;
  color: var(--ht-white) !important;
}

.ht-logo__icon {
  width: 36px; height: 36px;
  background: var(--ht-red);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: var(--ht-white);
}

.ht-logo__text em { color: var(--ht-red); font-style: normal; }

.ht-nav__menu {
  display: flex; align-items: center; gap: 32px;
}

.ht-nav__menu a {
  color: rgba(240,237,232,0.7);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  transition: color var(--ht-transition);
}

.ht-nav__menu a:hover,
.ht-nav__menu .current-menu-item a { color: var(--ht-red); }

.ht-nav__cta {
  background: var(--ht-red);
  color: var(--ht-white) !important;
  padding: 9px 22px;
  font-size: 11px !important;
  letter-spacing: 2px;
  transition: background var(--ht-transition) !important;
}
.ht-nav__cta:hover { background: #cc0018 !important; color: var(--ht-white) !important; }

/* Mobile hamburger */
.ht-nav__toggle {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: 8px;
}
.ht-nav__toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--ht-light); margin: 5px 0;
  transition: all var(--ht-transition);
}

@media (max-width: 768px) {
  .ht-nav__toggle { display: flex; flex-direction: column; }
  .ht-nav__menu {
    position: fixed; top: 72px; left: 0; right: 0;
    background: var(--ht-charcoal);
    flex-direction: column; gap: 0;
    padding: 20px 0;
    display: none;
  }
  .ht-nav__menu.is-open { display: flex; }
  .ht-nav__menu a {
    padding: 14px 32px;
    width: 100%; display: block;
    border-bottom: 1px solid rgba(240,237,232,0.05);
  }
}

/* ============================================================
   뉴스 티커 바
   ============================================================ */
.ht-ticker {
  background: var(--ht-red);
  overflow: hidden; padding: 9px 0;
  margin-top: 72px;
}
.ht-ticker__label {
  background: rgba(0,0,0,0.25);
  padding: 0 16px;
  font-size: 11px; font-weight: 900;
  letter-spacing: 2px; text-transform: uppercase;
  display: inline-flex; align-items: center;
  height: 100%;
  position: absolute; left: 0; top: 0;
  color: var(--ht-white);
}
.ht-ticker__wrap {
  overflow: hidden;
  position: relative;
  padding-left: 100px;
}
.ht-ticker__inner {
  display: inline-block;
  white-space: nowrap;
  animation: ht-ticker 40s linear infinite;
}
.ht-ticker__inner span {
  padding: 0 32px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.92);
}
.ht-ticker__inner span.sep { color: rgba(255,255,255,0.3); padding: 0; }
@keyframes ht-ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   Hero 首屏
   ============================================================ */
.ht-hero {
  min-height: 90vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  position: relative; overflow: hidden;
  padding: 80px 0;
  background: var(--ht-dark);
}

.ht-hero__bg-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 80% at 70% 50%, rgba(232,0,28,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(255,107,0,0.05) 0%, transparent 50%);
}
.ht-hero__bg-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(232,0,28,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,0,28,0.035) 1px, transparent 1px);
  background-size: 60px 60px;
}

.ht-hero__content {
  padding: 0 80px;
  position: relative; z-index: 2;
  animation: ht-fadeup 0.8s ease both;
}

.ht-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--ht-red); font-weight: 700;
  margin-bottom: 22px;
}
.ht-hero__eyebrow::before {
  content: ''; width: 28px; height: 2px; background: var(--ht-red);
}

.ht-hero__title { margin-bottom: 22px; }
.ht-hero__title em { color: var(--ht-red); font-style: normal; display: block; }

.ht-hero__desc {
  font-size: 15px; line-height: 1.85;
  color: rgba(240,237,232,0.6);
  max-width: 460px; margin-bottom: 36px;
}

.ht-hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.ht-hero__media {
  position: relative; z-index: 2;
  padding: 0 48px 0 24px;
  animation: ht-fadeup 0.8s 0.3s ease both;
}

.ht-hero__stats {
  display: flex; gap: 36px;
  margin-top: 48px; padding-top: 40px;
  border-top: 1px solid rgba(240,237,232,0.1);
}
.ht-stat__num {
  font-family: var(--ht-font-disp);
  font-size: 38px; letter-spacing: 2px; color: var(--ht-white); line-height: 1;
}
.ht-stat__num span { color: var(--ht-red); }
.ht-stat__label { font-size: 11px; color: var(--ht-muted); letter-spacing: 1px; margin-top: 5px; }

@media (max-width: 1024px) {
  .ht-hero { grid-template-columns: 1fr; }
  .ht-hero__content { padding: 60px 40px 40px; }
  .ht-hero__media { padding: 0 40px 60px; }
}

/* ============================================================
   버튼 시스템
   ============================================================ */
.ht-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 14px 32px;
  border: none; cursor: pointer;
  transition: all var(--ht-transition);
  position: relative; overflow: hidden;
  text-decoration: none;
}
.ht-btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.08);
  transform: translateX(-100%);
  transition: transform 0.3s;
}
.ht-btn:hover::after { transform: translateX(0); }

.ht-btn--primary { background: var(--ht-red); color: var(--ht-white); }
.ht-btn--primary:hover { background: #cc0018; color: var(--ht-white); }

.ht-btn--outline {
  background: transparent;
  border: 1px solid rgba(240,237,232,0.2);
  color: var(--ht-light);
}
.ht-btn--outline:hover { border-color: var(--ht-red); color: var(--ht-red); }

.ht-btn--ghost { background: transparent; color: var(--ht-red); padding-left: 0; }
.ht-btn--ghost:hover { color: var(--ht-accent); }
.ht-btn--ghost::after { display: none; }

/* ============================================================
   분류 탭
   ============================================================ */
.ht-tabs {
  display: flex; gap: 0; margin-bottom: 36px;
  border-bottom: 1px solid rgba(240,237,232,0.08);
  overflow-x: auto;
}
.ht-tab {
  padding: 12px 22px;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ht-muted); cursor: pointer; font-weight: 700;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap;
  transition: all var(--ht-transition);
  background: none; border-top: none; border-left: none; border-right: none;
}
.ht-tab:hover { color: var(--ht-light); }
.ht-tab.is-active,
.ht-tab.current { color: var(--ht-red); border-bottom-color: var(--ht-red); }

/* ============================================================
   섹션 헤더
   ============================================================ */
.ht-section { padding: 90px 0; }
.ht-section--alt { background: var(--ht-charcoal); }
.ht-section--tight { padding: 60px 0; }

.ht-section__label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--ht-red); font-weight: 700;
  margin-bottom: 14px;
}
.ht-section__label::after { content: ''; width: 40px; height: 1px; background: var(--ht-red); }
.ht-section__title { margin-bottom: 14px; }
.ht-section__sub {
  font-size: 15px; color: var(--ht-muted);
  max-width: 520px; line-height: 1.75;
}
.ht-section__header {
  display: flex; align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px; flex-wrap: wrap; gap: 20px;
}

/* ============================================================
   文章 카드
   ============================================================ */
.ht-card {
  background: var(--ht-charcoal);
  border: 1px solid rgba(240,237,232,0.07);
  overflow: hidden;
  transition: border-color var(--ht-transition), transform var(--ht-transition);
  position: relative;
}
.ht-card:hover {
  border-color: rgba(232,0,28,0.35);
  transform: translateY(-4px);
}
.ht-card:hover .ht-card__img img { transform: scale(1.05); }

.ht-card__img {
  aspect-ratio: 16/9; overflow: hidden;
  background: var(--ht-mid);
  position: relative;
}
.ht-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }

.ht-card__cat {
  position: absolute; top: 14px; left: 14px;
  background: var(--ht-red);
  color: var(--ht-white);
  font-size: 10px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase;
  padding: 4px 10px;
}

.ht-card__body { padding: 22px 24px 26px; }
.ht-card__meta {
  font-size: 11px; color: var(--ht-muted);
  letter-spacing: 1px; margin-bottom: 10px;
  display: flex; gap: 12px; align-items: center;
}
.ht-card__title { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.ht-card__title a { color: var(--ht-white); }
.ht-card__title a:hover { color: var(--ht-red); }
.ht-card__excerpt { font-size: 13px; line-height: 1.7; color: rgba(240,237,232,0.5); }

/* Featured card */
.ht-card--featured { grid-column: span 2; display: grid; grid-template-columns: 1.4fr 1fr; }
.ht-card--featured .ht-card__img { aspect-ratio: auto; min-height: 300px; }
.ht-card--featured .ht-card__title { font-size: 22px; }

/* ============================================================
   주요 뉴스 헤드라인
   ============================================================ */
.ht-headline-list { border-top: 1px solid rgba(240,237,232,0.07); }
.ht-headline-item {
  display: flex; align-items: baseline; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(240,237,232,0.05);
  transition: padding-left var(--ht-transition);
}
.ht-headline-item:hover { padding-left: 6px; }
.ht-headline-item__cat {
  font-size: 10px; font-weight: 900; letter-spacing: 2px;
  color: var(--ht-red); white-space: nowrap; min-width: 48px;
}
.ht-headline-item__title { font-size: 14px; color: var(--ht-light); line-height: 1.4; }
.ht-headline-item__title a { color: inherit; }
.ht-headline-item__title a:hover { color: var(--ht-red); }
.ht-headline-item__time {
  font-size: 11px; color: var(--ht-muted); white-space: nowrap; margin-left: auto;
}

/* ============================================================
   SEO 메타 정보 박스 (管理员用)
   ============================================================ */
.ht-seo-box {
  background: var(--ht-mid);
  border-left: 3px solid var(--ht-red);
  padding: 20px 24px;
  margin: 32px 0;
}
.ht-seo-box__label { font-size: 10px; letter-spacing: 2px; color: var(--ht-red); font-weight: 700; margin-bottom: 8px; }
.ht-seo-box p { font-size: 13px; margin: 0; color: rgba(240,237,232,0.7); }

/* ============================================================
   分页
   ============================================================ */
.ht-pagination {
  display: flex; justify-content: center; gap: 8px;
  padding: 48px 0 0;
}
.ht-pagination a,
.ht-pagination span {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(240,237,232,0.1);
  font-size: 13px; color: var(--ht-muted);
  transition: all var(--ht-transition);
}
.ht-pagination a:hover { border-color: var(--ht-red); color: var(--ht-red); }
.ht-pagination .current { background: var(--ht-red); border-color: var(--ht-red); color: var(--ht-white); }

/* ============================================================
   侧边栏 Widget
   ============================================================ */
.ht-widget { margin-bottom: 36px; }
.ht-widget__title {
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ht-white); font-weight: 700; margin-bottom: 18px;
  padding-bottom: 12px; border-bottom: 1px solid rgba(240,237,232,0.08);
  position: relative;
}
.ht-widget__title::after {
  content: ''; position: absolute;
  bottom: -1px; left: 0; width: 32px; height: 2px;
  background: var(--ht-red);
}

/* 热门文章 Widget */
.ht-popular-item {
  display: flex; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid rgba(240,237,232,0.05);
  align-items: flex-start;
}
.ht-popular-item:last-child { border-bottom: none; }
.ht-popular-item__rank {
  font-family: var(--ht-font-disp);
  font-size: 24px; color: rgba(240,237,232,0.1);
  line-height: 1; min-width: 28px;
}
.ht-popular-item:first-child .ht-popular-item__rank { color: var(--ht-red); }
.ht-popular-item__title { font-size: 13px; color: var(--ht-light); line-height: 1.5; }
.ht-popular-item__title a { color: inherit; }
.ht-popular-item__title a:hover { color: var(--ht-red); }

/* ============================================================
   页脚
   ============================================================ */
.ht-footer {
  background: var(--ht-charcoal);
  border-top: 1px solid rgba(240,237,232,0.07);
  padding: 64px 0 0;
}
.ht-footer__grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1fr;
  gap: 56px; padding-bottom: 48px;
}
.ht-footer__brand p {
  font-size: 14px; line-height: 1.8; color: var(--ht-muted);
  margin-top: 16px; max-width: 280px;
}
.ht-footer__col h4 {
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ht-white); margin-bottom: 18px; font-family: var(--ht-font-body);
}
.ht-footer__col ul li { margin-bottom: 8px; }
.ht-footer__col ul a { font-size: 13px; color: var(--ht-muted); }
.ht-footer__col ul a:hover { color: var(--ht-red); }

.ht-footer__bottom {
  padding: 24px 0;
  border-top: 1px solid rgba(240,237,232,0.07);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.ht-footer__copy { font-size: 12px; color: var(--ht-muted); }
.ht-footer__seo-keywords { font-size: 11px; color: rgba(136,136,136,0.4); }

@media (max-width: 1024px) { .ht-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .ht-footer__grid { grid-template-columns: 1fr; gap: 32px; } }

/* ============================================================
   애니메이션
   ============================================================ */
@keyframes ht-fadeup {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ht-animate {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.ht-animate.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   工具类
   ============================================================ */
.ht-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,0,28,0.3), transparent);
  margin: 0;
}
.ht-badge {
  display: inline-block; padding: 3px 10px;
  font-size: 10px; font-weight: 900; letter-spacing: 1px;
}
.ht-badge--red   { background: rgba(232,0,28,0.12); color: var(--ht-red); }
.ht-badge--green { background: rgba(52,168,83,0.12); color: #34A853; }
.ht-badge--blue  { background: rgba(35,164,247,0.12); color: #23A4F7; }
.ht-badge--gold  { background: rgba(200,168,75,0.12); color: var(--ht-gold); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
