/*
Theme Name: 好体育 HaoTiyu
Theme URI: https://hty.com
Author: HaoTiyu Team
Author URI: https://hty.com
Description: 好体育专业体育资讯主题。支持好体育官网、App、登录、下载、直播、比分、入口、手机版等关键词优化。首页模块丰富（最新资讯、赛程、平台活动、客户评价、常见问题），响应式布局，内置底部广告栏与立即注册入口。支持一键生成栏目与示例文章。
Version: 1.1.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: haotiyu
Tags: blog, news, sports, custom-menu, featured-images, threaded-comments, translation-ready, two-columns
*/

/* ========== Reset & Base ========== */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  padding:0;
  padding-bottom:110px;
  background:#F7F4F5;
  color:#1A0C10;
  font:16px/1.7 "PingFang SC","HarmonyOS Sans SC","Noto Sans SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;
}
a{color:inherit;text-decoration:none}
a:hover{color:#BE123C}
img{max-width:100%;height:auto;border:0;display:block}
h1,h2,h3,h4,p,ul,ol{margin:0;padding:0}
ul,ol{list-style:none}
button{font-family:inherit;background:none;border:0;cursor:pointer}

/* ========== Layout ========== */
.wrap{max-width:1160px;margin:0 auto;padding:0 16px}
.site-main{padding:20px 0 0}

/* ========== Header ========== */
.site-header{
  position:sticky;top:0;z-index:100;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid #E8E4E6;
  box-shadow:0 1px 8px rgba(0,0,0,.04);
  backdrop-filter:blur(8px);
}
.header-inner{
  display:flex;align-items:center;gap:10px;
  height:60px;
}
.site-branding{flex-shrink:0}
.brand-link{display:flex;align-items:center;gap:8px;text-decoration:none}
.site-logo-mark{
  width:36px;height:36px;border-radius:10px;
  background:linear-gradient(145deg,#BE123C,#881337);
  color:#fff;display:flex;align-items:center;justify-content:center;
  font-weight:800;font-size:14px;
  box-shadow:0 4px 12px rgba(190,18,60,.35);
}
.site-title-wrap{display:flex;flex-direction:column;line-height:1.15}
.site-title{font-size:16px;font-weight:700;color:#1A0C10}
.site-description{font-size:10px;letter-spacing:.12em;color:#6B7280;font-weight:700}

.main-nav{display:flex;gap:2px;flex:1;min-width:0;overflow-x:auto;padding:4px 0}
.main-nav a,.main-nav .menu-item a{
  display:inline-block;padding:8px 12px;border-radius:20px;
  font-size:14px;font-weight:600;white-space:nowrap;color:#1A0C10;
}
.main-nav a:hover,.main-nav .current-menu-item > a,.main-nav .current_page_item > a,
.main-nav .menu-item.current-menu-item > a{
  background:#BE123C;color:#fff;
}

.header-actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex-shrink:0}

.btn-register{
  display:inline-flex;align-items:center;justify-content:center;
  height:36px;padding:0 16px;border-radius:999px;
  background:linear-gradient(135deg,#BE123C,#9F1239);
  color:#fff!important;font-size:13px;font-weight:700;
  box-shadow:0 4px 14px rgba(190,18,60,.4);white-space:nowrap;
}
.btn-register:hover{filter:brightness(1.08);color:#fff!important}

/* 汉堡按钮 - 默认隐藏，手机显示 */
.burger{
  display:none;width:40px;height:40px;padding:0;
  border:1px solid #E8E4E6;border-radius:10px;background:#fff;
  flex-direction:column;align-items:center;justify-content:center;gap:5px;
}
.burger span{display:block;width:18px;height:2px;background:#1A0C10;border-radius:2px;transition:transform .2s,opacity .2s}
.burger[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.burger[aria-expanded="true"] span:nth-child(2){opacity:0}
.burger[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* 手机端下拉菜单 */
.mobile-nav{
  display:none;background:#fff;border-top:1px solid #E8E4E6;
  box-shadow:0 10px 24px rgba(16,24,40,.08);padding:8px 0 12px;
}
.mobile-nav.open{display:block}
.mobile-nav a,.mobile-nav .menu-item a{
  display:block;padding:13px 18px;border-bottom:1px solid #F0EBED;
  font-size:15px;font-weight:650;color:#1f2937;
}
.mobile-nav a:last-child,.mobile-nav .menu-item:last-child a{border-bottom:0}
.mobile-nav a:hover,.mobile-nav .current-menu-item > a{color:#BE123C;background:#FDF2F4}
.mobile-nav .mobile-reg{
  margin:10px 16px 0;text-align:center;border-radius:999px;
  background:linear-gradient(135deg,#BE123C,#9F1239);color:#fff!important;
  font-weight:700;border:0!important;
}

/* ========== Hero ========== */
.hero{
  background:linear-gradient(135deg,#BE123C 0%,#881337 55%,#4C0519 100%);
  border-radius:18px;padding:28px 24px;color:#fff;margin-bottom:22px;
  box-shadow:0 10px 28px rgba(190,18,60,.25);
}
.hero-label{font-size:13px;opacity:.9;letter-spacing:.08em;margin-bottom:8px}
.hero h1{margin:0 0 10px;font-size:26px;line-height:1.3;font-weight:800}
.hero p{margin:0 0 16px;font-size:15px;opacity:.95;max-width:720px;line-height:1.65}
.hero-actions{display:flex;flex-wrap:wrap;gap:10px}
.hero-btn{
  display:inline-flex;align-items:center;padding:10px 18px;border-radius:999px;
  font-weight:700;font-size:14px;
}
.hero-btn-primary{background:#fff;color:#BE123C}
.hero-btn-ghost{background:rgba(255,255,255,.18);color:#fff;border:1px solid rgba(255,255,255,.35)}

/* ========== Grid & Cards ========== */
.content-grid{display:flex;flex-wrap:wrap;gap:20px}
.main-col{flex:1;min-width:280px}
.side-col{width:320px;max-width:100%;flex-shrink:0}

.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.section-head h2{margin:0;font-size:18px;font-weight:800}
.section-head a{font-size:13px;color:#BE123C;font-weight:600}

.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px;margin-bottom:24px}
.card{
  display:block;background:#fff;border:1px solid #E8E4E6;border-radius:14px;
  padding:16px 18px;box-shadow:0 2px 8px rgba(0,0,0,.03);
  transition:box-shadow .2s,transform .2s;
}
.card:hover{box-shadow:0 6px 20px rgba(0,0,0,.08);transform:translateY(-2px)}
.card-meta{font-size:12px;color:#BE123C;font-weight:700;margin-bottom:6px}
.card h3{margin:0 0 8px;font-size:16px;line-height:1.4;color:#1A0C10}
.card p{margin:0;font-size:13.5px;color:#6B7280;line-height:1.55}

/* ========== Widget / Side boxes ========== */
.side-box{
  background:#fff;border:1px solid #E8E4E6;border-radius:14px;
  padding:16px 18px;margin-bottom:16px;
}
.side-box h3{margin:0 0 10px;font-size:15px;font-weight:800}
.side-item{padding:12px 0;border-bottom:1px solid #F0EBED}
.side-item:last-child{border-bottom:0}
.side-item b{display:block;font-size:14px;margin-bottom:4px}
.side-item span,.side-item p{font-size:13px;color:#6B7280}

/* FAQ */
.faq details{border-bottom:1px solid #F0EBED;padding:10px 0}
.faq summary{cursor:pointer;font-weight:700;font-size:14px;list-style:none;outline:none}
.faq summary::-webkit-details-marker{display:none}
.faq p{margin:8px 0 0;font-size:13.5px;color:#6B7280;line-height:1.6}

/* Match list */
.match-list .match-row{
  display:flex;align-items:center;justify-content:space-between;
  padding:11px 0;border-bottom:1px solid #F0EBED;gap:8px;
}
.match-list .league{font-size:12px;color:#BE123C;font-weight:700;min-width:36px}
.match-list .teams{flex:1;font-size:14px;font-weight:600}
.match-list .time{font-size:13px;color:#6B7280}
.match-list .status{font-size:12px;font-weight:700}
.status-live{color:#BE123C}
.status-soon{color:#6B7280}

/* ========== Post / Article ========== */
.entry{
  background:#fff;border:1px solid #E8E4E6;border-radius:16px;
  padding:24px 22px;margin-bottom:20px;
}
.entry-meta{font-size:13px;color:#BE123C;font-weight:700;margin-bottom:8px}
.entry-title{margin:0 0 12px;font-size:24px;line-height:1.35;font-weight:800}
.entry-excerpt{margin:0 0 18px;font-size:15px;color:#6B7280;line-height:1.6}
.entry-content{font-size:16px;line-height:1.8}
.entry-content p{margin:0 0 14px}
.entry-content h2{margin:20px 0 10px;font-size:18px;font-weight:800}
.entry-footer{margin-top:24px;padding-top:16px;border-top:1px solid #F0EBED;display:flex;flex-wrap:wrap;gap:10px}

.btn{
  display:inline-block;padding:8px 14px;border:1px solid #E8E4E6;border-radius:10px;
  background:#fff;font-size:13px;color:#1A0C10;
}
.btn-primary{border:none;background:#BE123C;color:#fff;font-weight:600}

/* Archive list */
.archive-list .list-item{
  display:block;background:#fff;border:1px solid #E8E4E6;border-radius:12px;
  padding:16px 18px;margin-bottom:12px;
}
.archive-list .list-item:hover{border-color:#BE123C}
.list-meta{font-size:12px;color:#BE123C;font-weight:700;margin-bottom:6px}
.list-title{margin:0 0 6px;font-size:17px;line-height:1.4}
.list-excerpt{margin:0;font-size:13.5px;color:#6B7280}

/* Pagination */
.pagination{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.pagination a,.pagination span{
  padding:8px 14px;border:1px solid #E8E4E6;border-radius:10px;
  background:#fff;font-size:13px;
}
.pagination .current{border-color:#BE123C;background:#BE123C;color:#fff;font-weight:600}

/* Breadcrumb */
.breadcrumb{font-size:13px;color:#6B7280;margin-bottom:14px}
.breadcrumb a{color:#BE123C;font-weight:600}

/* ========== Footer ========== */
.site-footer{
  background:#0F172A;color:#94A3B8;padding:32px 0 28px;font-size:13px;margin-top:40px;
}
.footer-grid{display:flex;flex-wrap:wrap;gap:24px;justify-content:space-between;margin-bottom:20px}
.footer-col{min-width:140px}
.footer-col h4{font-size:14px;font-weight:700;color:#E2E8F0;margin-bottom:8px}
.footer-col a{display:block;color:#CBD5E1;margin-bottom:6px}
.footer-col a:hover{color:#fff}
.footer-keywords span{
  display:inline-block;margin:0 6px 6px 0;padding:3px 8px;
  background:#1E293B;border-radius:6px;font-size:12px;color:#94A3B8;
}
.footer-bottom{
  border-top:1px solid #1E293B;padding-top:16px;
  display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;align-items:center;
}

/* ========== Bottom Ad Bar - 电脑端缩小比例 ========== */
#haoAd{
  position:fixed;left:0;right:0;bottom:0;z-index:99999;
  text-align:center;line-height:0;pointer-events:none;
}
#haoAdInner{
  display:inline-block;position:relative;pointer-events:none;
  max-width:900px;
  width:100%;
}
#haoAdBtn{
  pointer-events:auto;position:absolute;left:50%;transform:translateX(-50%);
  top:-26px;z-index:2;display:inline-block;margin:0;padding:2px 16px;
  border:1px solid rgba(0,0,0,.15);border-bottom:0;border-radius:8px 8px 0 0;
  background:rgba(255,255,255,.96);color:#333;
  font:12px/20px "PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  letter-spacing:.1em;cursor:pointer;box-shadow:0 -2px 8px rgba(0,0,0,.08);
}
#haoAdLink{pointer-events:auto;display:block;line-height:0}
#haoAdLink img{
  display:block;width:100%;max-width:900px;height:auto;margin:0 auto;border:0;
}
#haoShowBtn{
  display:none;position:fixed;left:50%;transform:translateX(-50%);
  bottom:12px;z-index:99999;pointer-events:auto;
}
#haoShowBtn button{
  padding:6px 22px;border:1px solid rgba(0,0,0,.18);border-radius:20px;
  background:rgba(255,255,255,.96);color:#333;
  font:13px/1.4 "PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  letter-spacing:.08em;cursor:pointer;box-shadow:0 2px 12px rgba(0,0,0,.12);
}

/* ========== Responsive ========== */
@media (max-width:900px){
  .content-grid{flex-direction:column}
  .side-col{width:100%}
  .main-nav{display:none}
  .burger{display:flex}
  .hero h1{font-size:22px}
  .header-inner{height:56px}
  /* 手机端立即注册往左移一点 */
  .btn-register{
    margin-right:4px;
    height:32px;padding:0 12px;font-size:12.5px;
  }
  .header-actions{gap:6px}
  #haoAdInner,#haoAdLink img{max-width:100%}
  body{padding-bottom:100px}
}

@media (max-width:480px){
  .btn-register{padding:0 10px;font-size:12px}
  .site-title{font-size:15px}
  .hero{padding:20px 16px}
}

/* WP specific */
.alignleft{float:left;margin:0 1em 1em 0}
.alignright{float:right;margin:0 0 1em 1em}
.aligncenter{display:block;margin-left:auto;margin-right:auto}
.wp-caption{max-width:100%}
.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}
