:root {
  --bg: #1e1e2e;
  --bg-elevated: #2d2d3a;
  --bg-soft: #1e1e2e;
  --fg: #e5e9f0;
  --fg-muted: #e5e9f0;
  --accent-cyan: #64ffda;
  --accent-soft: rgba(61, 245, 207, 0.18);
  --accent-strong: #5deeca;
  --product-header: #2d2d3a;
  --danger: #ff5c7a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.55);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --transition-fast: 180ms ease-out;
  --transition-normal: 260ms ease-out;
  --page-transition: 520ms cubic-bezier(0.19, 1, 0.22, 1);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

[data-theme="light"] {
  --bg: #f5f7fa;
  --bg-elevated: #ffffff;
  --bg-soft: #f5f7fa;
  --product-header: #0a192f;
  --fg: #333333;
  --fg-muted: #333333;
  --accent-cyan: #4a90e2;
  --accent-soft: rgba(57, 128, 255, 0.12);
  --accent-strong: #4486d1;
  --border-subtle: rgba(18, 24, 38, 0.08);
  --shadow-soft: 0 22px 60px rgba(15, 23, 42, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  /*background: radial-gradient(circle at top left, #222641 0, #050716 55%)*/
  background: var(--bg)
    fixed;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body[data-theme="light"] {
  /*background: radial-gradient(circle at top left, #ffffff 0, #f2f4ff 60%) fixed;*/
  background: var(--bg) fixed;
}

button,
input,
textarea {
  font-family: inherit;
}

.app {
  height: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

body[data-theme="light"] .app {
  background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.9),
      rgba(255, 255, 255, 0.98)
    );
}


nav {
	position: fixed;
	top: 0;
	width: 100%;
	height:10%;
	padding: 1rem 5%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: var(--bg-elevated);
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	z-index: 1000;
	transition: background-color 0.5s ease;
}

body.light-mode nav {
	background-color: var(--nav-light);
}

.logo {
	font-size:1.8rem;
	font-weight: bold;
	display: flex;
	color: var(--fg);
	align-items: center;
	gap: 0px;                /* 图片与文字之间的间距 */
}

.logo-img {
  height: 5rem;              /* 与文字大小协调，可根据需要调整 */
  width: auto;               /* 保持图片原始宽高比 */
  border-radius: 4px;        /* 可选，添加轻微圆角 */
  object-fit: contain;       /* 防止图片变形 */
}

body.light-mode .logo {
	color: var(--text-light);
}

.nav-links {
	display: flex;
	gap: 2rem;
}

.nav-link{
	cursor: pointer;
}

.nav-links a {
	text-decoration: none;
	color: var(--text-dark);
	font-weight: 500;
	position: relative;
	transition: color 0.3s ease;
}

body.light-mode .nav-links a {
	color: var(--text-light);
}

.nav-links a.active {
	color: var(--accent-cyan);
}

body.light-mode .nav-links a.active {
	color: var(--accent-blue);
}

.nav-links a::after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--accent-cyan);
	transition: width 0.3s ease;
}

body.light-mode .nav-links a::after {
	background-color: var(--accent-blue);
}

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

body[data-theme="light"] .topbar {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px 4px 4px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--fg-muted);
  cursor: pointer;
  font-size: 12px;
  min-width: 108px;
  justify-content: flex-start;
  transition: background var(--transition-normal),
    border-color var(--transition-normal), transform var(--transition-fast);
}

body[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.9);
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.theme-toggle-thumb {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #ffe89a, #ffb347);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18),
    0 0 26px rgba(250, 204, 21, 0.55);
  position: relative;
}

body[data-theme="light"] .theme-toggle-thumb {
  background: radial-gradient(circle at 30% 30%, #0f172a, #020617);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1),
    0 0 18px rgba(15, 23, 42, 0.5);
}

.theme-toggle-text {
  white-space: nowrap;
}

.page {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--page-transition),
    transform var(--page-transition), filter var(--page-transition);
  display: flex;
}

.page.active {
  opacity: 1;
  transform: translateX(0) translateY(0) scale(1);
  pointer-events: auto;
  filter: blur(0);
  z-index: 2;
}

.page.exit-left {
  opacity: 0;
  transform: translateX(-16%) translateY(6px) scale(0.95);
  z-index: 1;
}

.page.exit-right {
  opacity: 0;
  transform: translateX(16%) translateY(6px) scale(0.95);
  z-index: 1;
}

.page-inner {
  width: 100%;
  height: 100%;
  padding-top:10%;
  padding: 40px 46px;
  /*background: radial-gradient(circle at top left, #262b44 0, #111320 48%);*/
  background: var(--bg);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body[data-theme="light"] .page-inner {
  background: linear-gradient(135deg, #ffffff, #f5f7ff);
}

.container {
	max-width: 100%;
	margin: 15% 15%;
	padding: 20px auto;
}

.section-title {
  text-align: center;
  font-size: 28px;
  letter-spacing: 0.12em;
  margin: 0 0 28px;
}

.hero-title {
  font-size: clamp(40px, 4.1vw, 52px);
  text-align: center;
  margin: 0 0 22px;
}

.hero-subtitle {
  text-align: center;
  font-size: 18px;
  color: var(--fg-muted);
  margin: 0 0 32px;
}

.highlight {
  color: var(--accent-cyan);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.btn {
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast), background var(--transition-fast),
    color var(--transition-fast);
}

.btn.primary {
  background: var(--accent-cyan);
  color: var(--bg);
  text-decoration: none;
  display: inline-block;
}

.btn.primary:hover {
  /*transform: translateY(-1px);*/
  background: var(--accent-strong);
}

.btn.ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

body[data-theme="light"] .btn.ghost {
  border-color: rgba(15, 23, 42, 0.12);
}

.btn.ghost:hover {
  color: var(--fg);
  border-color: var(--accent-cyan);
}

.btn.pill {
  background: var(--accent-soft);
  color: var(--accent-cyan);
  padding-inline: 20px;
}

.btn.pill:hover {
  background: var(--accent-cyan);
  color: #021015;
}

.btn.block {
  width: 100%;
}

.logo-mark {
  width: 500px;
  height: 500px;
}

body[data-theme="light"] .logo-mark {
  color: #f9fafb;
}

/* 关于我们页面 */
.about-page {
	padding: 4rem 0;
}

.page-title {
	font-size: 3rem;
	text-align: center;
	margin-bottom: 3rem;
	color: var(--text-dark);
	transition: var(--transition);
}

body.light-mode .page-title {
	color: var(--text-light);
}

.about-content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
	align-items: center;
}

.about-text h2 {
	font-size: 2.5rem;
	margin-bottom: 1rem;
	color: var(--text-dark);
	transition: var(--transition);
}

body.light-mode .about-text h2 {
	color: var(--text-light);
}

.about-text p {
	font-size: 1.1rem;
	line-height: 1.6;
	margin-bottom: 1.5rem;
	color: var(--text-dark);
	transition: var(--transition);
}

body.light-mode .about-text p {
	color: var(--text-light);
}

.stats {
	display: flex;
	gap: 1rem;
	margin-top: 2rem;
}

.stat-card {
	background-color: var(--bg-elevated);
	padding: 1rem 2rem;
	border-radius: 10px;
	box-shadow: 0 5px 15px rgba(0,0,0,0.2);
	transition: var(--transition);
}

body.light-mode .stat-card {
	background-color: var(--card-light);
	box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-number {
	font-size: 1.5rem;
	font-weight: bold;
	color: var(--text-dark);
	transition: var(--transition);
}

body.light-mode .stat-number {
	color: var(--text-light);
}

.stat-label {
	font-size: 0.9rem;
	color: var(--text-dark);
	transition: var(--transition);
}

body.light-mode .stat-label {
	color: var(--text-light);
}

.about-logo {
	width: 100%;
	max-width: 300px;
	filter: invert(1);
	transition: var(--transition);
}

body.light-mode .about-logo {
	filter: invert(0);
}

/* 产品页面 */
.products-page {
	padding: 4rem 0;
}

.products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
}

.product-card {
	background-color: var(--bg-elevated);
	border-radius: 15px;
	overflow: hidden;
	box-shadow: 0 5px 15px rgba(0,0,0,0.2);
	transition: var(--transition);
}

body.light-mode .product-card {
	background-color: var(--bg-elevated);
	box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-header {
	background-color: var(--product-header);
	padding: 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: #fff;
	transition: var(--transition);
}

body.light-mode .product-header {
	background-color: #0f172a;
}

.product-icon {
	font-size: 1.5rem;
	color:var(--accent-cyan);
}

.product-name {
	font-size: 1.5rem;
	font-weight: bold;
}

.product-body {
	padding: 1.5rem;
}

.product-title {
	font-size: 1.3rem;
	margin-bottom: 1rem;
	color: var(--text-dark);
	transition: var(--transition);
}

body.light-mode .product-title {
	color: var(--text-light);
}

.product-description {
	font-size: 1rem;
	line-height: 1.5;
	margin-bottom: 1.5rem;
	color: var(--text-dark);
	transition: var(--transition);
}

body.light-mode .product-description {
	color: var(--text-light);
}

.product-btn {
	background-color: var(--accent-cyan);
	color: #1e1e2f;
	padding: 0.6rem 1.5rem;
	border-radius: 8px;
	text-decoration: none;
	display: inline-block;
	transition: var(--transition);
}

body.light-mode .product-btn {
	background-color: var(--accent-blue);
	color: #fff;
}

.product-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 3px 10px rgba(95, 255, 217, 0.3);
}

body.light-mode .product-btn:hover {
	box-shadow: 0 3px 10px rgba(74, 144, 226, 0.3);
}

/* 联系我们页面 */
.contact-page {
	padding: 4rem 0;
}

.contact-tabs {
	display: flex;
	gap: 2rem;
	margin-bottom: 2rem;
}

.tab-btn {
	background: none;
	border: none;
	font-size: 1.5rem;
	font-weight: bold;
	color: var(--text-dark);
	cursor: pointer;
	transition: var(--transition);
	position: relative;
}

body.light-mode .tab-btn {
	color: var(--text-light);
}

.tab-btn.active {
	color: var(--accent-cyan);
}

body.light-mode .tab-btn.active {
	color: var(--accent-blue);
}

.tab-btn::after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--accent-cyan);
	transition: var(--transition);
}

body.light-mode .tab-btn::after {
	background-color: var(--accent-blue);
}

.tab-btn.active::after {
	width: 100%;
}

.contact-content {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 4rem;
}

.contact-form {
	background-color: var(--bg-elevated);
	padding: 2rem;
	border-radius: 15px;
	box-shadow: 0 5px 15px rgba(0,0,0,0.2);
	transition: var(--transition);
}

body.light-mode .contact-form {
	background-color: var(--card-light);
	box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group {
	margin-bottom: 1.5rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: var(--text-dark);
	transition: var(--transition);
}

body.light-mode .form-group label {
	color: var(--text-light);
}

.form-group input,
.form-group textarea {
	width: 100%;
	padding: 0.8rem;
	border: 2px solid #444;
	border-radius: 10px;
	background-color: transparent;
	color: var(--text-dark);
	transition: var(--transition);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
	border-color: #ccc;
	color: var(--text-light);
}

.form-group input:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--accent-cyan);
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus {
	border-color: var(--accent-blue);
}

.form-group textarea {
	min-height: 100px;
	resize: vertical;
}

.contact-info {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.contact-item h3 {
	font-size: 1.3rem;
	margin-bottom: 0.5rem;
	color: var(--text-dark);
	transition: var(--transition);
}

body.light-mode .contact-item h3 {
	color: var(--text-light);
}

.contact-item p {
	font-size: 1.1rem;
	color: var(--text-dark);
	transition: var(--transition);
}

body.light-mode .contact-item p {
	color: var(--text-light);
}

.ts-page-contact-inner {
  max-width: 1000px;
}

.ts-contact-content {
  margin-top: 16px;
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.ts-contact-card {
  flex: 1 1 0;
  border-radius: 26px;
  padding: 28px 26px 26px;
  background: #181c2f;
  box-shadow: var(--ts-shadow-card);
}

.ts-contact-form {
  display: none;
}

.ts-contact-form.is-active {
  display: block;
}

.ts-field {
  margin-bottom: 12px;
}

.ts-field-label {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.ts-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  padding: 9px 14px;
  font-size: 13px;
  background: transparent;
  color: inherit;
}

.ts-input::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

.ts-input-file {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.ts-input-file-text {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.9);
}

.ts-textarea {
  min-height: 90px;
  resize: vertical;
}

.ts-contact-side {
  min-width: 180px;
  margin-top: 28px;
}

.ts-contact-email-label {
  font-size: 16px;
  margin-bottom: 8px;
}

.ts-contact-email-value {
  font-size: 16px;
  font-weight: 600;
}

.ts-btn {
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 10px 26px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition:
    transform var(--bg),
    background var(--bg),
    color var(--bg);
}

.ts-btn-primary {
  background: var(--accent-cyan);
  color: var(--bg);
  box-shadow: var(--ts-shadow-soft);
  border: none;
  border-radius: 10px;
}

.ts-btn-block {
  width: 100%;
}

@media (max-width: 960px) {
  .app {
    margin: 0;
    border-radius: 0;
    height: 100vh;
  }

  .page-inner {
    padding-inline: 26px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .about-inner,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-side {
    border-left: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    padding-left: 0;
    padding-top: 16px;
    margin-top: 10px;
  }

  body[data-theme="light"] .contact-side {
    border-top-color: rgba(15, 23, 42, 0.12);
  }
}

@media (max-width: 720px) {
  .app {
    padding: 14px 16px 18px;
  }

  .topbar {
    gap: 10px;
  }

  .nav {
    gap: 10px;
  }

  .nav-link {
    font-size: 13px;
  }

  .page-inner {
    padding: 26px 18px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .about-stats {
    gap: 10px;
  }
}

/* ================= 弹窗 / 通知 ================= */

/* 顶部自动消失提示（toast） */
.ts-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  min-width: 260px;
  max-width: 420px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.ts-toast.ts-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 通用遮罩层 */
.ts-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2100;
}

/* 弹窗主体 */
.ts-modal {
  width: min(90vw, 380px);
  border-radius: 18px;
  padding: 20px 22px 16px;
  background: var(--bg);
  color: inherit;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  transform: translateY(12px);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.ts-modal-overlay.ts-modal-show .ts-modal {
  opacity: 1;
  transform: translateY(0);
}

.ts-modal-message {
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.ts-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 复用你现有按钮风格，按需要微调 */
.ts-btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: inherit;
}