/* ============================================================
   GameDrey 游戏小窝 - gamedrey.com
   主样式表（品牌色取自 Logo：橙 #F97316 / 深藏青 #12244C / 奶油 #FBE9CE）
   ============================================================ */

:root {
  --c-primary: #f97316;      /* 松鼠橙 */
  --c-primary-dark: #ea580c;
  --c-primary-light: #fdba74;
  --c-navy: #12244c;         /* 深藏青 */
  --c-navy-deep: #0b1838;
  --c-cream: #fbe9ce;        /* 奶油色 */
  --c-bg: #f5f7fb;
  --c-card: #ffffff;
  --c-text: #1e293b;
  --c-text-light: #64748b;
  --c-border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(18, 36, 76, .08);
  --shadow-hover: 0 8px 24px rgba(249, 115, 22, .22);
  --container: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* ---------- 广告位通用样式 ---------- */
.ad-banner-top {
  background: #eef1f6;
  border-bottom: 1px solid var(--c-border);
  display: flex; justify-content: center;
  padding: 8px 0;
  position: relative;
}
.ad-tag {
  position: absolute; top: 2px; left: 6px;
  font-size: 10px; color: #94a3b8;
  background: #e2e8f0; padding: 0 5px; border-radius: 3px;
  z-index: 1; line-height: 1.5;
}
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; font-size: 13px; text-align: center;
  background: repeating-linear-gradient(45deg, #f1f5f9, #f1f5f9 12px, #e9eef5 12px, #e9eef5 24px);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}
.ad-slot--leaderboard { width: 728px; max-width: 96vw; height: 90px; }
.ad-slot--infeed { width: 100%; height: 120px; }
.ad-slot--square { width: 300px; height: 250px; }
.ad-slot--skyscraper { width: 300px; height: 600px; }
/* 已投放真实广告：去掉占位斜纹与虚线边框，高度自适应 */
.ad-slot--live {
  display: block;
  background: transparent;
  border: 0;
  height: auto;
  min-height: 90px;
}
.ad-infeed { position: relative; margin: 24px 0; }
.ad-side { position: relative; margin-bottom: 16px; }

/* ---------- 头部 ---------- */
.site-header {
  background: var(--c-navy);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  height: 68px;
}
/* ---------- 品牌区：图标 + 艺术化网址字标 ---------- */
.brand {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 11px;
}
.brand-icon {
  height: 46px; width: 46px;
  border-radius: 13px;
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
  transition: .3s;
}
.brand:hover .brand-icon { transform: rotate(-7deg) scale(1.06); }

.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wm-main {
  font-family: "Segoe UI", "Trebuchet MS", "PingFang SC", sans-serif;
  font-size: 27px; font-weight: 800; letter-spacing: .5px;
  /* 渐变文字：奶油 → 浅橙 → 松鼠橙 */
  background: linear-gradient(100deg, #fde8c8 0%, #fdba74 45%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 4px rgba(249, 115, 22, .35));
}
.wm-accent { }
.wm-tld {
  font-size: 15px; font-weight: 700; letter-spacing: 1.5px;
  background: linear-gradient(100deg, #fdba74 0%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: 1px;
}
.wm-sub {
  margin-top: 4px;
  font-size: 10px; letter-spacing: 2.5px;
  color: #8fa2c6; font-weight: 500;
}

.main-nav { flex: 1; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a {
  color: #dbe4f5; padding: 8px 14px; border-radius: 8px;
  font-size: 15px; font-weight: 500; transition: .2s;
}
.main-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.main-nav a.active { color: var(--c-primary-light); }

.search-box {
  display: flex; align-items: center;
  background: rgba(255,255,255,.12);
  border-radius: 999px; padding: 4px 4px 4px 14px;
  width: 220px;
}
.search-box input {
  flex: 1; background: none; border: none; outline: none;
  color: #fff; font-size: 14px; min-width: 0;
}
.search-box input::placeholder { color: #93a5c8; }
.search-box button {
  background: var(--c-primary); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: .2s;
}
.search-box button:hover { background: var(--c-primary-dark); }

/* 语言切换器 */
.lang-switch {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.12);
  border-radius: 999px; padding: 4px 10px;
}
.lang-ico { color: #c3cfe8; flex-shrink: 0; }
.lang-switch select {
  background: transparent; border: none; outline: none;
  color: #fff; font-size: 13px; cursor: pointer;
  max-width: 118px; font-family: inherit;
}
.lang-switch select option { background: var(--c-navy); color: #fff; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2.5px; background: #fff; margin: 4.5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-navy-deep) 60%, #1a3468 100%);
  color: #fff; overflow: hidden;
}
.hero-inner {
  display: flex; align-items: center; gap: 40px;
  padding-top: 48px; padding-bottom: 48px;
}
.hero-text { flex: 1.4; }
.hero h1 { font-size: clamp(26px, 4vw, 42px); line-height: 1.25; }
.hero h1 .accent { color: var(--c-primary); }
.hero-slogan {
  margin: 10px 0 14px;
  font-size: clamp(16px, 2.2vw, 21px);
  color: var(--c-primary-light); font-weight: 600;
}
.hero-desc { color: #c3cfe8; font-size: 15px; max-width: 560px; }
.hero-desc b { color: var(--c-cream); }

.btn {
  padding: 11px 26px; border-radius: 999px;
  font-size: 15px; font-weight: 600; transition: .2s;
}
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: 0 4px 14px rgba(249,115,22,.4); }
.btn-primary:hover { background: var(--c-primary-dark); transform: translateY(-2px); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.4); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }

.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats b { font-size: 24px; color: var(--c-primary-light); }
.hero-stats span { font-size: 13px; color: #93a5c8; }

.hero-art { flex: 1; display: flex; justify-content: center; }
.hero-mascot {
  width: min(420px, 100%);
  background: #fffdf8;
  padding: 18px 26px;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- 布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding-top: 28px; padding-bottom: 40px;
}

/* ---------- 游戏区块 ---------- */
.game-section { margin-bottom: 36px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
}
.section-head h2 { font-size: 22px; color: var(--c-navy); }
.more { color: var(--c-primary); font-size: 14px; font-weight: 500; }
.more:hover { color: var(--c-primary-dark); }
.count-tag { font-size: 13px; color: var(--c-text-light); }

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.game-card {
  background: var(--c-card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: .25s; cursor: pointer;
  display: block; position: relative;
}
.game-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.game-thumb {
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
  background-size: cover;
  background-position: center;
}
.game-thumb::after {
  content: "▶";
  position: absolute;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: .25s; text-shadow: none;
}
.game-card:hover .game-thumb::after { opacity: 1; }
.game-info { padding: 9px 11px 11px; }
.game-info h3 { font-size: 14px; color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-info p { font-size: 12px; color: var(--c-text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 关于 ---------- */
.about-section {
  background: var(--c-card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 28px;
}
.about-section h2 { color: var(--c-navy); margin-bottom: 12px; font-size: 20px; }
.about-section p { color: #475569; margin-bottom: 10px; font-size: 14.5px; }

/* ---------- 侧边栏 ---------- */
.widget {
  background: var(--c-card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px;
}
.widget h3 { font-size: 16px; color: var(--c-navy); margin-bottom: 12px; }

.rank-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px dashed var(--c-border);
  font-size: 14px;
}
.rank-list li:last-child { border-bottom: none; }
.rank-no {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  background: #e2e8f0; color: var(--c-text-light);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rank-list li:nth-child(-n+3) .rank-no { background: var(--c-primary); color: #fff; }
.rank-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-hot { font-size: 11px; color: #f97316; }

.pick-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; font-size: 14px; cursor: pointer;
}
.pick-ico {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.pick-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-list li:hover .pick-title { color: var(--c-primary); }

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--c-navy-deep); color: #93a5c8;
  padding: 40px 0 0; font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 30px; padding-bottom: 30px;
}
.footer-logo {
  height: 38px; width: auto;
  background: var(--c-cream);
  padding: 5px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.footer-brand p { font-size: 13px; max-width: 300px; }
.footer-col h4 { color: #dbe4f5; font-size: 15px; margin-bottom: 12px; }
.footer-col li { margin-bottom: 8px; }
.footer-col a:hover { color: var(--c-primary-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 0; text-align: center; font-size: 13px;
}
.footer-bottom a:hover { color: var(--c-primary-light); }
.footer-links { margin-top: 6px; }

/* ---------- RTL（阿拉伯语 / 乌尔都语） ---------- */
[dir="rtl"] .ad-tag { left: auto; right: 6px; }
[dir="rtl"] .search-box { padding: 4px 14px 4px 4px; }
[dir="rtl"] .brand-icon { box-shadow: 0 3px 10px rgba(0,0,0,.35); }
[dir="rtl"] .wm-tld { margin-left: 0; margin-right: 1px; }
[dir="rtl"] .hero-stats b { direction: ltr; display: inline-block; }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero-inner { flex-direction: column; text-align: center; padding-top: 34px; padding-bottom: 34px; }
  .hero-desc { margin: 0 auto; }
  .hero-stats { justify-content: center; }
  .hero-art { order: -1; }
  .hero-mascot { width: 240px; padding: 10px 14px; border-radius: 16px; }

  .nav-toggle { display: block; margin-left: auto; }
  .search-box { display: none; }
  .lang-switch { padding: 3px 7px; }
  .lang-switch select { max-width: 86px; font-size: 12px; }
  .main-nav {
    display: none;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--c-navy);
    padding: 10px 16px 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,.3);
  }
  body.nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav a { display: block; padding: 12px 14px; }

  .ad-slot--skyscraper { width: 300px; height: 250px; } /* 移动端降级为方图 */
}
@media (max-width: 480px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-icon { height: 38px; width: 38px; border-radius: 11px; }
  .wm-main { font-size: 21px; }
  .wm-tld { font-size: 12px; }
  .wm-sub { display: none; }
}
