/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:wght@400;400i&family=Pirata+One&family=Roboto+Slab:wght@400;700&display=swap');

:root {
  /* Color System - TideStorm 航海与海盗主题 */
  --color-dark-bg: #1a535c; /* 深邃的海蓝色 */
  --color-light-bg: #f7e8c3; /* 旧地图的米黄色 */
  --color-gradient-sea: linear-gradient(135deg, #1a535c 0%, #266d6d 100%);
  --color-gradient-map: linear-gradient(135deg, #f7e8c3 0%, #f1d6ab 100%);
  --color-white: #FFFFFF;
  --color-primary: #ff9f1c; /* 海盗金色 */
  --color-primary-hover: #ffbf69;
  --color-secondary: #2ec4b6;
  --color-accent: #e71d36; /* 海盗红 */
  --color-success: #4CAF50;
  --color-purple: #9D4EDD;
  
  /* Text Colors */
  --color-text-primary: #2b2d42;
  --color-text-secondary: #5c6b73;
  --color-text-light: #f8f9fa;
  --color-text-disabled: #adb5bd;
  
  /* Fonts */
  --font-display: "Pirata One", cursive; /* 海盗风格字体 */
  --font-heading: "IM Fell English", serif; /* 旧地图风格衬线字体 */
  --font-body: "Roboto Slab", serif; /* 可读的衬线字体 */
  --font-formal: "IM Fell English", serif;
  
  /* Spacing */
  --spacing-tiny: 4px;
  --spacing-small: 8px;
  --spacing-medium: 16px;
  --spacing-large: 24px;
  --spacing-xl: 48px;
  
  /* Border Radius */
  --radius-tiny: 4px;
  --radius-small: 8px;
  --radius-standard: 16px;
  --radius-large: 24px;
  --radius-circle: 50%;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 32px rgba(255, 107, 90, 0.2);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.6s ease;
}

/* Accent Elements with Burgundy */
.accent-burgundy {
  color: var(--color-accent);
}

.accent-burgundy-bg {
  background: var(--color-accent);
  color: var(--color-white);
}

.gold-accent.burgundy::before,
.gold-accent.burgundy::after {
  background: var(--color-accent);
}

.burgundy-highlight {
  position: relative;
  display: inline-block;
}

.burgundy-highlight::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-accent);
}

/* Decorative Elements */
.gold-divider {
  height: 1px;
  background: var(--color-primary);
  width: 100%;
  position: relative;
  margin: 2rem 0;
}

.gold-divider::before,
.gold-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 3px;
  background: var(--color-primary);
}

.gold-divider::before {
  left: 0;
}

.gold-divider::after {
  right: 0;
}

.gold-accent {
  position: relative;
  display: inline-block;
  padding: 0 1rem;
}

.gold-accent::before,
.gold-accent::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 1px;
  background: var(--color-primary);
}

.gold-accent::before {
  left: 0;
}

.gold-accent::after {
  right: 0;
}

.luxury-border {
  position: relative;
  border: 1px solid transparent;
}

.luxury-border::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border: 1px solid var(--color-primary);
  pointer-events: none;
}

.luxury-border::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--color-primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--color-gradient-sea);
  color: var(--color-text-light);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.1;
  z-index: -1;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-medium);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 4rem;
  font-family: var(--font-display);
  color: var(--color-primary);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: var(--spacing-medium);
  letter-spacing: 3px;
  transform: rotate(-1deg);
  text-transform: uppercase;
}

.section-title {
  font-size: 2.5rem;
  font-family: var(--font-heading);
  margin-bottom: var(--spacing-large);
  text-align: center;
  position: relative;
  color: var(--color-primary);
  letter-spacing: 2px;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 3px;
  background: repeating-linear-gradient(90deg, transparent, transparent 5px, var(--color-primary) 5px, var(--color-primary) 10px);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-large);
}

p {
  font-size: 1rem;
  color: var(--color-text-secondary);
}

/* Header */
.header {
  background: rgba(26, 83, 92, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--color-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  padding: var(--spacing-medium) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-small);
}

.sun-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(255, 159, 28, 0.6));
  animation: spin 15s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.logo-text {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.logo:hover .logo-text {
  transform: rotate(-2deg) translateY(-2px);
}

.nav {
  display: flex;
  gap: var(--spacing-large);
}

.nav-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 1.1rem;
  padding: var(--spacing-tiny) var(--spacing-small);
  border-radius: var(--radius-small);
  transition: all var(--transition-normal);
  position: relative;
  letter-spacing: 1px;
}

.nav-link:hover {
  color: var(--color-primary);
  transform: translateY(-2px);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-primary);
  border-radius: var(--radius-small);
}

@keyframes wave {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(1.1); }
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--color-text-primary);
}

/* Hero Section */
.hero {
  padding: var(--spacing-xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.floating-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--color-accent);
  border-radius: var(--radius-circle);
  opacity: 0.7;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation: float 6s ease-in-out infinite 0s; }
.particle:nth-child(2) { top: 60%; left: 80%; animation: float 7s ease-in-out infinite 1s; }
.particle:nth-child(3) { top: 40%; left: 50%; animation: float 5s ease-in-out infinite 0.5s; }
.particle:nth-child(4) { top: 80%; left: 30%; animation: float 8s ease-in-out infinite 1.5s; }
.particle:nth-child(5) { top: 30%; left: 70%; animation: float 6.5s ease-in-out infinite 0.8s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background: linear-gradient(45deg, var(--color-primary), #d48f0f);
  color: var(--color-dark-bg);
  border: 2px solid var(--color-dark-bg);
  border-radius: var(--radius-small);
  padding: 12px 32px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--color-dark-bg);
  transform: rotate(-1deg);
  text-transform: uppercase;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.15' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 5v1H0V0h5z'/%3E%3Cpath d='M6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.btn-primary:hover {
  background: linear-gradient(45deg, var(--color-primary-hover), var(--color-primary));
  transform: translateY(-3px) rotate(1deg);
  box-shadow: 8px 8px 0 var(--color-dark-bg);
}

.btn-primary:active {
  transform: translateY(0) rotate(0);
  box-shadow: 2px 2px 0 var(--color-dark-bg);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-small);
  padding: 12px 32px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--color-dark-bg);
  transform: rotate(1deg);
  text-transform: uppercase;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 5v1H0V0h5z'/%3E%3Cpath d='M6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-dark-bg);
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 8px 8px 0 var(--color-dark-bg);
}

.btn-secondary:active {
  transform: translateY(0) rotate(0);
  box-shadow: 2px 2px 0 var(--color-dark-bg);
}

/* Featured Section */
.featured-section {
  padding: var(--spacing-xl) 0;
  position: relative;
  overflow: hidden;
}

.featured-badge {
  display: inline-block;
  background: var(--color-white);
  color: var(--color-primary);
  padding: var(--spacing-small) var(--spacing-medium);
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: var(--spacing-large);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: var(--shadow-md);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

.featured-card {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-large);
  padding: var(--spacing-xl);
  text-align: center;
  color: var(--color-white);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.15), transparent 70%);
  pointer-events: none;
}

.featured-content h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-medium);
  color: var(--color-white);
}

.featured-content p {
  font-size: 1.2rem;
  margin-bottom: var(--spacing-large);
  color: rgba(255, 255, 255, 0.9);
}

/* Games Section */
.games-section {
  padding: var(--spacing-xl) 0;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--spacing-large);
}

.game-card {
  background: var(--color-gradient-map);
  width: 100%;
  border-radius: var(--radius-large);
  border: 2px solid var(--color-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  animation: sunnyRise 0.6s ease-out forwards;
  opacity: 0;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transform: rotate(0.5deg);
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.05'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
  pointer-events: none;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes sunnyRise {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.game-card:hover {
  transform: translateY(-10px) scale(1.02) rotate(0deg);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.4);
  border-color: var(--color-primary-hover);
}

.game-card-image {
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  position: relative;
  overflow: hidden;
  border-top-left-radius: calc(var(--radius-standard) - 2px);
  border-top-right-radius: calc(var(--radius-standard) - 2px);
}

.game-card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.game-card:hover .game-card-image img {
  transform: scale(1.1);
}

.game-card-content {
  padding: var(--spacing-medium);
  text-align: center;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.game-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: var(--spacing-small);
  color: var(--color-primary);
  transition: color 0.3s ease;
  text-align: center;
  letter-spacing: 1px;
}

.game-card:hover .game-card-title {
  color: var(--color-primary);
}

.game-card-description {
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-medium);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-small);
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.game-play-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--spacing-tiny);
  transition: color 0.3s ease;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.game-play-btn:hover {
  color: var(--color-accent);
  font-weight: 400;
}

.game-id {
  font-size: 0.8rem;
  color: var(--color-text-disabled);
  font-weight: 500;
}

/* Wave Divider */
.wave-divider {
  width: 100%;
  height: 60px;
  overflow: hidden;
}

.wave-divider svg {
  width: 100%;
  height: 100%;
  transform: scaleY(1.5);
}

.wave-path {
  animation: wave-move 8s ease-in-out infinite;
}

@keyframes wave-move {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-10%); }
}

/* Wave Divider */
.wave-divider {
  position: relative;
  height: 100px;
  overflow: hidden;
  margin: 40px 0;
}

.wave-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-primary);
  clip-path: polygon(0% 30%, 10% 35%, 20% 30%, 30% 35%, 40% 30%, 50% 35%, 60% 30%, 70% 35%, 80% 30%, 90% 35%, 100% 30%, 100% 100%, 0% 100%);
  opacity: 0.8;
}

/* Treasure Map Divider */
.map-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px 0;
  position: relative;
}

.map-divider::before,
.map-divider::after {
  content: '✗';
  color: var(--color-primary);
  font-size: 1.5rem;
  margin: 0 20px;
  opacity: 0.8;
}

.map-divider span {
  position: relative;
  padding: 0 40px;
}

.map-divider span::before,
.map-divider span::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--color-primary), var(--color-primary) 5px, transparent 5px, transparent 10px);
}

.map-divider span::before {
  left: 0;
}

.map-divider span::after {
  right: 0;
}

/* Ship Icon */
.ship-icon {
  display: inline-block;
  width: 40px;
  height: 40px;
  position: relative;
  color: var(--color-primary);
  margin: 0 10px;
  transform: rotate(10deg);
  transition: transform 0.3s ease;
}

.ship-icon:hover {
  transform: rotate(0) scale(1.2);
  animation: sail 2s ease-in-out infinite alternate;
}

@keyframes sail {
  0% { transform: translateY(0) rotate(0); }
  100% { transform: translateY(-5px) rotate(3deg); }
}

/* Anchor Decoration */
.anchor-decoration {
  display: inline-block;
  font-size: 2rem;
  color: var(--color-primary);
  opacity: 0.7;
  margin: 0 15px;
  transform: rotate(-10deg);
}

/* Footer */
.footer {
  background: var(--color-gradient-sea);
  border-top: 2px solid var(--color-primary);
  padding: var(--spacing-xl) 0;
  color: var(--color-text-light);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.1;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--spacing-large);
  position: relative;
  z-index: 1;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-small);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-large);
  margin: var(--spacing-medium) 0;
}

.footer-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 300;
  transition: color 0.3s ease;
  letter-spacing: 1px;
}

.footer-link:hover {
  color: var(--color-primary-hover);
}

.footer-info p {
  margin-bottom: var(--spacing-tiny);
  font-size: 0.9rem;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--color-white);
  z-index: 2000;
  padding: var(--spacing-xl) var(--spacing-large);
  transition: right 0.3s ease;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-large);
}

.mobile-menu.active {
  right: 0;
}

.mobile-link {
  color: var(--color-text-primary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.25rem;
  padding: var(--spacing-medium) 0;
  border-bottom: 1px solid rgba(255, 209, 102, 0.3);
  transition: color 0.3s ease;
}

.mobile-link:hover {
  color: var(--color-primary);
}

.close-menu {
  position: absolute;
  top: var(--spacing-medium);
  right: var(--spacing-medium);
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-primary);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--spacing-large);
  right: var(--spacing-large);
  background: var(--color-primary);
  color: var(--color-white);
  width: 50px;
  height: 50px;
  border-radius: var(--radius-circle);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 107, 90, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  background: var(--color-primary-hover);
}

/* Game Detail Page */
.game-detail-container {
  padding: var(--spacing-xl) 0;
}

.game-detail-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-xl);
  align-items: start;
}

.game-detail-image {
  width: 100%;
  border-radius: var(--radius-standard);
  border: 2px solid var(--color-accent);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.game-detail-image img {
  width: 100%;
  height: auto;
  display: block;
}

.game-detail-info {
  background: var(--color-white);
  padding: var(--spacing-large);
  border-radius: var(--radius-standard);
  box-shadow: var(--shadow-md);
  position: relative;
}

.game-detail-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
}

.game-detail-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-medium);
  color: var(--color-text-primary);
}

.game-detail-description {
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-large);
  line-height: 1.8;
}

.game-detail-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-medium);
  margin-bottom: var(--spacing-large);
  flex-wrap: wrap;
}

.game-detail-id {
  background: var(--color-sunny-bg);
  padding: var(--spacing-tiny) var(--spacing-small);
  border-radius: var(--radius-small);
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary);
}

.game-detail-actions {
  display: flex;
  gap: var(--spacing-medium);
  flex-wrap: wrap;
}

.play-now-btn {
  flex: 1;
  min-width: 200px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  color: var(--color-white);
  border: none;
  border-radius: 50px;
  padding: 15px 32px;
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  box-shadow: 0 4px 16px rgba(255, 107, 90, 0.3);
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.play-now-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 90, 0.4);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-small);
  background: var(--color-white);
  color: var(--color-text-primary);
  border: 2px solid var(--color-accent);
  border-radius: 50px;
  padding: 12px 24px;
  font-weight: 600;
  font-family: var(--font-heading);
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
}

.back-btn:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* Related Games Section */
.related-games {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-xl);
  border-top: 2px dashed var(--color-accent);
}

.related-games-title {
  font-size: 2rem;
  margin-bottom: var(--spacing-large);
  text-align: center;
}

.related-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-large);
}

/* Terms and Privacy Pages */
.terms-container, .privacy-container {
  padding: var(--spacing-xl) 0;
}

.terms-content, .privacy-content {
  background: var(--color-white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-standard);
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: 0 auto;
}

.terms-content h1, .privacy-content h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-large);
  text-align: center;
  color: var(--color-primary);
}

.terms-content h2, .privacy-content h2 {
  font-size: 1.75rem;
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-medium);
  color: var(--color-text-primary);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: var(--spacing-small);
}

.terms-content h3, .privacy-content h3 {
  font-size: 1.25rem;
  margin-top: var(--spacing-large);
  margin-bottom: var(--spacing-small);
  color: var(--color-text-primary);
}

.terms-content p, .privacy-content p {
  margin-bottom: var(--spacing-medium);
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.terms-content ul, .privacy-content ul {
  margin-bottom: var(--spacing-medium);
  padding-left: var(--spacing-large);
}

.terms-content li, .privacy-content li {
  margin-bottom: var(--spacing-small);
  color: var(--color-text-secondary);
}

.last-updated {
  text-align: center;
  font-style: italic;
  margin-bottom: var(--spacing-xl);
  color: var(--color-text-disabled);
}

/* Skeleton Loader */
.skeleton-loader {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius-small);
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .game-detail-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-large);
  }
  
  .game-detail-image {
    max-width: 500px;
    margin: 0 auto;
  }
}

/* Contact Page Styles */
.contact-section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
  margin-top: var(--spacing-large);
}

.contact-info {
  background: rgba(26, 26, 26, 0.8);
  padding: var(--spacing-large);
  border-radius: var(--radius-standard);
  border: 1px solid var(--color-primary);
  box-shadow: var(--shadow-md);
}

.contact-info h2 {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-medium);
  color: var(--color-primary);
}

.contact-info p {
  margin-bottom: var(--spacing-large);
  line-height: 1.6;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-medium);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-small);
  font-size: 1.1rem;
}

.contact-icon {
  font-size: 1.5rem;
}

.contact-form {
  background: rgba(26, 26, 26, 0.8);
  padding: var(--spacing-large);
  border-radius: var(--radius-standard);
  border: 1px solid var(--color-primary);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: var(--spacing-medium);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-small);
  font-weight: 500;
  color: var(--color-text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--spacing-small) var(--spacing-medium);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-small);
  background: rgba(10, 10, 10, 0.5);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  transition: all var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Mobile Menu Styles */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  height: 100vh;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-left: 1px solid var(--color-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xl);
  z-index: 1100;
  transition: right var(--transition-normal);
}

.mobile-menu.active {
  right: 0;
}

.mobile-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 1.5rem;
  padding: var(--spacing-small) var(--spacing-medium);
  border-radius: var(--radius-small);
  transition: all var(--transition-normal);
  letter-spacing: 1px;
}

.mobile-link:hover {
  color: var(--color-primary);
  transform: translateY(-2px);
}

.close-menu {
  position: absolute;
  top: var(--spacing-medium);
  right: var(--spacing-medium);
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--color-text-primary);
  padding: var(--spacing-small);
  transition: all var(--transition-normal);
}

.close-menu:hover {
  color: var(--color-primary);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .nav {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }
  
  /* Contact page responsive */
  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-large);
  }
  
  .contact-info,
  .contact-form {
    padding: var(--spacing-medium);
  }
  
  .contact-info h2 {
    font-size: 1.5rem;
  }
  
  /* Mobile: use 2 columns for wider cards, hide long description and make images square */
  .games-grid,
  .related-games-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-small);
  }

  /* Make game images square and larger on mobile */
  .game-card-image {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Hide description to increase card compactness */
  .game-card-description {
    display: none;
  }

  /* Slightly smaller title on mobile to fit the wider layout */
  .game-card-title {
    font-size: 1rem;
  }
 
  
  .game-detail-actions {
    flex-direction: column;
  }
  
  .play-now-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  /* Mobile: reduce container margins and padding */
  .container {
    padding: 0 var(--spacing-small);
    width: 95%;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 10px 24px;
    font-size: 1rem;
  }
  
  .featured-card {
    padding: var(--spacing-large);
  }
  
  .terms-content,
  .privacy-content {
    padding: var(--spacing-large);
  }
  
  .footer-links {
    /* 确保移动端导航栏正常显示 */
  }
  
  /* 确保移动端菜单正确显示 */
  .mobile-menu {
    display: flex !important;
    flex-direction: column;
    gap: var(--spacing-medium);
  }


/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --color-text-primary: #000000;
    --color-text-secondary: #333333;
    --color-text-disabled: #666666;
    --color-accent: #FFD700;
    --color-primary: #FF0000;
    --color-secondary: #0000FF;
  }
}

/* Focus Styles */
button:focus,
button:focus-visible,
a:focus,
a:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .btn-primary,
  .btn-secondary,
  .back-to-top,
  .menu-toggle,
  .mobile-menu {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .container {
    width: 100% !important;
    max-width: 100% !important;
  }
}}