/*
# base.css
# Written by: 广州羲驭科技有限公司
# Description: Base styles for the project, including CSS reset, basic layout, and utility classes.
# Copyright: © 2024-2025 广州羲驭科技有限公司. All rights reserved. | 粤ICP备2025458335号
*/

/* ===== Vista Geometric Glass 基础样式 ===== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: white;
  background: var(--bg-primary);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* ===== 基础元素样式 ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
  color: white;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-4);
  color: rgba(255, 255, 255, 0.9);
}

a {
  color: var(--vista-glass-teal);
  text-decoration: none;
  transition: all var(--animation-medium) var(--ease-out-smooth);
  position: relative;
}

a:hover {
  color: var(--vista-glass-blue);
  text-shadow: var(--vista-glow-teal);
}

a:focus {
  outline: 2px solid var(--glass-border-teal);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ===== 列表样式 ===== */
ul, ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

li {
  margin-bottom: var(--space-2);
  color: rgba(255, 255, 255, 0.9);
}

/* ===== 按钮基础样式 ===== */
button {
  font-family: inherit;
  font-size: inherit;
  font-weight: var(--font-medium);
  line-height: 1;
  cursor: pointer;
  border: none;
  background: none;
  transition: all var(--animation-medium) var(--ease-out-smooth);
}

button:focus {
  outline: 2px solid var(--glass-border-teal);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== 输入框基础样式 ===== */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: white;
  background: var(--glass-layer-2);
  border: 1px solid var(--glass-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  transition: all var(--animation-medium) var(--ease-out-smooth);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--glass-border-teal);
  background: var(--glass-layer-3);
  box-shadow: var(--vista-glow-teal);
}

input::placeholder, textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* ===== 图片样式 ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
}

/* ===== 选择文本样式 ===== */
::selection {
  background: rgba(0, 217, 199, 0.3);
  color: white;
}

::-moz-selection {
  background: rgba(0, 217, 199, 0.3);
  color: white;
}

/* ===== 滚动条样式 ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--glass-layer-1);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--glass-layer-3);
  border: 1px solid var(--glass-border-light);
  border-radius: var(--radius-full);
  transition: all var(--animation-medium) var(--ease-out-smooth);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--glass-layer-4);
  border-color: var(--glass-border-medium);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

/* Firefox 滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--glass-layer-3) var(--glass-layer-1);
}

/* ===== 基础工具类 ===== */
/* 容器 */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

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

.container-lg {
  max-width: var(--container-2xl);
}

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

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

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

.leading-tight { line-height: var(--leading-tight); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }

/* 间距工具类 */
.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.ml-0 { margin-left: 0; }
.mr-0 { margin-right: 0; }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.p-12 { padding: var(--space-12); }
.p-16 { padding: var(--space-16); }

.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1 { padding-top: var(--space-1); padding-bottom: var(--space-1); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }

.px-0 { padding-left: 0; padding-right: 0; }
.px-1 { padding-left: var(--space-1); padding-right: var(--space-1); }
.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }

/* 显示工具类 */
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* 位置工具类 */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Flex 工具类 */
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.flex-auto { flex: auto; }
.flex-none { flex: none; }

/* Grid 工具类 */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* 圆角工具类 */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-3xl { border-radius: var(--radius-3xl); }
.rounded-full { border-radius: var(--radius-full); }

/* 阴影工具类 */
.shadow-none { box-shadow: none; }
.shadow-sm { box-shadow: var(--glass-shadow-subtle); }
.shadow-md { box-shadow: var(--glass-shadow-medium); }
.shadow-lg { box-shadow: var(--glass-shadow-strong); }
.shadow-xl { box-shadow: var(--glass-shadow-hover); }

/* 过渡工具类 */
.transition-none { transition: none; }
.transition-all { transition: all var(--animation-medium) var(--ease-out-smooth); }
.transition-colors { transition: color var(--animation-medium) var(--ease-out-smooth), background-color var(--animation-medium) var(--ease-out-smooth), border-color var(--animation-medium) var(--ease-out-smooth); }
.transition-transform { transition: transform var(--animation-medium) var(--ease-out-smooth); }

/* 变换工具类 */
.scale-95 { transform: scale(0.95); }
.scale-100 { transform: scale(1); }
.scale-105 { transform: scale(1.05); }
.scale-110 { transform: scale(1.1); }
.rotate-0 { transform: rotate(0deg); }
.rotate-45 { transform: rotate(45deg); }
.rotate-90 { transform: rotate(90deg); }
.rotate-180 { transform: rotate(180deg); }

/* 不透明度工具类 */
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Z-index 工具类 */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* ===== 响应式基础 ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-3);
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
}

@media (max-width: 640px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 var(--space-2);
  }
}

/* ===== 可访问性工具类 ===== */

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible for better keyboard navigation */
.focus-visible {
  outline: 2px solid var(--vista-glass-teal);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip to main content link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--glass-layer-4);
  color: white;
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  border-radius: var(--radius-md);
  z-index: 1000;
  transition: top var(--animation-medium) var(--ease-out-smooth);
}

.skip-to-content:focus {
  top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --glass-border-light: rgba(255, 255, 255, 0.8);
    --glass-border-medium: rgba(255, 255, 255, 0.9);
    --glass-border-teal: #00D9C7;
  }

  .glass-card {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--glass-border-light);
  }
}

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

  html {
    scroll-behavior: auto;
  }
}

/* Better focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--vista-glass-teal);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(0, 217, 199, 0.2);
}

/* Ensure text remains readable in high contrast */
@media (prefers-contrast: high) {
  body {
    color: white;
    background: black;
  }

  .glass-card {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid white;
  }
}

/* Improved color contrast for links */
a {
  color: #00D9C7;
}

a:hover {
  color: #00B5A6;
}

a:focus-visible {
  color: #00FFEE;
}

/* Better button contrast */
.glass-button {
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-button:focus-visible {
  border-color: #00D9C7;
  box-shadow: 0 0 0 3px rgba(0, 217, 199, 0.3);
}

/* ===== Footer 样式 (新) ===== */
.footer {
  background: var(--bg-secondary);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-20);
  color: white;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer-column {
  padding: var(--space-4) 0;
}

.footer-column h3 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: white;
  margin-bottom: var(--space-6);
  position: relative;
}

.footer-column h3::before {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--vista-glass-teal);
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: var(--space-3);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.8);
}

.footer-column a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--animation-medium) var(--ease-out-smooth);
}

.footer-column a:hover {
  color: var(--vista-glass-teal);
}

/* 广州羲驭科技 - 特有样式 */
.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.footer-brand .footer-logo img {
  height: 40px;
}

.footer-brand .footer-logo span {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: white;
}

.footer-brand p {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
  max-width: 250px;
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.footer-social .social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: var(--text-sm);
  transition: background var(--animation-medium) var(--ease-out-smooth);
}

.footer-social .social-link:hover {
  background: var(--vista-glass-teal);
}

/* 联系方式 - 特有样式 */
.footer-contact li strong {
  color: white;
  font-weight: var(--font-medium);
  margin-right: var(--space-1);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.footer-contact li::before {
  content: ''; /* 移除默认圆点 */
  display: none;
}

.footer-contact li:nth-child(1)::before {
  content: '📍';
  display: inline-block;
  font-size: 1.2em;
  line-height: 1;
}
.footer-contact li:nth-child(2)::before {
  content: '✉️';
  display: inline-block;
  font-size: 1.2em;
  line-height: 1;
}
.footer-contact li:nth-child(3)::before {
  content: '🕒';
  display: inline-block;
  font-size: 1.2em;
  line-height: 1;
}

/* Footer 底部版权 */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-6);
  text-align: center;
  margin-top: var(--space-12);
}

.footer-bottom p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* ===== Footer 响应式设计 (新) ===== */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-10);
  }
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }

  .footer-column h3::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-brand p {
    max-width: 100%;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-contact li {
    justify-content: center;
  }
}
