/* 1. 声明你的自定义字体 */
/* 英文字体 */
@font-face {
  font-family: "EngFont";
  src: url("../fonts/Techno.ttf") format("truetype");
  font-weight: normal;
}

/* 中文字体 */
@font-face {
  font-family: "CNFont";
  src: url("../fonts/lianmengqiyi.ttf") format("truetype");
  font-weight: normal;
}

/* 2. 全站强制使用你自己的字体 */
* {
  font-family: "EngFont", "CNFont", sans-serif;
  font-smoothing: antialiased;
  -webkit-font-smoothing: antialiased;
}

/* 全局字体替换 - 对标Stellaris官网风格 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  letter-spacing: 0.5px;
}

body {
  background-color: #000;
  color: #fff;
}

/* 单独强化标题/按钮的字体权重 */
h1, h2, h3, h4, .nav-link, .btn-download, .lang-btn, .load-more-btn {
  font-weight: 600;
  text-transform: none;
}

p, span, div {
  font-weight: 400;
}

/* 導航欄 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0, 3, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 220, 255, 0.18);
  box-shadow: 0 2px 20px rgba(0, 150, 255, 0.08);
  z-index: 999;
  padding: 0;
  height: 80px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100% !important;
  padding: 0 30px;
  margin: 0;
  position: relative;
  height: 100%;
}

/* 左侧：Logo + 游戏名称 */
.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.nav-logo {
  height: 48px;
  filter: drop-shadow(0 0 8px rgba(0,230,255,0.35));
}

.game-title {
  font-size: 22px;
  font-weight: bold;
  color: #0ef;
  text-shadow: 0 0 10px rgba(0,230,255,0.4);
  letter-spacing: 1px;
}

/* 中间：菜单绝对居中 */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 14px;
  margin: 0;
  padding: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* 导航菜单按钮样式 */
.nav-link {
  color: #c8efff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  padding: 12px 18px;
  border: 1px solid rgba(0,180,255,0.25);
  border-radius: 4px;
  transition: all 0.3s ease;
  text-shadow: 0 0 6px rgba(0,200,255,0.3);
}
.nav-link:hover,
.nav-link.active {
  color: #0ef;
  border-color: rgba(0,220,255,0.6);
  background: rgba(0,120,255,0.1);
  box-shadow: 0 0 14px rgba(0,220,255,0.35);
}

/* 右侧：语言 + 下载按钮 */
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}

/* 语言按钮 */
.lang-btn {
  background: rgba(0,100,180,0.15);
  border: 1px solid rgba(0,180,255,0.35);
  color: #c8efff;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.3s;
}
.lang-btn:hover {
  background: rgba(0,150,255,0.25);
  color: #0ef;
  box-shadow: 0 0 10px rgba(0,180,255,0.3);
}

/* 下载游戏按钮 */
.btn-download {
  background: linear-gradient(135deg, rgba(0,180,255,0.25), rgba(0,120,200,0.15));
  border: 1px solid rgba(0,220,255,0.35);
  color: #0ef;
  padding: 12px 22px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s ease;
}

/* 滚动时导航加深 */
.navbar.scrolled {
  background: rgba(0, 2, 8, 0.95);
  border-bottom: 1px solid rgba(0, 220, 255, 0.25);
}

/* 语言高亮 */
.lang-active {
  color: #0ef !important;
  font-weight: bold;
  text-shadow: 0 0 8px #0ef;
}
.lang-inactive {
  color: #666 !important;
}

/* 首頁影片 (完全不改动) */
.hero-video {
  height:100vh; position:relative; overflow:hidden;
}
#bg-video { width:100%; height:100%; object-fit:cover; }
.hero-overlay {
  position:absolute; top:0; left:0; width:100%; height:100%;
  background:rgba(0,0,0,0.5);
}
.hero-content {
  position:absolute; top:50%; left:50%;
  transform:translate(-50%,-50%); text-align:center;
}
.hero-content h1 { font-size:60px; text-shadow:0 0 20px #0ef; }
.btn-cta {
  background:linear-gradient(90deg,#0ef,#f90);
  border:none; padding:14px 24px; border-radius:6px;
  font-weight:bold; cursor:pointer; margin-top:20px;
}

.pulse { animation:pulse 2s infinite; }
@keyframes pulse {
  0%{box-shadow:0 0 0 0 rgba(0,255,255,0.6)}
  70%{box-shadow:0 0 0 15px rgba(0,255,255,0)}
}

/* ========== ✅ 加强版：纯CSS宇宙星云 + 星光（效果拉满） ========== */
.features, .races, .news {
  width: 100%;
  padding: 80px 0;
  text-align: center;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 🔥 加强：深邃星云 + 黑洞渐变（层次更强烈） */
.section-bg-lore {
  position: relative;
  background: 
    radial-gradient(circle at 15% 25%, rgba(0, 3, 12, 1) 0%, transparent 35%),
    radial-gradient(circle at 85% 75%, rgba(0, 4, 18, 1) 0%, transparent 35%),
    radial-gradient(circle at 35% 65%, rgba(0, 6, 24, 0.95) 0%, transparent 45%),
    radial-gradient(circle at 65% 15%, rgba(0, 8, 32, 0.9) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(0, 2, 8, 0.85) 0%, transparent 55%),
    linear-gradient(180deg, #000 0%, #02040a 30%, #050a1a 60%, #0a122e 100%);

  background-blend-mode: screen;
  box-shadow: inset 0 0 180px rgba(0, 120, 255, 0.15); /* 加强内发光 */
  border-top: 1px solid rgba(0,220,255,0.12);
  border-bottom: 1px solid rgba(0,150,255,0.15);
  overflow: hidden;
}

/* 🔥 超级加强：全屏闪烁星光（更密、更亮、动画更明显） */
.section-bg-lore::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff, transparent),
    radial-gradient(1px 1px at 30% 10%, #ffffffdd, transparent),
    radial-gradient(2px 2px at 50% 30%, #fff, transparent),
    radial-gradient(1px 1px at 75% 15%, #ffffffdd, transparent),
    radial-gradient(2px 2px at 90% 25%, #fff, transparent),
    radial-gradient(1px 1px at 15% 45%, #ffffffdd, transparent),
    radial-gradient(2px 2px at 35% 65%, #fff, transparent),
    radial-gradient(1px 1px at 60% 55%, #ffffffdd, transparent),
    radial-gradient(2px 2px at 80% 70%, #fff, transparent),
    radial-gradient(1px 1px at 20% 80%, #ffffffdd, transparent),
    radial-gradient(2px 2px at 40% 90%, #fff, transparent),
    radial-gradient(1px 1px at 70% 85%, #ffffffdd, transparent);

  opacity: 0.4; /* 更亮 */
  animation: twinkle 8s infinite alternate ease-in-out; /* 更快更明显 */
  z-index: 0;
}

@keyframes twinkle {
  0%   { opacity: 0.25; }
  50%  { opacity: 0.5; } /* 峰值更亮 */
  100% { opacity: 0.25; }
}

/* 板块标题 */
h2 { 
  font-size:36px; 
  color:#0ef; 
  margin-bottom:30px;
  position: relative;
  display: inline-block;
  padding: 0 20px;
  z-index: 2;
}
h2::before, h2::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #0ef);
}
h2::before { left: -70px; }
h2::after { right: -70px; background: linear-gradient(90deg, #0ef, transparent); }

/* 卡片科幻边框 + 四角装饰 */
.section-bg-lore .news-item,
.section-bg-lore .feature-card,
.section-bg-lore .race-card {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(0, 180, 255, 0.2);
  box-shadow: 
    0 0 10px rgba(0, 180, 255, 0.05),
    inset 0 0 15px rgba(0, 100, 200, 0.1);
  position: relative;
  overflow: hidden;
  z-index: 2;
}
.section-bg-lore .news-item::before,
.section-bg-lore .feature-card::before,
.section-bg-lore .race-card::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-top: 2px solid rgba(0,220,255,0.4);
  border-left: 2px solid rgba(0,220,255,0.4);
  top: 0; left: 0;
  opacity: 0.7;
}
.section-bg-lore .news-item::after,
.section-bg-lore .feature-card::after,
.section-bg-lore .race-card::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid rgba(0,220,255,0.4);
  border-right: 2px solid rgba(0,220,255,0.4);
  bottom: 0; right: 0;
  opacity: 0.7;
}

/* 遊戲特色 & 種族 */
.feature-grid, .races-grid {
  display:grid; 
  grid-template-columns:repeat(3,1fr); 
  gap:30px;
}
.feature-card, .race-card {
  padding:25px;
  border-radius:12px;
  transition: all 0.3s ease;
}
.feature-card:hover, .race-card:hover {
  border-color: rgba(0,220,255,0.5);
  box-shadow: 0 0 20px rgba(0,220,255,0.15);
  transform: translateY(-5px);
}
.race-card img {
  width:100%;
  height:220px;
  object-fit:cover;
  border-radius: 8px;
}

/* 新闻公告 */
.news-grid {
  display: grid;
  gap: 30px;
}
.news-item {
  border-radius: 12px;
  padding: 25px;
  display: flex;
  gap: 25px;
  align-items: flex-start;
  height: 200px !important;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}
.news-item:hover {
  border-color: rgba(0,220,255,0.5);
  box-shadow: 0 0 20px rgba(0,220,255,0.1);
}
.news-text { flex: 1; }
.news-text h3 {
  color: #0ef;
  font-size: 22px;
  margin-bottom: 12px;
}
.news-text p {
  color: #ccc;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-media {
  width: 220px;
  flex-shrink: 0;
}
.news-media img,
.news-media video {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(0,180,255,0.3);
  transition: 0.3s;
}
.news-media img:hover,
.news-media video:hover {
  border-color: #0ef;
  box-shadow: 0 0 12px #0ef4;
}

/* 加载更多按钮 */
.load-more-btn {
  display: block;
  margin: 30px auto;
  padding: 12px 30px;
  background: #0ef;
  color: #000;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  /* 新增：提升层级，防止被背景伪元素遮挡 */
  position: relative;
  z-index: 99;
  /* 强化点击反馈 */
  transition: all 0.3s ease;
}
.load-more-btn:hover {
  box-shadow: 0 0 15px #0ef;
  transform: translateY(-2px); /* 增加hover动效，确认可点击 */
}
/* 新增：禁用状态样式（若需要） */
.load-more-btn:disabled {
  background: #666;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* 精彩截图轮播 */
.slider-wrap {
  position: relative;
  max-width: 1100px;
  margin: 40px auto;
  overflow: hidden;
  border: 1px solid rgba(0,180,255,0.2);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,80,150,0.05);
  z-index: 2;
}
.slider-main {
  width: 100%;
  height: 520px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,220,255,0.2);
}
.slide-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease-in-out;
}
.slide-track img {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(0,220,255,0.35);
  color: #0ef;
  font-size: 22px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: 0.3s;
}
.slider-btn:hover {
  background: rgba(0,220,255,0.25);
  box-shadow: 0 0 15px rgba(0,220,255,0.4);
}
.prev-btn { left: 15px; }
.next-btn { right: 15px; }

.slider-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0,220,255,0.25);
  border: 1px solid rgba(0,220,255,0.4);
  cursor: pointer;
  transition: 0.3s;
}
.dot.active {
  background: #0ef;
  box-shadow: 0 0 10px rgba(0,220,255,0.6);
}

/* 弹窗样式 */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-content {
  max-width: 90%;
  max-height: 90vh;
}
.modal-content img,
.modal-content video {
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.modal-close {
  position: absolute;
  top: 30px; right: 40px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
}

/* 新闻详情弹窗 */
.news-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.news-modal-box {
  background: #0a0f1f;
  border: 1px solid rgba(0,180,255,0.3);
  border-radius: 12px;
  width: 100%;
  max-width: 800px;
  max-height: 80vh;
  padding: 30px;
  color: #fff;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 30px rgba(0,100,200,0.1);
}
.news-modal-close {
  position: absolute;
  right: 20px; top: 15px;
  font-size: 28px;
  color: #0ef;
  cursor: pointer;
}
.news-modal-box h2 {
  color: #0ef;
  margin-bottom: 20px;
}
.news-modal-box .content {
  color: #ccc;
  font-size: 16px;
  line-height: 1.8;
  white-space: pre-line;
}

/* 登入 & 管理 */
.login-box, .admin-panel {
  max-width:500px; margin:100px auto; padding:40px;
  background:#111; border-radius:10px;
}
input, textarea {
  width:100%; padding:10px; margin:10px 0; border-radius:6px;
  border:none; background:#222; color:#fff;
}
.admin-item {
  background:#222; padding:15px; margin:10px 0; border-radius:6px;
  display:flex; justify-content:space-between; align-items:center;
}
.admin-item button { background:#f33; border:none; padding:6px 12px; color:#fff; border-radius:4px; }

.footer {
  padding:30px; text-align:center; background:#000; color:#666;
}

/* 移动端适配 */
@media (max-width:900px) {
  .feature-grid, .races-grid { grid-template-columns:1fr; }
}
@media(max-width:768px){
  .container { padding: 0 1rem; }
  .news-item{flex-direction:column; height: auto !important;}
  .news-media{width:100%;}
  .slider-main{height:280px;}
  .slider-btn{width:40px;height:40px;font-size:18px;}
}