/* -------------------------------------------------------------
 * Theme: Light Frosted Glassmorphism (内蒙古相识搭子科技有限公司官网)
 * Author: Antigravity AI
 * ------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* HSL Color System - Light/White Theme */
  --bg-color: hsl(210, 40%, 98%); /* Soft slate light white background */
  --bg-grid-color: hsla(220, 20%, 80%, 0.12); /* Clean subtle gray grid lines */
  --glass-bg: rgba(255, 255, 255, 0.65); /* Frosted glass white card background */
  --glass-bg-hover: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.8); /* Semi-transparent bright white border */
  --glass-border-hover: hsla(192, 95%, 35%, 0.35);
  
  --primary: hsl(192, 95%, 35%); /* Ocean Cyan for readability */
  --primary-glow: hsla(192, 95%, 35%, 0.08);
  --secondary: hsl(258, 89%, 55%); /* Bright Royal Purple */
  --secondary-glow: hsla(258, 89%, 55%, 0.08);
  --accent-gold: hsl(35, 92%, 40%); /* Rich Gold */
  --accent-danger: hsl(0, 80%, 50%); /* Danger Red */
  
  --text-main: hsl(220, 40%, 16%); /* Slate 800 - Deep readability */
  --text-muted: hsl(220, 14%, 46%); /* Slate 500 - Pleasant secondary */
  --text-dark: #ffffff; /* Contrast text on primary buttons */
  
  --font-display: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 32px 0 rgba(148, 163, 184, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  --shadow-glow-cyan: 0 0 15px hsla(192, 95%, 35%, 0.15);
  --shadow-glow-purple: 0 0 15px hsla(258, 89%, 55%, 0.15);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
}

/* Base Styles & Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  /* Cyber Grid Background overlay (Light Theme) */
  background-image: 
    linear-gradient(to right, var(--bg-grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--bg-grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Ambient Radial Glows (Soft pastel colors) */
body::before {
  content: "";
  position: absolute;
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, hsla(192, 95%, 35%, 0.08) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: "";
  position: absolute;
  top: 600px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, hsla(258, 89%, 55%, 0.08) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: hsla(220, 20%, 75%, 0.6);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(220, 40%, 12%); /* Slightly darker for headings */
}

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

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: var(--transition-normal);
}

header.scrolled {
  background: rgba(255, 255, 255, 0.8);
  border-bottom-color: rgba(203, 213, 225, 0.8);
  box-shadow: 0 4px 20px rgba(148, 163, 184, 0.08);
}

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

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-img {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 182, 212, 0.15);
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  fill: var(--primary);
  filter: drop-shadow(0 2px 4px var(--primary-glow));
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-display);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  transition: var(--transition-fast);
}

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

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

.nav-btn {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.8);
  color: var(--text-main);
  padding: 0.5rem 1.25rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.nav-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow-cyan);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background-color: var(--text-main);
  transition: var(--transition-fast);
}

/* Glassmorphism Panel Component (Clean Frosted Glass Look) */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 2.5rem;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
  pointer-events: none;
}

.glass-panel:hover {
  border-color: var(--glass-border-hover);
  background-color: var(--glass-bg-hover);
  box-shadow: 0 12px 40px rgba(148, 163, 184, 0.18);
}

/* Common Section Layout */
section {
  padding: 8rem 2rem 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.section-badge {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  display: inline-block;
  background: hsla(192, 95%, 35%, 0.06);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  border: 1px solid hsla(192, 95%, 35%, 0.15);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, hsl(220, 40%, 10%) 50%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0.85rem 2rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, hsla(192, 95%, 25%, 1) 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px hsla(192, 95%, 35%, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px hsla(192, 95%, 35%, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--secondary);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 15px rgba(148, 163, 184, 0.15);
}

/* -------------------------------------------------------------
 * PAGE: INDEX (HOMEPAGE)
 * ------------------------------------------------------------- */
.hero-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 4rem;
  min-height: 85vh;
  padding-top: 10rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, hsl(220, 40%, 10%) 30%, var(--primary) 70%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 580px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
}

/* Hero Decorative Graphic */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-glow-sphere {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(192, 95%, 35%, 0.08) 0%, hsla(258, 89%, 55%, 0.08) 50%, transparent 100%);
  filter: blur(20px);
  position: absolute;
  animation: float 6s ease-in-out infinite alternate;
}

.hero-logo-box {
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 10px 40px rgba(148, 163, 184, 0.15);
  animation: float 6s ease-in-out infinite;
}

.hero-logo-box svg {
  width: 100px;
  height: 100px;
  fill: var(--primary);
  filter: drop-shadow(0 4px 8px var(--primary-glow));
}

@keyframes float {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-20px) rotate(5deg); }
}

/* Service Cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-radius: var(--border-radius-md);
}

.service-icon-wrapper {
  width: 4rem;
  height: 4rem;
  border-radius: var(--border-radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  background: hsla(192, 95%, 35%, 0.06);
  border: 1px solid hsla(192, 95%, 35%, 0.15);
  color: var(--primary);
  box-shadow: inset 0 0 10px hsla(192, 95%, 35%, 0.05);
}

.service-card:nth-child(2) .service-icon-wrapper {
  background: hsla(258, 89%, 55%, 0.06);
  border-color: hsla(258, 89%, 55%, 0.15);
  color: var(--secondary);
  box-shadow: inset 0 0 10px hsla(258, 89%, 55%, 0.05);
}

.service-card:nth-child(3) .service-icon-wrapper {
  background: hsla(35, 92%, 40%, 0.06);
  border-color: hsla(35, 92%, 40%, 0.15);
  color: var(--accent-gold);
  box-shadow: inset 0 0 10px hsla(35, 92%, 40%, 0.05);
}

.service-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.service-desc {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-features {
  list-style: none;
  margin-top: 1rem;
  width: 100%;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.service-features li svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: var(--primary);
}

.service-card:nth-child(2) .service-features li svg {
  fill: var(--secondary);
}

/* Feature Showcase (Intro) */
.intro-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: center;
}

.intro-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.stat-box {
  text-align: center;
  padding: 2rem 1.5rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

/* -------------------------------------------------------------
 * PAGE: QUERY (CERTIFICATE QUERY)
 * ------------------------------------------------------------- */
.query-box {
  max-width: 700px;
  margin: 0 auto;
}

.search-form {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.form-group-input {
  position: relative;
  flex-grow: 1;
}

.form-group-input svg {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  fill: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 1.1rem 1.25rem 1.1rem 3.25rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--border-radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1.05rem;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 10px rgba(0, 182, 212, 0.1);
}

/* Search Certificate Visualizer */
.certificate-wrapper {
  margin-top: 3rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  display: none;
}

.certificate-wrapper.active {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

/* Certificate styling - Made to look like a premium paper document */
.cert-card {
  width: 100%;
  border: 2px solid var(--accent-gold);
  border-radius: var(--border-radius-md);
  background: #fdfcf9; /* Light cream textured-feel background */
  padding: 3.5rem;
  position: relative;
  box-shadow: 0 10px 45px rgba(148, 163, 184, 0.15);
  overflow: hidden;
  color: #1e293b;
}

/* Certificate Golden Border Frames */
.cert-card::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 10px;
  right: 10px;
  border: 1px solid hsla(35, 92%, 40%, 0.2);
  pointer-events: none;
  border-radius: calc(var(--border-radius-md) - 8px);
}

.cert-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 900;
  color: rgba(217, 119, 6, 0.02);
  pointer-events: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid hsla(35, 92%, 40%, 0.3);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
}

.cert-title-container {
  display: flex;
  flex-direction: column;
}

.cert-main-title {
  font-size: 1.8rem;
  color: var(--accent-gold);
  letter-spacing: 0.1em;
  font-weight: 800;
}

.cert-sub-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cert-id {
  font-family: var(--font-display);
  color: var(--accent-gold);
  background: hsla(35, 92%, 40%, 0.06);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid hsla(35, 92%, 40%, 0.25);
  font-size: 0.95rem;
  font-weight: 600;
}

.cert-body {
  margin-bottom: 3rem;
  line-height: 2;
}

.cert-text {
  font-size: 1.15rem;
  color: #334155;
  text-align: justify;
  margin-bottom: 2rem;
}

.cert-highlight {
  color: #0f172a;
  font-weight: 700;
  border-bottom: 1px solid rgba(0,0,0,0.4);
  padding: 0 4px;
}

.cert-details-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 3rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 1.5rem;
}

.cert-detail-item {
  display: flex;
  flex-direction: column;
}

.cert-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cert-value {
  font-size: 1.05rem;
  color: #1e293b;
  font-weight: 600;
}

.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.cert-sign {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cert-sign-title {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cert-sign-company {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.cert-seal-box {
  position: relative;
  width: 120px;
  height: 120px;
}

/* Security Seal rendering in CSS */
.cert-seal {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 110px;
  height: 110px;
  border: 3px double hsla(0, 80%, 45%, 0.8);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transform: rotate(-10deg);
  background: rgba(255, 0, 0, 0.02);
  color: hsla(0, 80%, 45%, 0.8);
  font-weight: 700;
  font-size: 0.7rem;
  line-height: 1.2;
  text-align: center;
  user-select: none;
  pointer-events: none;
}

.cert-seal::before {
  content: "★";
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.cert-seal-text {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Status overlays */
.cert-badge-overlay {
  position: absolute;
  top: 110px;
  right: 40px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  transform: rotate(15deg);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cert-status-valid {
  border: 2px solid #16a34a;
  color: #16a34a;
  background: rgba(22, 163, 74, 0.05);
}

.cert-status-expired {
  border: 2px solid #ca8a04;
  color: #ca8a04;
  background: rgba(202, 138, 4, 0.05);
}

.cert-status-revoked {
  border: 2px solid #dc2626;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.05);
}

.cert-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.query-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  display: none;
}

.query-empty.active {
  display: block;
}

/* -------------------------------------------------------------
 * PAGE: QUALIFICATIONS (资质展示)
 * ------------------------------------------------------------- */
.qualifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.qualification-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.qual-badge-container {
  aspect-ratio: 4/3;
  width: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(241,245,249,0.7) 100%);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  overflow: hidden;
  position: relative;
  transition: var(--transition-fast);
}

.qualification-card:hover .qual-badge-container {
  border-color: var(--primary);
  transform: scale(1.02);
}

/* Custom vector qualification preview shapes */
.qual-svg-preview {
  width: 60%;
  height: 60%;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.5;
  filter: drop-shadow(0 2px 4px var(--primary-glow));
}

.qualification-card:nth-child(even) .qual-svg-preview {
  stroke: var(--secondary);
  filter: drop-shadow(0 2px 4px var(--secondary-glow));
}

.qual-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.qual-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 1px;
}

.qualification-card:nth-child(even) .qual-category {
  color: var(--secondary);
}

.qual-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.qual-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Fullscreen Preview Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.45); /* Soft dim layout */
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content-wrapper {
  max-width: 800px;
  width: 100%;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: -3.5rem;
  right: 0;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 2.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

/* -------------------------------------------------------------
 * PAGE: DOWNLOAD (下载中心)
 * ------------------------------------------------------------- */
.download-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.download-card {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  align-items: center;
  gap: 2.5rem;
}

.download-icon {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: var(--border-radius-md);
  background: linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(241,245,249,0.7) 100%);
  border: 1px solid var(--glass-border);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary);
}

.download-card:nth-child(even) .download-icon {
  color: var(--secondary);
}

.download-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  fill: currentColor;
}

.download-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.download-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.download-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 4px;
  color: var(--text-muted);
}

.download-details-grid {
  display: flex;
  gap: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.download-details-grid span strong {
  color: var(--text-main);
}

.download-checksum {
  font-family: monospace;
  background: rgba(0, 0, 0, 0.04);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: #334155;
}

/* -------------------------------------------------------------
 * PAGE: ADMIN (后台管理系统)
 * ------------------------------------------------------------- */
.admin-login-box {
  max-width: 450px;
  margin: 10rem auto 4rem auto;
}

.admin-login-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.admin-form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-form-group label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.admin-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--border-radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

.admin-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
}

.admin-login-btn {
  width: 100%;
  margin-top: 1rem;
}

/* Admin Dashboard layout */
.admin-dashboard {
  max-width: 1200px;
  margin: 6rem auto;
  padding: 2rem;
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding-bottom: 1.5rem;
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.admin-stat-card {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.admin-stat-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--border-radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  background: hsla(192, 95%, 35%, 0.06);
  color: var(--primary);
}

.admin-stat-card:nth-child(2) .admin-stat-icon {
  background: hsla(258, 89%, 55%, 0.06);
  color: var(--secondary);
}

.admin-stat-card:nth-child(3) .admin-stat-icon {
  background: hsla(35, 92%, 40%, 0.06);
  color: var(--accent-gold);
}

.admin-stat-content {
  display: flex;
  flex-direction: column;
}

.admin-stat-val {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.admin-stat-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Navigation Tabs */
.admin-tabs-nav {
  display: flex;
  gap: 1rem;
  list-style: none;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.admin-tab-item {
  padding: 1rem 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  position: relative;
  white-space: nowrap;
}

.admin-tab-item.active {
  color: var(--primary);
}

.admin-tab-item.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

.admin-section-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* Admin Tables styling */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

th, td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

th {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.01);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.4);
}

.badge {
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-valid { background: rgba(34, 197, 94, 0.1); color: #15803d; border: 1px solid rgba(34, 197, 94, 0.2); }
.badge-expired { background: rgba(156, 163, 175, 0.1); color: #4b5563; border: 1px solid rgba(156, 163, 175, 0.2); }
.badge-revoked { background: rgba(239, 68, 68, 0.1); color: #b91c1c; border: 1px solid rgba(239, 68, 68, 0.2); }

.action-buttons {
  display: flex;
  gap: 0.75rem;
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.action-btn:hover {
  color: var(--text-main);
}

.action-btn-edit:hover { color: var(--primary); }
.action-btn-delete:hover { color: var(--accent-danger); }

.action-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

/* Admin Dialog Forms */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(8px);
  z-index: 12000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.dialog-overlay.active {
  display: flex;
}

.dialog-box {
  width: 100%;
  max-width: 550px;
}

.dialog-header {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding-bottom: 0.75rem;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

/* Toast Message Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toast {
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 10px 25px rgba(148, 163, 184, 0.15);
  color: var(--text-main);
  backdrop-filter: blur(8px);
  transform: translateX(120%);
  transition: transform var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast.active {
  transform: translateX(0);
}

.toast-success { border-left: 4px solid #22c55e; }
.toast-error { border-left: 4px solid #ef4444; }

/* -------------------------------------------------------------
 * FOOTER
 * ------------------------------------------------------------- */
footer {
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  padding: 4rem 2rem 2rem 2rem;
  margin-top: 8rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* -------------------------------------------------------------
 * RESPONSIVENESS (MOBILE ADAPTATION)
 * ------------------------------------------------------------- */
@media (max-width: 992px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
    min-height: auto;
    padding-top: 8rem;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
  
  .intro-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .download-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .nav-links {
    position: fixed;
    top: 4.8rem;
    left: -100%;
    width: 100%;
    height: calc(100vh - 4.8rem);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 3rem 0;
    gap: 2.5rem;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition-normal);
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .cert-card {
    padding: 2rem 1.5rem;
  }
  
  .cert-details-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .cert-footer {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  
  .cert-seal-box {
    margin-right: 0;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .admin-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

/* -------------------------------------------------------------
 * PRINT MEDIA STYLING (FOR CERTIFICATES ONLY)
 * ------------------------------------------------------------- */
@media print {
  body {
    background: white !important;
    color: black !important;
    font-family: 'SimSun', 'STSong', 'Georgia', serif;
  }
  
  header, footer, section:not(#query-section), .section-header, .search-form, .cert-actions, .cert-badge-overlay {
    display: none !important;
  }
  
  section {
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .query-box {
    max-width: 100% !important;
  }
  
  .certificate-wrapper {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    margin-top: 0 !important;
  }
  
  .cert-card {
    border: 3px double #000 !important;
    background: white !important;
    box-shadow: none !important;
    color: black !important;
    padding: 2cm !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    page-break-inside: avoid;
  }
  
  .cert-card::after {
    border: 1px solid #333 !important;
  }
  
  .cert-main-title {
    color: black !important;
  }
  
  .cert-id {
    background: none !important;
    border: 1px solid black !important;
    color: black !important;
  }
  
  .cert-highlight {
    color: black !important;
    font-weight: bold !important;
    text-decoration: underline;
  }
  
  .cert-value {
    color: black !important;
  }
  
  .cert-seal {
    border-color: red !important;
    color: red !important;
    opacity: 0.85 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .cert-watermark {
    color: rgba(0, 0, 0, 0.05) !important;
  }
}
