/* ===== Luxury Noir Theme - 奢华黑金风 ===== */

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Cormorant Garamond', 'Playfair Display', serif;
  background: #0b0b0b;
  color: #f3e9c0;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== Site Header - 奢华页眉 ===== */
.site-header {
  background: linear-gradient(180deg, #0f0e0c 0%, #0b0b0b 100%);
  border-bottom: 1px solid rgba(212,175,55,0.3);
  padding: 16px 0;
  position: relative;
}
/* 首页隐藏页眉 */
body.index-page .site-header {
  display: none;
}
.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.5), transparent);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #f3e9c0;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}
.logo:hover {
  text-shadow: 0 0 20px rgba(212,175,55,0.5);
}
.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #d4af37, #a67c2e);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(212,175,55,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  transform: rotate(-5deg);
  transition: all 0.3s ease;
  position: relative;
  clip-path: polygon(50% 0%, 100% 35%, 80% 100%, 20% 100%, 0% 35%);
}
.logo-icon::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: rgba(255,255,255,0.4);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
}
.logo-icon::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  top: 6px;
  left: 14px;
}
.logo:hover .logo-icon {
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 6px 18px rgba(212,175,55,0.6), inset 0 1px 0 rgba(255,255,255,0.4);
}
.logo span {
  color: #d4af37;
  font-weight: 800;
}
@media (max-width: 480px) {
  .logo { font-size: 1.3rem; }
  .logo-icon { width: 36px; height: 36px; font-size: 1.2rem; }
}

/* ===== Container ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ===== Hero Section - 菱形宫格 ===== */
.hero-section {
  padding: 30px 0;
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(45deg, rgba(212,175,55,0.1) 0px, rgba(212,175,55,0.1) 2px, transparent 2px, transparent 8px);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 160px));
  justify-content: center;
  gap: 30px 40px;
  margin: 30px auto;
  position: relative;
  z-index: 1;
}
.hero-card {
  width: 100%;
  aspect-ratio: 1/1;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #1e1a14, #0c0b09);
  border: 1.5px solid #d4af37;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(212,175,55,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  overflow: hidden;
  position: relative;
}
.hero-card > * {
  transform: rotate(-45deg);
}
.hero-card:hover {
  transform: rotate(45deg) scale(1.06);
  border-color: #ffdf80;
  box-shadow: 0 0 28px gold;
}
.hero-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: rotate(-45deg) scale(1.42);
  border-radius: 0;
  border: none;
  margin: 0;
  filter: sepia(20%) brightness(85%);
  transition: all 0.3s ease;
}
.hero-card:hover img {
  filter: sepia(0%) brightness(100%);
  transform: rotate(-45deg) scale(1.5);
}
.hero-card span {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  font-size: 0.7rem;
  color: #f3e9c0;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(11,11,11,0.9), rgba(30,26,20,0.85));
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(212,175,55,0.5);
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  z-index: 2;
}

/* 平板端 */
@media (max-width: 768px) {
  .hero-section { padding: 25px 0; }
  .hero-grid { gap: 20px 30px; }
  .hero-card span { font-size: 0.65rem; padding: 3px 8px; }
}

/* 手机端 */
@media (max-width: 480px) {
  .hero-section { padding: 0px 0; }
  .hero-grid { gap: 15px 20px; grid-template-columns: repeat(2, minmax(100px, 130px)); }
  .hero-card span { font-size: 0.6rem; padding: 2px 6px; bottom: 12%; }
}

/* ===== Games Section ===== */
.games-section {
  padding: 8px 0 32px;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #d4af37;
  position: relative;
  display: inline-block;
  padding-left: 16px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-family: 'Playfair Display', serif;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: linear-gradient(180deg, #d4af37, #a67c2e);
  box-shadow: 0 0 10px rgba(212,175,55,0.5);
}
@media (max-width: 768px) {
  .section-title { font-size: 1.25rem; }
}

/* ===== Game Grid (Home) ===== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  padding: 5px 0;
}
@media (max-width: 1024px) { .game-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px)  { .game-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 576px)  { .game-grid { grid-template-columns: repeat(2, 1fr); gap: 2px; } }

/* ===== Game Card - 奢华卡片 ===== */
.game-card {
  background: #111111;
  overflow: hidden;
  border: 1px solid rgba(212,175,55,0.3);
  box-shadow: 0 15px 30px rgba(0,0,0,0.5), inset 0 0 0 1px #d4af37;
  transition: all 0.35s ease;
  cursor: pointer;
  position: relative;
  border-radius: 12px;
}
.game-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(212,175,55,0.1) 50%, transparent 60%);
  transform: translateX(-100%) rotate(45deg);
  transition: transform 0.6s ease;
}
.game-card:hover::before {
  transform: translateX(100%) rotate(45deg);
}
.game-card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.7), inset 0 0 0 1px #ffdf80, 0 0 30px rgba(212,175,55,0.3);
  transform: translateY(-6px);
  border-color: #d4af37;
}
.game-card-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #0c0b09;
  position: relative;
}
.game-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.35s ease;
  filter: sepia(20%) brightness(90%);
}
.game-card:hover .game-card-thumb img { 
  transform: scale(1.08); 
  filter: sepia(0%) brightness(100%); 
}
.game-card-title {
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f3e9c0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #111111;
  letter-spacing: 0.5px;
  font-family: 'Cormorant Garamond', serif;
}

/* ===== Ad Slot ===== */
.ad-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}

/* ===== Detail Page ===== */
.detail-wrap {
  display: flex;
  gap: 28px;
  padding: 32px 0;
  flex: 1;
}
.detail-main {
  flex: 7;
  min-width: 0;
}
.detail-sidebar {
  flex: 3;
  min-width: 280px;
  max-width: 360px;
}
@media (max-width: 900px) {
  .detail-wrap { flex-direction: column; }
  .detail-sidebar { max-width: 100%; min-width: 0; }
}

/* Game Frame Area - 奢华游戏框 */
.game-frame-wrap {
  background: #111111;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  border: 2px solid rgba(212,175,55,0.4);
  box-shadow: 0 15px 30px rgba(0,0,0,0.5), inset 0 0 0 1px #d4af37;
  border-radius: 12px;
}
.game-frame-wrap:fullscreen,
.game-frame-wrap:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  aspect-ratio: unset;
  border-radius: 0;
}
.game-frame-wrap.mobile-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  z-index: 9999;
  aspect-ratio: unset;
  border-radius: 0;
}
.game-frame-wrap.mobile-fullscreen .fullscreen-btn {
  display: block;
  z-index: 10;
}
.game-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: relative;
  z-index: 1;
}
.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 11, 11, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.35s ease;
  z-index: 3;
}
.game-overlay.hidden { opacity: 0; pointer-events: none; }
.game-overlay-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 0;
  filter: sepia(30%) brightness(70%);
}
.play-btn {
  position: relative;
  z-index: 1;
  background: linear-gradient(145deg, #a67c2e, #59431a);
  color: #f3e9c0;
  border: 2px solid #d4af37;
  padding: 18px 36px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.35s ease;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 50px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,223,128,0.3);
  font-family: 'Playfair Display', serif;
}
.play-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,223,128,0.5), 0 0 25px rgba(212,175,55,0.4);
}
.play-btn:active {
  transform: translateY(-1px);
}

.fullscreen-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: linear-gradient(145deg, #a67c2e, #59431a);
  color: #f3e9c0;
  border: 1.5px solid #d4af37;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: none;
  transition: all 0.35s ease;
  border-radius: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,223,128,0.3);
  font-family: 'Cormorant Garamond', serif;
}
.fullscreen-btn:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,223,128,0.5), 0 0 15px rgba(212,175,55,0.3);
}
.game-frame-wrap.playing .fullscreen-btn { display: block; }
.game-frame-wrap.playing .game-overlay { display: none; }
.game-frame-wrap.playing .game-overlay-thumb { display: none; }

/* 移动端隐藏全屏按钮 */
@media (max-width: 768px) {
  .game-frame-wrap .fullscreen-btn {
    display: none !important;
  }
}

/* PC端（大于768px）游戏开始后显示全屏按钮 */
@media (min-width: 769px) {
  .game-frame-wrap.playing .fullscreen-btn {
    display: block;
  }
}

/* 全屏模式下隐藏按钮 */
.game-frame-wrap:fullscreen .fullscreen-btn,
.game-frame-wrap:-webkit-full-screen .fullscreen-btn {
  display: none !important;
}

/* Sidebar - 奢华侧边栏 */
.detail-title {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #d4af37;
  font-family: 'Playfair Display', serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(212,175,55,0.3);
}
.detail-desc {
  font-size: 1rem;
  color: #c4b896;
  line-height: 1.8;
  margin-bottom: 20px;
  font-family: 'Cormorant Garamond', serif;
}
.tips-box {
  background: linear-gradient(135deg, #1a1712, #0f0e0c);
  border-left: 3px solid #d4af37;
  padding: 20px;
  margin-top: 16px;
  border-radius: 0 12px 12px 0;
  box-shadow: inset 0 0 20px rgba(212,175,55,0.05), 0 5px 15px rgba(0,0,0,0.3);
}
.tips-box h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #d4af37;
  margin-bottom: 12px;
  font-family: 'Playfair Display', serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.tips-box ul {
  list-style: none;
  padding: 0;
}
.tips-box li {
  font-size: 0.9rem;
  color: #c4b896;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
  font-family: 'Cormorant Garamond', serif;
}
.tips-box li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: #d4af37;
  font-size: 0.7rem;
}

/* Related Games */
.related-section {
  padding: 32px 0;
}
.related-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #d4af37;
  position: relative;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-family: 'Playfair Display', serif;
}
.related-section h2::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, #d4af37, transparent);
  box-shadow: 0 0 8px rgba(212,175,55,0.5);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 768px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== Footer - 碳黑页脚 ===== */
.site-footer {
  background: #0a0a0a;
  padding: 40px 0;
  margin-top: auto;
  border-top: 1px solid rgba(212,175,55,0.3);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: 0.9rem;
  color: #f3e9c0;
  transition: all 0.3s ease;
  font-weight: 500;
  padding: 8px 16px;
  position: relative;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 1px;
}
.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: #d4af37;
  transition: all 0.3s ease;
  transform: translateX(-50%);
  box-shadow: 0 0 5px rgba(212,175,55,0.5);
}
.footer-links a:hover::after {
  width: 80%;
}
.footer-links a:hover {
  color: #ffdf80;
  text-shadow: 0 0 10px rgba(212,175,55,0.5);
}
.footer-copy {
  font-size: 0.85rem;
  color: #8a8068;
  margin-top: 8px;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 1px;
}

/* ===== Info Pages (Contact/Policy/About) ===== */
.info-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px;
  flex: 1;
  background: linear-gradient(135deg, #151310, #0c0b09);
  margin-top: 32px;
  margin-bottom: 32px;
  border: 1px solid rgba(212,175,55,0.3);
  box-shadow: 0 15px 30px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(212,175,55,0.1);
  border-radius: 12px;
}
.info-page h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 28px;
  color: #d4af37;
  font-family: 'Playfair Display', serif;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 2px 15px rgba(212,175,55,0.4);
}
.info-page h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 32px 0 16px;
  color: #d4af37;
  position: relative;
  padding-left: 16px;
  font-family: 'Playfair Display', serif;
  letter-spacing: 1px;
}
.info-page h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 70%;
  background: linear-gradient(180deg, #d4af37, #a67c2e);
  box-shadow: 0 0 8px rgba(212,175,55,0.5);
}
.info-page p {
  font-size: 1rem;
  color: #c4b896;
  line-height: 1.9;
  margin-bottom: 16px;
  font-family: 'Cormorant Garamond', serif;
}
.info-page a {
  color: #d4af37;
  font-weight: 600;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}
.info-page a:hover {
  border-bottom-color: #d4af37;
  text-shadow: 0 0 8px rgba(212,175,55,0.5);
}
.info-page ul {
  list-style: none;
  padding: 0;
}
.info-page li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: #c4b896;
  font-size: 1rem;
  line-height: 1.8;
  font-family: 'Cormorant Garamond', serif;
}
.info-page li::before {
  content: '◆';
  position: absolute;
  left: 4px;
  color: #d4af37;
  font-size: 0.75rem;
}

/* ===== Scrollbar - 奢华滚动条 ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track {
  background: #0b0b0b;
  border: 1px solid rgba(212,175,55,0.2);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d4af37, #a67c2e);
  border-radius: 5px;
  border: 1px solid #59431a;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffdf80, #d4af37);
  box-shadow: 0 0 10px rgba(212,175,55,0.5);
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
  .info-page { margin: 20px 16px; padding: 32px 20px; }
  .info-page h1 { font-size: 1.8rem; }
  .play-btn { padding: 14px 28px; font-size: 1rem; }
  .detail-title { font-size: 1.5rem; }
}
