/* 光合在线官网 - 共享样式 */
:root {
  --primary: #2e7d32;
  --primary-dark: #1b5e20;
  --primary-light: #66bb6a;
  --accent: #c8a042;
  --accent-light: #f0d78c;
  --text: #333333;
  --text-light: #666666;
  --bg: #ffffff;
  --bg-light: #f7faf7;
  --border: #e0e8e0;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 8px;
  --max-width: 1200px;
  --header-height: 72px;
}

[data-theme="dark"] {
  --primary: #4caf50;
  --primary-dark: #66bb6a;
  --primary-light: #81c784;
  --accent: #e6c875;
  --accent-light: #f0d78c;
  --text: #e0e8e0;
  --text-light: #99aa99;
  --bg: #0a0f0a;
  --bg-light: #111a11;
  --border: #1e3320;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
  transition: background .3s, color .3s;
}

/* 科技感网格背景 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(46,125,50,0.08) 1px, transparent 0);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
  transition: opacity .3s;
}

[data-theme="dark"] body::before {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(76,175,80,0.12) 1px, transparent 0);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header & Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  transition: background .3s, border-color .3s;
}

[data-theme="dark"] .header {
  background: rgba(10,15,10,0.92);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
}

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

.nav { display: flex; align-items: center; gap: 6px; }

.nav a {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text);
  transition: background .2s, color .2s;
}

.nav a:hover, .nav a.active {
  background: var(--primary-light);
  color: #fff;
}

.nav .btn-contact {
  background: var(--primary);
  color: #fff;
  margin-left: 8px;
}

.nav .btn-contact:hover { background: var(--primary-dark); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--primary);
  cursor: pointer;
}

/* 主题切换按钮 */
.theme-toggle {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 100px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  margin-left: 12px;
  color: var(--text);
  transition: background .2s, transform .2s, border-color .2s;
}

.theme-toggle:hover {
  transform: scale(1.1);
  border-color: var(--primary-light);
}

[data-theme="dark"] .theme-toggle {
  background: #1a2a1a;
}

/* Footer */
.footer {
  background: #0d120d;
  color: rgba(255,255,255,0.85);
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
}

.footer a {
  display: block;
  margin-bottom: 10px;
  opacity: 0.85;
  transition: opacity .2s;
}

.footer a:hover { opacity: 1; text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 32px;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  opacity: 0.7;
}

.footer-bottom a {
  color: rgba(255,255,255,0.85);
  text-decoration: underline;
}

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-light); transition: background .3s; }

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 32px;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.section-title p {
  color: var(--text-light);
  font-size: 16px;
}

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 120px 0 200px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: .6;
}

/* 科技感斜线 */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 20px,
      rgba(255,255,255,0.03) 20px,
      rgba(255,255,255,0.03) 21px
    );
  pointer-events: none;
}

/* 扫描线动画 */
.hero .scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: scanline 4s linear infinite;
  pointer-events: none;
}

@keyframes scanline {
  0% { top: -4px; }
  100% { top: 100%; }
}

/* 浮动几何图形 */
.hero .geo-shape {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.08);
  pointer-events: none;
}

.hero .geo-shape:nth-child(1) {
  width: 200px; height: 200px;
  top: 10%; left: 5%;
  transform: rotate(15deg);
  animation: float 8s ease-in-out infinite;
}

.hero .geo-shape:nth-child(2) {
  width: 120px; height: 120px;
  top: 60%; right: 8%;
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

.hero .geo-shape:nth-child(3) {
  width: 80px; height: 80px;
  bottom: 15%; left: 15%;
  transform: rotate(45deg);
  animation: float 6s ease-in-out infinite;
}

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

/* 科技感网格线背景 */
.tech-grid {
  position: relative;
  overflow: hidden;
}

.tech-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(46,125,50,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46,125,50,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

[data-theme="dark"] .tech-grid::before {
  background-image:
    linear-gradient(rgba(76,175,80,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76,175,80,0.08) 1px, transparent 1px);
}

/* 发光卡片 */
.glow-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all .3s;
  overflow: hidden;
}

.glow-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
  opacity: 0;
  transition: opacity .3s;
}

.glow-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 32px rgba(46,125,50,0.12);
  border-color: rgba(46,125,50,0.2);
}

.glow-card:hover::before {
  opacity: 1;
}

[data-theme="dark"] .glow-card:hover {
  box-shadow: 0 8px 32px rgba(76,175,80,0.2);
  border-color: rgba(76,175,80,0.3);
}

/* 霓虹文字效果 */
.neon-text {
  text-shadow: 0 0 10px rgba(46,125,50,0.3);
}

[data-theme="dark"] .neon-text {
  text-shadow: 0 0 20px rgba(76,175,80,0.4);
}

/* 科技感边框装饰 */
.tech-border {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tech-border::after {
  content: '';
  position: absolute;
  top: -1px; left: 20px;
  width: 40px; height: 2px;
  background: var(--primary-light);
}

.hero .container { position: relative; z-index: 1; text-align: center; }

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.hero .subtitle {
  font-size: 18px;
  opacity: 0.92;
  margin-bottom: 32px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  transition: transform .2s, box-shadow .2s;
  border: none;
  cursor: pointer;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #3e2723;
  box-shadow: 0 4px 16px rgba(200,160,66,0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5);
}

.btn-outline:hover { background: rgba(255,255,255,0.1); }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow .2s, transform .2s, background .3s, border-color .3s;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

[data-theme="dark"] .card:hover {
  border-color: rgba(76,175,80,0.3);
  box-shadow: 0 4px 24px rgba(76,175,80,0.15);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
  background: var(--primary-light);
  color: #fff;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--primary-dark);
}

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

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

.stat .number {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
}

.stat .label {
  color: var(--text-light);
  font-size: 14px;
  margin-top: 4px;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--border);
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--primary-light);
  transition: border-color .3s;
}

.timeline-item .date {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.timeline-item h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.timeline-item p {
  font-size: 14px;
  color: var(--text-light);
}

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.tag {
  background: var(--bg-light);
  color: var(--primary-dark);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  border: 1px solid var(--border);
  transition: background .3s, border-color .3s;
}

[data-theme="dark"] .tag {
  background: rgba(76,175,80,0.1);
  border-color: rgba(76,175,80,0.25);
}

/* News list */
.news-list { display: flex; flex-direction: column; gap: 16px; }

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: box-shadow .2s, background .3s, border-color .3s;
}

.news-item:hover { box-shadow: var(--shadow); }

[data-theme="dark"] .news-item:hover {
  border-color: rgba(76,175,80,0.25);
}

.news-item .date-box {
  min-width: 60px;
  text-align: center;
  background: var(--primary-light);
  color: #fff;
  border-radius: var(--radius);
  padding: 8px 0;
}

.news-item .date-box .day { font-size: 22px; font-weight: 800; display: block; }
.news-item .date-box .month { font-size: 12px; opacity: 0.9; }

.news-item h3 { font-size: 17px; margin-bottom: 6px; color: var(--primary-dark); }
.news-item p { font-size: 14px; color: var(--text-light); }

/* Careers */
.career-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg);
  transition: box-shadow .2s, background .3s, border-color .3s;
}

.career-card:hover { box-shadow: var(--shadow); }

[data-theme="dark"] .career-card:hover {
  border-color: rgba(76,175,80,0.25);
}

.career-card h3 {
  font-size: 18px;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.career-card .meta {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.career-card ul {
  margin-left: 18px;
  font-size: 14px;
  color: var(--text-light);
}

.career-card ul li { margin-bottom: 6px; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-info h3 {
  font-size: 20px;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.contact-info p {
  margin-bottom: 12px;
  color: var(--text-light);
  font-size: 15px;
}

.contact-info strong { color: var(--text); }

.map-placeholder {
  background: var(--bg-light);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

/* Responsive */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { border-radius: 6px; }
  .nav .btn-contact { margin-left: 0; margin-top: 8px; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 70px 0 90px; }
  .section { padding: 44px 0; }
  .section-title h2 { font-size: 26px; }
  .theme-toggle { margin-left: auto; margin-right: 8px; }
}
