﻿/* ========================================
   GOM 游戏引擎网站 - 基础样式
   蓝白经典主题
   ======================================== */

/* 容器 */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
     padding: 0 var(--space-lg);
}

.container--wide {
  max-width: var(--container-wide);
}

/* 固定宽度内容区 - 所有内容固定宽度 */
.section-wrapper {
  background: var(--bg-primary);
}

.section-wrapper--secondary {
  background: var(--bg-secondary);
}

.section-wrapper--tertiary {
  background: var(--bg-tertiary);
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section-inner--narrow {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* 全站固定宽度布局 */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

/* 通栏背景类 - 仅背景通栏，内容固定宽度 */
.full-width-bg {
  background: var(--bg-secondary);
}

.full-width-bg .container,
.full-width-bg .section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* 清除通栏效果，让section紧凑 */
.section-tight {
  padding: var(--space-3xl) 0;
}

.section-tight .container {
  max-width: 1200px;
}

/* Flex 工具类 */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

/* Grid 工具类 */
.grid {
  display: grid;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 间距工具类 */
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

.py-section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

.px-section {
  padding-left: var(--space-3xl);
  padding-right: var(--space-3xl);
}

/* 文本工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-white { color: var(--white); }
.text-gray { color: var(--text-secondary); }
.text-light { color: var(--text-secondary); }
.text-dark { color: var(--text-primary); }

.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }

.font-bold { font-weight: var(--font-weight-bold); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-medium { font-weight: var(--font-weight-medium); }

.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }

/* 区块标题 - 科技感升级 */
.section-title {
  text-align: center;
  margin-bottom: var(--space-3xl);
  position: relative;
}

.section-title h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.section-title p {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.section-title--dark h2 {
  color: var(--text-primary);
}

.section-title--dark p {
  color: var(--text-secondary);
}

/* 分隔线 */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin: var(--space-3xl) 0;
}

.divider--primary {
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* 背景 */
.bg-white {
  background-color: var(--bg-primary);
}

.bg-gray {
  background-color: var(--bg-secondary);
}

.bg-dark {
  background-color: var(--bg-tertiary);
}

.bg-darker {
  background-color: var(--bg-primary);
}

.bg-gradient {
  background: var(--gradient-primary);
}

.bg-gradient-light {
  background: var(--gradient-hero);
}

/* 浮动 */
.float-left { float: left; }
.float-right { float: right; }
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* 定位 */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* 显示 */
.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

/* 溢出 */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* 圆角 */
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* 响应式显示 */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .section-title h2 {
    font-size: var(--font-size-3xl);
  }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* 动画基础类 */
.animate-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 渐变文字 - 科技感升级 */
.gradient-text {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 40%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* 玻璃态效果 - 蓝白经典主题 */
.glass {
  background: rgba(26, 26, 46, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass--dark {
  background: rgba(15, 15, 26, 0.9);
  border-color: rgba(255, 255, 255, 0.05);
}

/* 图片占位 */
.img-placeholder {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

/* 链接样式 */
.link {
  color: var(--primary);
  transition: all var(--transition-fast);
}

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

/* 禁用状态 */
.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* 边框 */
.border {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.border-2 {
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.border-primary {
  border-color: var(--primary);
}
