﻿/* ============================================================
   head.css - H5Tool 网站基础样式库
   亮色主题 | 响应式 | 兼容 IE11+ & Android 5.1 WebView
   ============================================================ */

/* ---------- CSS Variables (IE11 falls back to direct values) ---------- */
:root {
  --color-primary: #7c3aed;
  --color-primary-light: #a78bfa;
  --color-primary-dark: #6d28d9;
  --color-secondary: #8b5cf6;
  --color-accent: #ff6b6b;
  --color-accent-light: #ff8e8e;
  --color-bg: #f0f4f8;
  --color-bg-alt: #e8edf2;
  --color-card: #ffffff;
  --color-text: #2c3e50;
  --color-text-light: #5a6c7d;
  --color-text-muted: #8a9baa;
  --color-border: #dde4ed;
  --color-success: #27ae60;
  --color-warning: #f39c12;
  --color-info: #3498db;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-round: 50px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 40px rgba(0,0,0,0.15);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
  --navbar-height: 60px;
  --sidebar-width: 280px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(124,58,237,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(139,92,246,0.04) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary-dark); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 0.5em;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

/* ---------- Form Elements ---------- */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
input::placeholder, textarea::placeholder {
  color: var(--color-text-muted);
}

/* ---------- Focus visible ---------- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---------- Layout ---------- */
.h5-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.h5-main {
  padding-top: calc(var(--navbar-height) + 24px);
  padding-bottom: 40px;
  min-height: calc(100vh - var(--navbar-height) - 60px);
}

.h5-section {
  padding: 40px 0;
}
.h5-section + .h5-section {
  border-top: 1px solid var(--color-border);
}

/* ============================================================
   NAVBAR - 顶部导航栏
   ============================================================ */
.h5-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--navbar-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.h5-navbar.scrolled {
  background: rgba(255,255,255,0.98);
  box-shadow: var(--shadow-md);
}

.h5-navbar-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* -- Logo -- */
.h5-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}
.h5-nav-logo:hover { color: var(--color-primary-dark); }
.h5-nav-logo svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

/* -- Nav Links (Desktop) -- */
.h5-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.h5-nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-round);
  color: var(--color-text-light);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.h5-nav-links a:hover,
.h5-nav-links a.active {
  color: var(--color-primary);
  background: rgba(124,58,237,0.08);
}
.h5-nav-links a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* -- Hamburger Button -- */
.h5-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.h5-menu-btn:hover { background: var(--color-bg-alt); }
.h5-menu-btn svg {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-normal);
}

/* ============================================================
   SIDEBAR - 左侧隐藏菜单
   ============================================================ */

/* -- Overlay -- */
.h5-sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}
.h5-sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* -- Sidebar Panel -- */
.h5-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  max-width: 85vw;
  z-index: 1100;
  background: #ffffff;
  box-shadow: var(--shadow-xl);
  transform: translateX(-100%);
  transition: transform var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.h5-sidebar.open {
  transform: translateX(0);
}

/* -- Sidebar Header -- */
.h5-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.h5-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-primary);
}
.h5-sidebar-brand svg {
  width: 28px;
  height: 28px;
}
.h5-sidebar-close {
  width: 34px;
  height: 34px;
  border: none;
  background: var(--color-bg);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.h5-sidebar-close:hover {
  background: var(--color-accent);
  color: #fff;
}
.h5-sidebar-close svg {
  width: 18px;
  height: 18px;
}

/* -- Sidebar Menu Items -- */
.h5-sidebar-menu {
  padding: 12px 0;
  flex: 1;
}
.h5-sidebar-menu .menu-group {
  padding: 8px 20px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}
.h5-sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}
.h5-sidebar-menu a:hover,
.h5-sidebar-menu a.active {
  color: var(--color-primary);
  background: rgba(124,58,237,0.06);
  border-left-color: var(--color-primary);
}
.h5-sidebar-menu a svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}
.h5-sidebar-menu a:hover svg,
.h5-sidebar-menu a.active svg {
  color: var(--color-primary);
}

/* -- Sidebar Footer -- */
.h5-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-align: center;
  flex-shrink: 0;
}

/* ============================================================
   CARDS - 卡片
   ============================================================ */
.h5-card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}
.h5-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.h5-card-header {
  padding: 20px 24px 0;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.h5-card-header svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.h5-card-body {
  padding: 20px 24px;
}
.h5-card-footer {
  padding: 14px 24px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

/* -- Grid of Cards -- */
.h5-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ============================================================
   BUTTONS - 按钮
   ============================================================ */
.h5-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.4;
  border: 2px solid transparent;
  border-radius: var(--radius-round);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.h5-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(124,58,237,0.3);
}
.h5-btn:active {
  transform: scale(0.97);
}
.h5-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Variants */
.h5-btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.h5-btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  box-shadow: 0 4px 14px rgba(124,58,237,0.35);
  transform: translateY(-1px);
}

.h5-btn-secondary {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border-color: var(--color-border);
}
.h5-btn-secondary:hover {
  background: var(--color-border);
  color: var(--color-text);
  transform: translateY(-1px);
}

.h5-btn-accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.h5-btn-accent:hover {
  background: #e85d5d;
  border-color: #e85d5d;
  box-shadow: 0 4px 14px rgba(255,107,107,0.35);
  transform: translateY(-1px);
}

.h5-btn-success {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}
.h5-btn-success:hover {
  background: #219a52;
  border-color: #219a52;
  box-shadow: 0 4px 14px rgba(39,174,96,0.35);
  transform: translateY(-1px);
}

.h5-btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.h5-btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
}

.h5-btn-ghost {
  background: transparent;
  color: var(--color-text-light);
  border-color: transparent;
}
.h5-btn-ghost:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.h5-btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}
.h5-btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* ============================================================
   HERO - 首页大图区
   ============================================================ */
.h5-hero {
  text-align: center;
  padding: 50px 20px 40px;
  position: relative;
  overflow: hidden;
}
.h5-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    ellipse at 30% 20%,
    rgba(124,58,237,0.06) 0%,
    transparent 50%
  ),
  radial-gradient(
    ellipse at 70% 80%,
    rgba(139,92,246,0.06) 0%,
    transparent 50%
  );
  pointer-events: none;
  z-index: -1;
}
.h5-hero-icon {
  display: inline-block;
  margin-bottom: 16px;
  animation: h5-float 3s ease-in-out infinite;
}
.h5-hero-icon svg {
  width: 80px;
  height: 80px;
}
.h5-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.h5-hero p {
  font-size: 1.05rem;
  color: var(--color-text-light);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.h5-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============================================================
   FEATURE GRID - 功能卡片网格
   ============================================================ */
.h5-features {
  padding: 20px 0 50px;
}
.h5-features-title {
  text-align: center;
  margin-bottom: 32px;
}
.h5-features-title h2 {
  font-size: 1.7rem;
}
.h5-features-title p {
  color: var(--color-text-muted);
  margin-top: 6px;
}

.h5-feature-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.h5-feature-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 3px;
  background: var(--color-primary);
  border-radius: 3px 3px 0 0;
  transition: transform var(--transition-normal);
}
.h5-feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--color-primary-light);
}
.h5-feature-card:hover::after {
  transform: translateX(-50%) scaleX(1);
}
.h5-feature-card:active {
  transform: scale(0.97);
}
.h5-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  transition: transform var(--transition-normal);
}
.h5-feature-card:hover .h5-feature-icon {
  transform: scale(1.1);
}
.h5-feature-icon.blue { background: rgba(124,58,237,0.1); }
.h5-feature-icon.green { background: rgba(39,174,96,0.1); }
.h5-feature-icon.orange { background: rgba(243,156,18,0.1); }
.h5-feature-icon.purple { background: rgba(142,68,173,0.1); }
.h5-feature-icon.red { background: rgba(255,107,107,0.1); }
.h5-feature-icon.teal { background: rgba(26,188,156,0.1); }

.h5-feature-icon svg {
  width: 30px;
  height: 30px;
}
.h5-feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.h5-feature-card p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================================
   STATS BAR - 统计条
   ============================================================ */
.h5-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 30px 0;
}
.h5-stat-item {
  text-align: center;
  min-width: 100px;
}
.h5-stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
}
.h5-stat-label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ============================================================
   BADGE / TAG
   ============================================================ */
.h5-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-round);
  font-size: 0.75rem;
  font-weight: 600;
}
.h5-badge-primary {
  background: rgba(124,58,237,0.1);
  color: var(--color-primary);
}
.h5-badge-success {
  background: rgba(39,174,96,0.1);
  color: var(--color-success);
}
.h5-badge-accent {
  background: rgba(255,107,107,0.1);
  color: var(--color-accent);
}

/* ============================================================
   TOOLTIP
   ============================================================ */
.h5-tooltip {
  position: relative;
}
.h5-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: var(--color-text);
  color: #fff;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
  z-index: 10;
}
.h5-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.h5-divider {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: 32px 0;
}
.h5-divider-dashed {
  border: none;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--color-border) 0,
    var(--color-border) 6px,
    transparent 6px,
    transparent 12px
  );
}

/* ============================================================
   FOOTER
   ============================================================ */
.h5-footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--color-border);
}
.h5-footer a {
  color: var(--color-primary);
  font-weight: 500;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes h5-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes h5-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes h5-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes h5-flash-anim {
  0% { box-shadow: 0 0 0 0 rgba(142,68,173,0.6); }
  50% { box-shadow: 0 0 36px 10px rgba(142,68,173,0.3); }
  100% { box-shadow: 0 0 0 0 rgba(142,68,173,0); }
}
.h5-flash {
  animation: h5-flash-anim 0.8s ease 1;
  border-radius: 50px;
}
@keyframes h5-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.h5-anim-float {
  animation: h5-float 3s ease-in-out infinite;
}
.h5-anim-fadeInUp {
  animation: h5-fadeInUp 0.6s ease forwards;
  opacity: 0;
}
.h5-anim-delay-100 { animation-delay: 0.1s; }
.h5-anim-delay-200 { animation-delay: 0.2s; }
.h5-anim-delay-300 { animation-delay: 0.3s; }
.h5-anim-delay-400 { animation-delay: 0.4s; }
.h5-anim-delay-500 { animation-delay: 0.5s; }

/* ============================================================
   TOAST - 消息提示
   ============================================================ */
.h5-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 380px;
  width: calc(100% - 40px);
}
.h5-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--color-primary);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  font-size: 0.88rem;
}
.h5-toast.h5-toast-show {
  transform: translateX(0);
  opacity: 1;
}
.h5-toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.h5-toast-success { border-left-color: var(--color-success); }
.h5-toast-success .h5-toast-icon { color: var(--color-success); }
.h5-toast-error { border-left-color: var(--color-accent); }
.h5-toast-error .h5-toast-icon { color: var(--color-accent); }
.h5-toast-warning { border-left-color: var(--color-warning); }
.h5-toast-warning .h5-toast-icon { color: var(--color-warning); }
.h5-toast-info { border-left-color: var(--color-primary); }
.h5-toast-info .h5-toast-icon { color: var(--color-primary); }

/* Toast 响应式 */
@media (max-width: 480px) {
  .h5-toast-container {
    left: 10px;
    right: 10px;
    top: 10px;
    max-width: none;
    width: auto;
  }
  .h5-toast {
    transform: translateY(-120%);
    font-size: 0.82rem;
  }
  .h5-toast.h5-toast-show {
    transform: translateY(0);
  }
}

/* ============================================================
   RIPPLE EFFECT - 水波纹
   ============================================================ */
.h5-ripple {
  position: relative;
  overflow: hidden;
}
.h5-ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  pointer-events: none;
  animation: h5-ripple-anim 0.6s ease-out forwards;
  z-index: 0;
}
/* Outline & Ghost 按钮使用深色 ripple */
.h5-btn-outline .h5-ripple-effect,
.h5-btn-ghost .h5-ripple-effect,
.h5-btn-secondary .h5-ripple-effect {
  background: rgba(0,0,0,0.1);
}
@keyframes h5-ripple-anim {
  from {
    transform: scale(0);
    opacity: 1;
  }
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.h5-scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 900;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  -webkit-tap-highlight-color: transparent;
}
.h5-scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.h5-scroll-top:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.h5-scroll-top svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   RESPONSIVE - 响应式
   ============================================================ */

/* -- Tablet & Small Desktop (≤1024px) -- */
@media (max-width: 1024px) {
  .h5-hero h1 { font-size: 1.8rem; }
  .h5-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }
}

/* -- Large Phone (≤768px) -- */
@media (max-width: 768px) {
  :root {
    --navbar-height: 54px;
    --sidebar-width: 260px;
  }

  .h5-main { padding-top: 90px; }
  .h5-nav-links { display: none; }
  .h5-menu-btn { display: flex; align-items: center; justify-content: center; order: 1; }
  .h5-nav-logo { order: 0; }

  .h5-hero { padding: 36px 16px 30px; }
  .h5-hero h1 { font-size: 1.55rem; }
  .h5-hero p { font-size: 0.92rem; }
  .h5-hero-icon svg { width: 60px; height: 60px; }
  .h5-hero-actions { flex-direction: column; }
  .h5-hero-actions .h5-btn { width: 100%; max-width: 260px; }

  .h5-card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .h5-stats { gap: 24px; }
  .h5-stat-number { font-size: 1.6rem; }
  .h5-section { padding: 30px 0; }
}

/* -- Small Phone (≤480px) -- */
@media (max-width: 480px) {
  :root { --navbar-height: 50px; }
  .h5-main { padding-top: 84px; }

  .h5-container { padding: 0 14px; }
  .h5-navbar-inner { padding: 0 14px; }
  .h5-nav-logo { font-size: 1.1rem; }
  .h5-nav-logo svg { width: 26px; height: 26px; }

  .h5-hero h1 { font-size: 1.35rem; }
  .h5-hero p { font-size: 0.85rem; }
  .h5-hero-icon svg { width: 50px; height: 50px; }

  .h5-card-header { padding: 16px 18px 0; }
  .h5-card-body { padding: 16px 18px; }
  .h5-card-footer { padding: 12px 18px; }

  .h5-feature-card { padding: 20px 16px; }
  .h5-feature-icon { width: 48px; height: 48px; }
  .h5-feature-icon svg { width: 24px; height: 24px; }

  .h5-btn { padding: 8px 18px; font-size: 0.85rem; }
  .h5-btn-lg { padding: 12px 24px; font-size: 0.95rem; }

  .h5-scroll-top { bottom: 20px; right: 16px; width: 40px; height: 40px; }
}

/* ============================================================
   IE11 FALLBACKS
   ============================================================ */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  /* IE11 doesn't support CSS variables well, use static values */
  .h5-navbar { background: #ffffff; }
  .h5-sidebar { background: #ffffff; }
  .h5-card { border: 1px solid #dde4ed; }
  .h5-btn-primary { background: #7c3aed; }
  .h5-btn-primary:hover { background: #6d28d9; }
  .h5-hero h1 {
    background: none;
    -webkit-text-fill-color: #7c3aed;
    color: #7c3aed;
  }
  body { background: #f0f4f8; }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.h5-text-center { text-align: center; }
.h5-text-muted { color: var(--color-text-muted); }
.h5-mt-1 { margin-top: 8px; }
.h5-mt-2 { margin-top: 16px; }
.h5-mt-3 { margin-top: 24px; }
.h5-mt-4 { margin-top: 32px; }
.h5-mb-1 { margin-bottom: 8px; }
.h5-mb-2 { margin-bottom: 16px; }
.h5-mb-3 { margin-bottom: 24px; }
.h5-flex { display: flex; }
.h5-flex-center { display: flex; align-items: center; justify-content: center; }
.h5-gap-1 { gap: 8px; }
.h5-gap-2 { gap: 16px; }
.h5-gap-3 { gap: 24px; }
.h5-wrap { flex-wrap: wrap; }
.h5-hidden-xs {  }
@media (max-width: 480px) {
  .h5-hidden-xs { display: none !important; }
}
