/**
 * H5 Games Tools - 主样式表
 * 赛博朋克风格设计
 */

/* 基础重置与变量 */
:root {
  --primary: #FF0080;
  --primary-dark: #BE0060;
  --secondary: #00F0FF;
  --secondary-dark: #00B8C2;
  --tertiary: #9000FF;
  --text-light: #E0E0E0;
  --text-gray: #888;
  --background: #121220;
  --card-bg: #191927;
  --border-color: rgba(0, 240, 255, 0.5);
  --border-glow: 0 0 10px rgba(0, 240, 255, 0.5);
  --pink-glow: 0 0 10px rgba(255, 0, 128, 0.5);
  --font-primary: 'Orbitron', sans-serif;
  --font-secondary: 'Rajdhani', sans-serif;
}

/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background-color: var(--background);
  color: var(--text-light);
  font-family: var(--font-secondary);
  scroll-behavior: smooth;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  margin-bottom: 1.5rem;
  color: #FFF;
}

h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 2.5rem;
}

h2:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 0 10px rgba(255, 0, 128, 0.5);
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #FFF;
  text-shadow: 0 0 10px var(--secondary);
}

/* 布局系统 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col-6 {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 0 15px;
}

.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0 15px;
}

/* 网格系统响应式 */
@media (min-width: 768px) {
  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  
  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  
  .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 992px) {
  .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

@media (max-width: 767px) {
  .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  .col-sm-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* 导航栏 */
.cyber-nav {
  background-color: rgba(18, 18, 32, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--border-glow);
}

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

.nav-link {
  margin-left: 20px;
  font-family: var(--font-primary);
  font-weight: 500;
  color: var(--text-light);
  position: relative;
}

.nav-link:before {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover:before {
  width: 100%;
}

.nav-link:hover {
  color: #FFF;
  text-shadow: 0 0 10px var(--primary);
}

/* 英雄区域 */
.hero-section {
  padding: 12rem 0 6rem 0;
  background-size: cover;
  background-position: center;
  position: relative;
  background-color: var(--background);
}

.hero-section:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(18, 18, 32, 0.7), rgba(18, 18, 32, 0.2));
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.text-gradient {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
}

.text-gradient:after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  text-shadow: 0 0 20px rgba(255, 0, 128, 0.5);
}

/* 搜索框 */
.cyber-search {
  position: relative;
  width: 100%;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  border: 1px solid var(--border-color);
  background-color: rgba(25, 25, 39, 0.5);
  border-radius: 5px;
  color: var(--text-light);
  font-family: var(--font-secondary);
  font-size: 1rem;
  box-shadow: var(--border-glow);
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--pink-glow);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary);
}

/* 按钮 */
.cyber-button, .cyber-button-pink, .cyber-button-purple {
  display: inline-block;
  padding: 10px 25px;
  background-color: transparent;
  border: 1px solid var(--secondary);
  color: var(--secondary);
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 1rem;
  text-transform: uppercase;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--border-glow);
}

.cyber-button:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.2), transparent);
  transition: all 0.5s ease;
}

.cyber-button:hover:before {
  left: 100%;
}

.cyber-button:hover {
  background-color: var(--secondary-dark);
  color: #FFF;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.7);
}

.cyber-button-pink {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--pink-glow);
}

.cyber-button-pink:before {
  background: linear-gradient(90deg, transparent, rgba(255, 0, 128, 0.2), transparent);
}

.cyber-button-pink:hover {
  background-color: var(--primary-dark);
  color: #FFF;
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.7);
}

.cyber-button-purple {
  border-color: var(--tertiary);
  color: var(--tertiary);
  box-shadow: 0 0 10px rgba(144, 0, 255, 0.5);
}

.cyber-button-purple:before {
  background: linear-gradient(90deg, transparent, rgba(144, 0, 255, 0.2), transparent);
}

.cyber-button-purple:hover {
  background-color: #7000c2;
  color: #FFF;
  box-shadow: 0 0 20px rgba(144, 0, 255, 0.7);
}

.cyber-button-blue {
  border-color: #00F0FF;
  color: #00F0FF;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.cyber-button-yellow {
  border-color: #FFDD00;
  color: #FFDD00;
  box-shadow: 0 0 10px rgba(255, 221, 0, 0.5);
}

/* 卡片 */
.cyber-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--border-glow);
  height: 100%;
}

.cyber-card:hover {
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.7);
  transform: translateY(-5px);
}

/* 统一模块化游戏卡片样式 */
.game-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  background-color: #191927;
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 240, 255, 0.4);
}

.game-card-image {
  position: relative;
  overflow: hidden;
  height: 180px;
  width: 100%;
}

.game-card-image img,
.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

/* 确保没有伪元素显示额外内容 */
.game-card-image::before,
.game-card-image::after {
  display: none !important;
}

/* 确保没有子元素绝对定位到左上角 */
.game-card-image > * {
  position: relative;
}

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

.game-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  background: linear-gradient(to top, rgba(25, 25, 39, 0.9), transparent);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.game-card-title {
  margin: 0 0 10px 0;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  color: #fff;
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.7);
}

.game-rating {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.stars {
  color: #FF0080;
  margin-right: 10px;
}

.game-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  padding: 8px 20px;
  background-color: #FF0080;
  border: 2px solid #FF0080;
  color: #fff;
  border-radius: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 0 15px rgba(255, 0, 128, 0.5);
}

.game-card:hover .game-card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.game-card-play:hover {
  background-color: transparent;
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.8);
}

.game-card-content {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.game-card-description {
  color: #b3b3cc;
  margin-bottom: 15px;
  font-size: 0.9rem;
  line-height: 1.5;
  flex-grow: 1;
}

.game-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.game-card-tags a {
  text-decoration: none;
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* 分类标签 */
.category-tag, .category-tag-pink {
  display: inline-block;
  padding: 5px 10px;
  background-color: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--secondary);
  color: var(--secondary);
  border-radius: 3px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.category-tag:hover {
  background-color: var(--secondary);
  color: #000;
}

.category-tag-pink {
  background-color: rgba(255, 0, 128, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.category-tag-pink:hover {
  background-color: var(--primary);
  color: #FFF;
}

/* 分类筛选 */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-filter {
  padding: 5px 15px;
  font-size: 0.85rem;
}

.category-filter.active {
  background-color: var(--secondary-dark);
  color: #FFF;
}

/* 分类卡片 */
.category-card {
  display: block; 
  padding: 2rem; 
  text-align: center;
}

/* 特色游戏部分 */
.featured-games {
  padding: 5rem 0;
}

/* 页脚 */
.cyber-footer {
  background-color: rgba(18, 18, 32, 0.9);
  padding: 5rem 0 1rem 0;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

/* 文字故障效果 */
.glitch-text {
  position: relative;
  animation: glitch 5s infinite;
}

.glitch-text:before, .glitch-text:after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.glitch-text:before {
  left: 2px;
  text-shadow: -1px 0 var(--primary);
  animation: glitch-animation 0.5s infinite;
  animation-play-state: paused;
}

.glitch-text:after {
  left: -2px;
  text-shadow: 1px 0 var(--secondary);
  animation: glitch-animation2 0.5s infinite;
  animation-play-state: paused;
}

.logo:hover .glitch-text:before,
.logo:hover .glitch-text:after {
  animation-play-state: running;
}

@keyframes glitch-animation {
  0% {
    clip-path: inset(80% 0 0 0);
  }
  20% {
    clip-path: inset(10% 0 60% 0);
  }
  40% {
    clip-path: inset(40% 0 20% 0);
  }
  60% {
    clip-path: inset(5% 0 80% 0);
  }
  80% {
    clip-path: inset(60% 0 5% 0);
  }
  100% {
    clip-path: inset(10% 0 90% 0);
  }
}

@keyframes glitch-animation2 {
  0% {
    clip-path: inset(15% 0 70% 0);
  }
  20% {
    clip-path: inset(50% 0 30% 0);
  }
  40% {
    clip-path: inset(10% 0 60% 0);
  }
  60% {
    clip-path: inset(70% 0 10% 0);
  }
  80% {
    clip-path: inset(20% 0 70% 0);
  }
  100% {
    clip-path: inset(40% 0 30% 0);
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .hero-section {
    padding: 10rem 0 4rem 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .cyber-nav .row {
    flex-direction: column;
  }
  
  .logo {
    margin-bottom: 1rem;
  }
  
  nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }
  
  .category-filters {
    justify-content: center;
    margin-top: 1rem;
  }
}

@media (max-width: 576px) {
  h2 {
    font-size: 1.8rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .category-filter {
    font-size: 0.75rem;
  }
}

/* 通知样式 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--secondary);
  border-radius: 5px;
  padding: 15px 20px;
  box-shadow: var(--border-glow);
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2000;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
} 