/* ========================================
   像素艺术风格 - 澳门赌博网站主题
   Grid-based Pixel Layout
   ======================================== */

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --pixel-blue: #0000FF;
  --pixel-red: #FF0000;
  --pixel-green: #00FF00;
  --pixel-yellow: #FFFF00;
  --pixel-dark: #000033;
  --pixel-bg: #0a0a2e;
  --pixel-card-bg: #111155;
  --pixel-border: #3333aa;
  --pixel-text: #e0e0ff;
  --pixel-gold: #FFD700;
  --pixel-orange: #FF8C00;
  --pixel-size: 4px;
  --font-title: 'Press Start 2P', monospace;
  --font-body: 'VT323', monospace;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--pixel-bg);
  color: var(--pixel-text);
  line-height: 1.8;
  font-size: 1.25rem;
  overflow-x: hidden;
  image-rendering: pixelated;
}

/* === Pixel Grid Background === */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0,0,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,255,0.03) 1px, transparent 1px);
  background-size: var(--pixel-size) var(--pixel-size);
  pointer-events: none;
  z-index: 0;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--pixel-yellow);
  text-shadow: 3px 3px 0 rgba(0,0,0,0.5);
  line-height: 1.6;
  margin-bottom: 1rem;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; color: var(--pixel-gold); }
h3 { font-size: 1rem; color: var(--pixel-green); }
h4 { font-size: 0.9rem; color: var(--pixel-yellow); }

p {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  line-height: 2;
}

a {
  color: var(--pixel-green);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--pixel-yellow);
  text-shadow: 0 0 8px var(--pixel-yellow);
}

img {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

/* === Container === */
.pixel-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 1;
}

/* === Jammer Block (SEO) === */
.jammer-block {
  display: none;
}

/* === Navigation === */
.pixel-nav {
  background: linear-gradient(180deg, #000066 0%, #000033 100%);
  border-bottom: 4px solid var(--pixel-red);
  padding: 0.8rem 0;
  position: relative;
  z-index: 100;
}

.pixel-nav .pixel-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-logo-text {
  font-family: var(--font-title);
  font-size: 0.7rem;
  color: var(--pixel-yellow);
  text-shadow: 2px 2px 0 rgba(255,0,0,0.5);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: var(--font-title);
  font-size: 0.55rem;
  color: var(--pixel-text);
  padding: 0.5rem 0.8rem;
  border: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--pixel-yellow);
  border-color: var(--pixel-yellow);
  background: rgba(255,255,0,0.1);
  box-shadow: 0 0 10px rgba(255,255,0,0.3);
}

/* Mobile D-pad Menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.dpad-icon {
  width: 36px;
  height: 36px;
  position: relative;
}

.dpad-icon::before,
.dpad-icon::after {
  content: '';
  position: absolute;
  background: var(--pixel-yellow);
}

.dpad-icon::before {
  width: 12px;
  height: 36px;
  left: 12px;
  top: 0;
}

.dpad-icon::after {
  width: 36px;
  height: 12px;
  left: 0;
  top: 12px;
}

/* === Hero Section === */
.pixel-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--pixel-dark);
}

.pixel-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  z-index: 0;
}

.pixel-hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1rem;
}

.pixel-hero h1 {
  font-size: 1.8rem;
  color: var(--pixel-yellow);
  text-shadow: 4px 4px 0 var(--pixel-red), -2px -2px 0 var(--pixel-blue);
  margin-bottom: 1rem;
  animation: pixelBounce 1s ease-in-out infinite alternate;
}

.pixel-hero .hero-slogan {
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--pixel-green);
  margin-bottom: 2rem;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.8);
}

/* Loading Screen Overlay */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-bar-container {
  width: 300px;
  height: 24px;
  border: 3px solid var(--pixel-green);
  padding: 3px;
  margin-top: 1rem;
}

.loading-bar {
  height: 100%;
  background: var(--pixel-green);
  width: 0%;
  transition: width 0.3s steps(20);
}

.loading-text {
  font-family: var(--font-title);
  font-size: 0.8rem;
  color: var(--pixel-green);
  margin-bottom: 1rem;
}

/* === CTA Button === */
.pixel-btn {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.75rem;
  color: #000;
  background: var(--pixel-yellow);
  padding: 1rem 2rem;
  border: 4px solid var(--pixel-gold);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
  position: relative;
}

.pixel-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0,0,0,0.5);
  color: #000;
  background: var(--pixel-gold);
}

.pixel-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.pixel-btn-red {
  background: var(--pixel-red);
  border-color: #cc0000;
  color: #fff;
}

.pixel-btn-red:hover {
  background: #cc0000;
  color: #fff;
}

.pixel-btn-green {
  background: var(--pixel-green);
  border-color: #00cc00;
  color: #000;
}

/* === Section Module === */
.pixel-section {
  padding: 3rem 0;
  position: relative;
  z-index: 1;
}

.pixel-section:nth-child(even) {
  background: rgba(0,0,100,0.2);
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.section-title h2 {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border: 3px solid var(--pixel-gold);
  background: rgba(0,0,50,0.8);
}

.section-title::before,
.section-title::after {
  content: '★';
  color: var(--pixel-yellow);
  font-size: 1.2rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.section-title::before { left: 10%; }
.section-title::after { right: 10%; }

/* === Card Grid === */
.pixel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.pixel-card {
  background: var(--pixel-card-bg);
  border: 3px solid var(--pixel-border);
  padding: 1.5rem;
  transition: all 0.2s;
  position: relative;
}

.pixel-card::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.pixel-card:hover {
  transform: translateY(-4px);
  border-color: var(--pixel-yellow);
  box-shadow: 0 8px 0 rgba(0,0,0,0.3);
}

.pixel-card:hover::before {
  border-color: var(--pixel-gold);
}

.pixel-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border: 2px solid var(--pixel-border);
  margin-bottom: 1rem;
}

.pixel-card h3 {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.pixel-card p {
  font-size: 1.1rem;
  color: rgba(224,224,255,0.8);
}

/* === Story Book Module === */
.story-book {
  background: linear-gradient(135deg, #000066 0%, #000033 50%, #000066 100%);
  border: 4px solid var(--pixel-gold);
  padding: 2rem;
  margin: 2rem 0;
  position: relative;
}

.story-book::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 2px dashed var(--pixel-border);
  pointer-events: none;
}

.story-book .story-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}

.story-book .story-map {
  border: 3px solid var(--pixel-gold);
}

.story-chapter {
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 4px solid var(--pixel-red);
}

.story-chapter h3 {
  color: var(--pixel-gold);
  margin-bottom: 0.5rem;
}

/* === Character Select === */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.character-slot {
  background: rgba(0,0,80,0.6);
  border: 3px solid var(--pixel-blue);
  padding: 1rem;
  text-align: center;
  transition: all 0.2s;
}

.character-slot:hover {
  border-color: var(--pixel-yellow);
  box-shadow: 0 0 20px rgba(255,255,0,0.2);
}

.character-slot img {
  width: 120px;
  height: 120px;
  margin: 0 auto 0.5rem;
  display: block;
}

/* === VIP Section === */
.vip-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.vip-tier {
  background: linear-gradient(180deg, rgba(50,0,50,0.8) 0%, rgba(20,0,20,0.9) 100%);
  border: 3px solid;
  padding: 1.5rem;
  text-align: center;
}

.vip-tier.bronze { border-color: #CD7F32; }
.vip-tier.silver { border-color: #C0C0C0; }
.vip-tier.gold { border-color: var(--pixel-gold); }
.vip-tier.diamond { border-color: #B9F2FF; }

.vip-tier h3 {
  margin-bottom: 1rem;
}

.vip-tier ul {
  list-style: none;
  text-align: left;
}

.vip-tier li {
  padding: 0.3rem 0;
  font-size: 1.1rem;
}

.vip-tier li::before {
  content: '▸ ';
  color: var(--pixel-green);
}

/* === App Download Section === */
.app-section {
  text-align: center;
}

.app-phones {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.app-phone {
  background: var(--pixel-card-bg);
  border: 3px solid var(--pixel-border);
  padding: 1.5rem;
  width: 250px;
}

.app-phone h3 {
  margin-bottom: 1rem;
}

.app-phone img {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  display: block;
  border: 2px solid var(--pixel-border);
}

/* === Dev Log === */
.dev-log {
  border-left: 4px solid var(--pixel-green);
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.dev-log-entry {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(0,255,0,0.05);
  border: 1px solid rgba(0,255,0,0.2);
}

.dev-log-date {
  font-family: var(--font-title);
  font-size: 0.6rem;
  color: var(--pixel-green);
  margin-bottom: 0.5rem;
}

/* === License Module === */
.license-module {
  background: linear-gradient(135deg, #001a00 0%, #002200 100%);
  border: 3px solid var(--pixel-green);
  padding: 2rem;
  text-align: center;
}

.license-badge {
  display: inline-block;
  border: 4px solid var(--pixel-gold);
  padding: 1rem 2rem;
  margin: 1rem;
  background: rgba(0,0,0,0.5);
}

.license-badge h3 {
  color: var(--pixel-gold);
}

/* === FAQ Section === */
.faq-item {
  border: 2px solid var(--pixel-border);
  margin-bottom: 0.5rem;
  background: var(--pixel-card-bg);
}

.faq-question {
  font-family: var(--font-title);
  font-size: 0.65rem;
  padding: 1rem;
  cursor: pointer;
  color: var(--pixel-yellow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '▼';
  font-size: 0.5rem;
  transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1rem 1rem;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

/* === Footer === */
.pixel-footer {
  background: linear-gradient(180deg, #000022 0%, #000011 100%);
  border-top: 4px solid var(--pixel-red);
  padding: 3rem 0 1rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  font-family: var(--font-title);
  font-size: 0.6rem;
  color: var(--pixel-gold);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--pixel-border);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.4rem;
}

.footer-col a {
  color: var(--pixel-text);
  font-size: 1.1rem;
}

.footer-col a:hover {
  color: var(--pixel-yellow);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.footer-social a {
  display: block;
  width: 36px;
  height: 36px;
}

.footer-social img {
  width: 36px;
  height: 36px;
}

.footer-payments {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.footer-payments img {
  height: 30px;
  width: auto;
}

.footer-bottom {
  border-top: 2px solid var(--pixel-border);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 1rem;
  color: rgba(224,224,255,0.5);
}

.footer-bottom .age-badge {
  display: inline-block;
  margin: 0.5rem;
}

.footer-bottom .age-badge img {
  width: 48px;
  height: 48px;
}

.footer-license {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* === Inner Page Hero === */
.inner-hero {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--pixel-dark);
}

.inner-hero img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.inner-hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1rem;
}

/* === Content Sections for Inner Pages === */
.content-block {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--pixel-card-bg);
  border: 2px solid var(--pixel-border);
}

.content-block h3 {
  border-bottom: 2px solid var(--pixel-border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.game-item {
  background: rgba(0,0,80,0.4);
  border: 2px solid var(--pixel-border);
  padding: 1rem;
}

.game-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border: 2px solid var(--pixel-border);
  margin-bottom: 0.5rem;
}

/* === Strategy Section === */
.strategy-box {
  background: linear-gradient(135deg, rgba(0,0,100,0.3) 0%, rgba(0,0,50,0.3) 100%);
  border: 2px solid var(--pixel-gold);
  border-left: 6px solid var(--pixel-gold);
  padding: 1.5rem;
  margin: 1rem 0;
}

.strategy-box h4 {
  color: var(--pixel-gold);
  margin-bottom: 0.5rem;
}

/* === Pixel Hero Story === */
.hero-story {
  background: linear-gradient(135deg, #110022 0%, #001133 100%);
  border: 3px solid var(--pixel-red);
  padding: 2rem;
  margin: 2rem 0;
  position: relative;
}

.hero-story::before {
  content: '◆ 像素英雄传说 ◆';
  font-family: var(--font-title);
  font-size: 0.6rem;
  color: var(--pixel-red);
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #110022;
  padding: 0 1rem;
}

/* === Dialog Box (for APP page) === */
.pixel-dialog {
  background: var(--pixel-card-bg);
  border: 4px solid var(--pixel-text);
  padding: 1.5rem;
  margin: 1rem 0;
  position: relative;
}

.pixel-dialog::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 30px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 16px solid var(--pixel-text);
}

.pixel-dialog .step-number {
  font-family: var(--font-title);
  font-size: 0.8rem;
  color: var(--pixel-green);
  margin-bottom: 0.5rem;
}

/* === Game Spirit Box === */
.spirit-box {
  background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(255,165,0,0.1) 100%);
  border: 3px solid var(--pixel-gold);
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}

.spirit-box h3 {
  color: var(--pixel-gold);
}

/* === Animations === */
@keyframes pixelBounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

@keyframes coinFall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

@keyframes pixelBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes walkCycle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(4px) translateY(-2px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(4px) translateY(-2px); }
}

.pixel-blink {
  animation: pixelBlink 1s steps(2) infinite;
}

.coin-particle {
  position: fixed;
  width: 16px;
  height: 16px;
  background: var(--pixel-gold);
  z-index: 1000;
  pointer-events: none;
  animation: coinFall 3s linear forwards;
}

/* === Breadcrumb === */
.pixel-breadcrumb {
  padding: 0.8rem 0;
  font-size: 1rem;
}

.pixel-breadcrumb a {
  color: var(--pixel-text);
}

.pixel-breadcrumb span {
  color: var(--pixel-yellow);
  margin: 0 0.3rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  h1 { font-size: 1rem; }
  h2 { font-size: 0.85rem; }
  h3 { font-size: 0.75rem; }

  .pixel-hero { min-height: 60vh; }
  .pixel-hero h1 { font-size: 1.1rem; }

  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    background: #000033;
    border-top: 2px solid var(--pixel-border);
    margin-top: 0.5rem;
    padding: 0.5rem 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(51,51,170,0.3);
    font-size: 0.6rem;
  }

  .story-book .story-content {
    grid-template-columns: 1fr;
  }

  .pixel-grid {
    grid-template-columns: 1fr;
  }

  .section-title::before,
  .section-title::after {
    display: none;
  }

  .inner-hero { min-height: 30vh; }

  .app-phones {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  body { font-size: 1.1rem; }
  .pixel-container { padding: 0 0.5rem; }
  .pixel-hero h1 { font-size: 0.85rem; }
  .pixel-btn { font-size: 0.6rem; padding: 0.8rem 1.2rem; }
  h1 { font-size: 0.85rem; }
  h2 { font-size: 0.7rem; }
}
