/* ==============================
   Modern Game Hub - Main Styles
   ============================== */

:root {
  /* 全新现代主题色彩 */
  --primary-color: #6c5ce7;
  --secondary-color: #a29bfe;
  --accent-color: #fd79a8;
  --complement-color: #00cec9;
  --dark-color: #2d3436;
  --light-color: #f7f7f7;
  --success-color: #00b894;
  --warning-color: #fdcb6e;
  --danger-color: #e17055;
  --info-color: #0984e3;
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-light: #f7f7f7;
  --bg-primary: #ffffff;
  --bg-secondary: #f1f2f6;
  --bg-tertiary: #dfe6e9;
  --border-color: rgba(0, 0, 0, 0.1);
  --card-bg: rgba(255, 255, 255, 0.95);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-secondary: linear-gradient(135deg, var(--accent-color), var(--complement-color));
  --gradient-tertiary: linear-gradient(135deg, var(--complement-color), var(--primary-color));
  --border-radius-small: 8px;
  --border-radius-medium: 12px;
  --border-radius-large: 16px;
}

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

body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 10% 20%, rgba(108, 92, 231, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(253, 121, 168, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 30% 80%, rgba(0, 206, 201, 0.15) 0%, transparent 25%),
    radial-gradient(circle at 70% 90%, rgba(108, 92, 231, 0.1) 0%, transparent 30%),
    radial-gradient(circle at 50% 50%, rgba(253, 121, 168, 0.1) 0%, transparent 35%);
  z-index: -1;
  animation: backgroundAnimation 15s ease infinite;
  opacity: 0.8;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 15%),
    radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 15%),
    radial-gradient(circle at 90% 40%, rgba(255, 255, 255, 0.2) 0%, transparent 15%);
  z-index: -1;
  animation: backgroundAnimationOpposite 20s linear infinite;
  opacity: 0.5;
}

@keyframes backgroundAnimation {
  0% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.1) rotate(180deg);
  }
  100% {
    transform: scale(1) rotate(360deg);
  }
}

@keyframes backgroundAnimationOpposite {
  0% {
    transform: scale(1.1) rotate(360deg);
  }
  50% {
    transform: scale(1) rotate(180deg);
  }
  100% {
    transform: scale(1.1) rotate(0deg);
  }
}

/* 游戏元素背景装饰 */
.game-background-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.game-element {
  position: absolute;
  opacity: 0.1;
  animation: floatElement var(--duration, 15s) linear infinite;
  color: var(--element-color, var(--primary-color));
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.game-element:nth-child(1) {
  top: 5%;
  left: 5%;
  font-size: 2.5rem;
  --duration: 20s;
  --element-color: var(--primary-color);
}

.game-element:nth-child(2) {
  top: 15%;
  right: 10%;
  font-size: 3.5rem;
  --duration: 25s;
  --element-color: var(--accent-color);
}

.game-element:nth-child(3) {
  bottom: 25%;
  left: 10%;
  font-size: 3rem;
  --duration: 30s;
  --element-color: var(--complement-color);
}

.game-element:nth-child(4) {
  bottom: 15%;
  right: 15%;
  font-size: 2.5rem;
  --duration: 35s;
  --element-color: var(--secondary-color);
}

.game-element:nth-child(5) {
  top: 40%;
  left: 50%;
  font-size: 2rem;
  --duration: 22s;
  --element-color: var(--primary-color);
}

.game-element:nth-child(6) {
  top: 70%;
  left: 20%;
  font-size: 4rem;
  --duration: 28s;
  --element-color: var(--accent-color);
}

.game-element:nth-child(7) {
  top: 30%;
  right: 25%;
  font-size: 2rem;
  --duration: 18s;
  --element-color: var(--complement-color);
}

.game-element:nth-child(8) {
  bottom: 40%;
  left: 30%;
  font-size: 3rem;
  --duration: 32s;
  --element-color: var(--secondary-color);
}

@keyframes floatElement {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0.05;
  }
  25% {
    transform: translate(30px, 50px) rotate(90deg) scale(1.2);
    opacity: 0.15;
  }
  50% {
    transform: translate(0, 100px) rotate(180deg) scale(1);
    opacity: 0.1;
  }
  75% {
    transform: translate(-30px, 50px) rotate(270deg) scale(0.8);
    opacity: 0.15;
  }
  100% {
    transform: translate(0, 0) rotate(360deg) scale(1);
    opacity: 0.05;
  }
}

a {
  text-decoration: none;
}

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

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==============================
   Navigation Styles
   ============================== */

.modern-nav {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 80px;
}

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

.logo-link {
  display: flex;
  align-items: center;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
}

.logo-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-right: 10px;
}

.logo-text span {
  color: var(--accent-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-item {
  height: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-box {
  position: relative;
}

.search-form {
  display: flex;
}

.search-input {
  padding: 10px 15px;
  padding-right: 40px;
  border-radius: var(--border-radius-small);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.search-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.search-btn:hover {
  color: var(--primary-color);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-small);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.hamburger:hover {
  background: var(--bg-tertiary);
  color: var(--primary-color);
}

/* 移动端面板 */
.mobile-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-panel.active {
  opacity: 1;
  visibility: visible;
}

.panel-content-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: var(--bg-primary);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-panel.active .panel-content-wrapper {
  transform: translateX(0);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.panel-logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.panel-logo .logo-icon {
  font-size: 1.75rem;
  margin-right: 10px;
}

.panel-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.panel-close:hover {
  background: var(--danger-color);
  color: var(--text-light);
}

.panel-content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.mobile-menu {
  list-style: none;
  margin-bottom: 30px;
}

.mobile-item {
  margin-bottom: 10px;
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.3s ease;
}

.mobile-panel.active .mobile-item {
  opacity: 1;
  transform: translateX(0);
}

.mobile-panel.active .mobile-item:nth-child(1) {
  transition-delay: 0.1s;
}

.mobile-panel.active .mobile-item:nth-child(2) {
  transition-delay: 0.2s;
}

.mobile-panel.active .mobile-item:nth-child(3) {
  transition-delay: 0.3s;
}

.mobile-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: var(--border-radius-small);
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.mobile-link:hover,
.mobile-link.active {
  background: var(--gradient-primary);
  color: var(--text-light);
}

.mobile-search {
  margin-top: auto;
}

.mobile-search-form {
  position: relative;
}

.mobile-search-input {
  width: 100%;
  padding: 15px 20px;
  padding-right: 50px;
  border-radius: var(--border-radius-small);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.mobile-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.mobile-search-btn {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

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

/* ==============================
   Main Content
   ============================== */

.main-container {
  min-height: calc(100vh - 80px - 200px);
}

.main-content {
  padding: 40px 0;
}

/* ==============================
   Footer Styles
   ============================== */

.modern-footer {
  background: var(--dark-color);
  color: var(--text-light);
  padding: 50px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  margin-bottom: 30px;
}

.footer-logo {
  font-size: 1.75rem;
  margin-bottom: 15px;
  color: var(--text-light);
}

.footer-logo i {
  color: var(--accent-color);
  margin-right: 10px;
}

.footer-description {
  color: var(--bg-tertiary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--gradient-primary);
  transform: translateY(-3px);
}

.footer-title {
  font-size: 1.25rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 3px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--bg-tertiary);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.footer-links a:hover {
  color: var(--text-light);
  transform: translateX(5px);
}

.newsletter-description {
  color: var(--bg-tertiary);
  margin-bottom: 20px;
  line-height: 1.7;
}

.newsletter-form {
  display: flex;
  gap: 10px;
}

.newsletter-input {
  flex: 1;
  padding: 12px 15px;
  border-radius: var(--border-radius-small);
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-family: 'Poppins', sans-serif;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.newsletter-btn {
  width: 45px;
  height: 45px;
  border-radius: var(--border-radius-small);
  border: none;
  background: var(--gradient-primary);
  color: var(--text-light);
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--bg-tertiary);
  font-size: 0.875rem;
}

.footer-bottom i {
  color: var(--danger-color);
}

/* 响应式设计 */
@media (max-width: 992px) {
  .nav-menu {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-container {
    height: 70px;
  }
  
  .nav-actions {
    gap: 15px;
  }
  
  .search-box {
    display: none;
  }
  
  .panel-content-wrapper {
    width: 100%;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .footer-links a {
    justify-content: center;
  }
  
  .footer-links a:hover {
    transform: translateY(-3px);
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .newsletter-input,
  .newsletter-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .nav-container {
    height: 60px;
    padding: 0 15px;
  }
  
  .logo-link {
    font-size: 1.25rem;
  }
  
  .logo-icon {
    font-size: 1.5rem;
  }
  
  .hamburger {
    width: 35px;
    height: 35px;
    font-size: 1.25rem;
  }
  
  .panel-header {
    padding: 15px;
  }
  
  .panel-logo {
    font-size: 1.25rem;
  }
  
  .panel-close {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  .panel-content {
    padding: 15px;
  }
  
  .mobile-link {
    padding: 12px;
    font-size: 0.875rem;
  }
  
  .mobile-search-input {
    padding: 12px 15px;
    padding-right: 45px;
    font-size: 0.875rem;
  }
  
  .mobile-search-btn {
    font-size: 0.875rem;
    right: 12px;
  }
  
  .main-content {
    padding: 30px 0;
  }
  
  .footer-content {
    gap: 25px;
    padding: 0 15px;
  }
  
  .footer-title {
    font-size: 1.125rem;
  }
}