/* 开元棋牌 - 完整样式表 */
:root {
  --primary: #f0c040;
  --primary-dark: #d4a830;
  --primary-glow: rgba(240, 192, 64, 0.3);
  --bg: #0f0f23;
  --bg-card: rgba(255, 255, 255, 0.05);
  --text: #e0e0e0;
  --text-light: #a0a0b0;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
  --transition-slow: 0.6s ease;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="light"] {
  --bg: #f5f5fa;
  --bg-card: rgba(0, 0, 0, 0.03);
  --text: #1a1a2e;
  --text-light: #555;
  --glass: rgba(0, 0, 0, 0.04);
  --glass-border: rgba(0, 0, 0, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --primary-glow: rgba(240, 192, 64, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(15, 15, 35, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition-slow);
}

[data-theme="light"] header {
  background: rgba(245, 245, 250, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
  user-select: none;
}

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

nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}

nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  position: relative;
  transition: var(--transition);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

nav a.active {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text);
  background: none;
  border: none;
  padding: 4px;
  transition: var(--transition);
}

.menu-toggle:hover {
  color: var(--primary);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--glass-border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--glass);
  border-color: var(--primary);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .hero {
  background: linear-gradient(135deg, #e8e8f0 0%, #d0d0e8 50%, #c0c0e0 100%);
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 192, 64, 0.15), transparent 70%);
  top: -100px;
  right: -100px;
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 192, 64, 0.08), transparent 70%);
  bottom: -80px;
  left: -80px;
  animation: float 10s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .hero h1 {
  color: #1a1a2e;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.hero h1 em {
  color: var(--primary);
  font-style: normal;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

.btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary);
  color: #1a1a2e;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--glass-border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(240, 192, 64, 0.05);
}

/* ===== Sections ===== */
section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-sub {
  text-align: center;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 50px;
  font-size: 1.05rem;
}

/* ===== Grids ===== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

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

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

/* ===== Cards ===== */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 30px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  border-color: rgba(240, 192, 64, 0.3);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.badge {
  display: inline-block;
  background: rgba(240, 192, 64, 0.15);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
  border: 1px solid rgba(240, 192, 64, 0.2);
}

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item {
  padding: 30px;
  background: var(--glass);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  color: var(--text-light);
  margin-top: 6px;
  font-size: 0.95rem;
}

/* ===== Banner Slider ===== */
.banner-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  height: 400px;
  background: var(--glass);
  box-shadow: var(--shadow);
}

.banner-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.8s ease;
  padding: 40px;
  text-align: center;
  background: linear-gradient(135deg, rgba(15, 15, 35, 0.8), rgba(22, 33, 62, 0.8));
}

[data-theme="light"] .banner-slide {
  background: linear-gradient(135deg, rgba(245, 245, 250, 0.9), rgba(208, 208, 232, 0.9));
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide h2 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: #fff;
}

[data-theme="light"] .banner-slide h2 {
  color: #1a1a2e;
}

.banner-slide p {
  max-width: 500px;
  color: var(--text-light);
  margin-bottom: 20px;
}

.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--glass-border);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.dot.active {
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.dot:hover {
  background: var(--primary);
}

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid var(--glass-border);
  padding: 18px 0;
  cursor: pointer;
  transition: var(--transition);
}

.faq-item:hover {
  padding-left: 8px;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.05rem;
  user-select: none;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  color: var(--text-light);
  padding-top: 0;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-top: 12px;
}

.faq-toggle {
  font-size: 1.4rem;
  transition: var(--transition);
  font-weight: 300;
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
  color: var(--primary);
}

/* ===== Article Cards ===== */
.article-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  position: relative;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(240, 192, 64, 0.2);
}

.article-card .date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.article-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.article-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.article-card .read-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.article-card .read-more:hover {
  padding-left: 4px;
}

/* ===== HowTo ===== */
.howto-steps {
  counter-reset: step;
}

.howto-step {
  padding: 20px 0;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: var(--transition);
}

.howto-step:hover {
  padding-left: 8px;
}

.howto-step::before {
  counter-increment: step;
  content: counter(step);
  background: var(--primary);
  color: #1a1a2e;
  font-weight: 800;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.howto-step h4 {
  margin-bottom: 6px;
}

.howto-step p {
  color: var(--text-light);
}

/* ===== Footer ===== */
footer {
  background: var(--glass);
  border-top: 1px solid var(--glass-border);
  padding: 60px 20px 30px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--primary);
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--text-light);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-light);
  transition: var(--transition);
}

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

.qr-placeholder {
  width: 100px;
  height: 100px;
  background: var(--glass);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  margin-top: 8px;
  transition: var(--transition);
}

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

/* ===== Back to Top ===== */
.back-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #1a1a2e;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.back-top:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px var(--primary-glow);
}

/* ===== Search Modal ===== */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.search-modal.open {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.search-box {
  background: var(--bg);
  padding: 30px;
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.search-box input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--glass);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-results {
  margin-top: 16px;
  max-height: 300px;
  overflow-y: auto;
}

.search-results::-webkit-scrollbar {
  width: 6px;
}

.search-results::-webkit-scrollbar-track {
  background: var(--glass);
  border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

.search-result-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
  cursor: pointer;
  transition: var(--transition);
}

.search-result-item:hover {
  color: var(--primary);
  padding-left: 4px;
}

/* ===== Additional Sections ===== */
#culture, #team, #advantages, #solutions, #clients, #testimonials, #faq, #contact {
  background: var(--glass);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero h1 {
    font-size: 2.6rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .banner-slider {
    height: 350px;
  }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .banner-slider {
    height: 300px;
  }
  .banner-slide h2 {
    font-size: 1.5rem;
  }
  nav ul {
    display: none;
    flex-direction: column;
    background: var(--bg);
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
  }
  [data-theme="light"] nav ul {
    background: var(--bg);
  }
  nav ul.open {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .stat-number {
    font-size: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .back-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
  .section-title {
    font-size: 1.4rem;
  }
  .section-sub {
    font-size: 0.9rem;
    margin-bottom: 30px;
  }
  .card {
    padding: 20px;
  }
  .banner-slider {
    height: 250px;
  }
  .banner-slide {
    padding: 20px;
  }
  .banner-slide h2 {
    font-size: 1.3rem;
  }
  .stat-number {
    font-size: 1.6rem;
  }
  .hero::before,
  .hero::after {
    width: 300px;
    height: 300px;
  }
  .search-box {
    padding: 20px;
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== Selection ===== */
::selection {
  background: var(--primary);
  color: #1a1a2e;
}

/* ===== Focus ===== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== Utility ===== */
.read-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  display: inline-block;
}

.read-more:hover {
  padding-left: 4px;
  color: var(--primary-dark);
}

/* ===== Print ===== */
@media print {
  header, .back-top, .search-modal, .banner-dots, .menu-toggle, .theme-toggle {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .card, .stat-item, .article-card {
    break-inside: avoid;
  }
}