/* ===== 基础样式 ===== */
:root {
  --primary-color: #4ea4dc;
  --secondary-color: #6c5ce7;
  --dark-bg: #0f1b33;
  --navbar-bg: rgba(10, 15, 30, 0.95);
  --text-light: #e0e0e0;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body,
html {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  font-family: "Poppins", "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(135deg, #0f1b33, #1a2a6c, #2a4365);
  color: var(--text-light);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* ===== 导航栏样式 ===== */
.navbar {
  background: var(--navbar-bg);
  backdrop-filter: blur(12px);
  padding: 15px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(78, 164, 220, 0.2);
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 10px 50px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.logo {
  display: flex;
  align-items: center;
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo i {
  margin-right: 10px;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.logo:hover i {
  transform: rotate(15deg);
}

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

.nav-links a {
  color: #f0f0f0;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 5px 0;
}

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

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

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

.nav-links a i {
  margin-right: 5px;
}

/* ===== 主容器样式 ===== */
.container {
  max-width: 1200px;
  margin: 100px auto 40px;
  padding: 0 20px;
}

/* ===== 各部分通用样式 ===== */
.section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  padding: 40px;
  margin-bottom: 40px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.section:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #fff;
  position: relative;
  padding-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

/* ===== 介绍部分样式 ===== */
.intro-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.intro-text {
  flex: 1;
}

.intro-text h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.intro-text p {
  margin-bottom: 20px;
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.8;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-top: 30px;
}

.feature {
  display: flex;
  align-items: flex-start;
  background: rgba(78, 164, 220, 0.1);
  border-radius: 12px;
  padding: 20px;
  transition: var(--transition);
}

.feature:hover {
  transform: translateY(-5px);
  background: rgba(78, 164, 220, 0.2);
}

.feature i {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-right: 15px;
  transition: transform 0.3s ease;
}

.feature:hover i {
  transform: scale(1.2);
}

.feature div h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: #fff;
}

.feature div p {
  color: #c0c0c0;
  margin: 0;
  font-size: 1rem;
}

.intro-image {
  flex: 1;
  text-align: center;
  position: relative;
}

.intro-image::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(108, 92, 231, 0.4) 0%,
    transparent 70%
  );
  z-index: -1;
}

.intro-image::after {
  content: "";
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(78, 164, 220, 0.4) 0%,
    transparent 70%
  );
  z-index: -1;
}

.intro-image img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transition: all 0.4s ease;
  transform: perspective(1000px) rotateY(-5deg);
}

.intro-image:hover img {
  transform: perspective(1000px) rotateY(0deg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

/* ===== 对比部分样式 ===== */
.comparisons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 35px;
}

.comparison-item {
  background: rgba(30, 35, 50, 0.6);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 100%;
  overflow: hidden;
}

.comparison-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  border-color: rgba(78, 164, 220, 0.3);
}

/* 修复标题对比度问题 */
.comparison-title {
  font-size: 1.6rem;
  text-align: left;
  margin-bottom: 25px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  background: rgba(78, 164, 220, 0.25);
  padding: 12px 20px;
  border-radius: 8px;
  position: relative;
  font-weight: 600;
}

.comparison-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border-radius: 1px;
}

.comparison-title i {
  color: var(--secondary-color);
  font-size: 1.4rem;
}

.comparison-images {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.image-label {
  font-weight: bold;
  font-size: 1.1rem;
  padding: 8px 15px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 10px;
  margin-bottom: 5px;
}

.before-label {
  background: rgba(231, 76, 60, 0.2);
  color: #ff9b9b;
}

.after-label {
  background: rgba(39, 174, 96, 0.2);
  color: #6eff9e;
}

.comparison-desc {
  margin-top: 25px;
  font-size: 1.05rem;
  color: #c0c0c0;
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
  border-left: 3px solid var(--secondary-color);
}

/* ===== 代码块样式 ===== */
.code-container {
  background-color: #1e1f29;
  color: #f8f8f2;
  border-radius: 8px;
  max-height: 250px;
  overflow: auto;
  font-family: "Fira Code", "Consolas", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.5;
  padding: 20px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  width: 100%;
}

.code-container:hover {
  border-color: rgba(78, 164, 220, 0.5);
}

.code-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.code-container::-webkit-scrollbar-track {
  background: rgba(30, 30, 40, 0.5);
  border-radius: 4px;
}

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

.code-container::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

.language-java {
  color: #f8f8f2;
}

.language-java .keyword {
  color: #ff79c6;
}

.language-java .function {
  color: #50fa7b;
}

.language-java .string {
  color: #f1fa8c;
}

.language-java .comment {
  color: #6272a4;
}

/* ===== CTA部分样式 ===== */
#cta {
                padding: 50px 25px;
            }
.cta-section {
  text-align: center;
  padding: 60px 40px;
  background: linear-gradient(
    135deg,
    rgba(78, 164, 220, 0.15),
    rgba(108, 92, 231, 0.15)
  );
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.05) 0%,
    transparent 70%
  );
  z-index: -1;
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: 2.8rem;
  margin-bottom: 25px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cta-text {
  font-size: 1.3rem;
  margin-bottom: 40px;
  color: var(--text-light);
  line-height: 1.8;
}

.cta-button {
  display: inline-block;
  padding: 18px 55px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: white;
  font-size: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.4);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: all 0.6s ease;
}

.cta-button:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 25px rgba(108, 92, 231, 0.6);
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button i {
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.cta-button:hover i {
  transform: translateX(5px);
}

/* ===== 页脚样式 ===== */
footer {
  background: var(--navbar-bg);
  color: #f0f0f0;
  text-align: center;
  padding: 50px 20px 30px;
  margin-top: 40px;
  position: relative;
  border-top: 1px solid rgba(78, 164, 220, 0.2);
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo i {
  color: var(--primary-color);
}

footer p {
  max-width: 600px;
  margin: 0 auto 25px;
  color: #c0c0c0;
  font-size: 1.1rem;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  gap: 30px;
  margin: 25px 0 35px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: #f0f0f0;
  text-decoration: none;
  transition: var(--transition);
  padding: 8px 15px;
  border-radius: 6px;
}

.footer-links a:hover {
  color: var(--primary-color);
  background: rgba(78, 164, 220, 0.1);
}

.copyright {
  margin-top: 30px;
  font-size: 0.95rem;
  color: #aaa;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

/* ===== 动画效果 ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  animation: fadeInUp 0.8s ease forwards;
}

/* ===== 语言切换器样式 ===== */
.language-switcher {
  position: relative;
  cursor: pointer;
}

.current-language {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.current-language:hover {
  background: rgba(255, 255, 255, 0.15);
}

.language-options {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(10, 15, 30, 0.95);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  width: 140px;
  overflow: hidden;
  display: none;
  z-index: 100;
  border: 1px solid rgba(78, 164, 220, 0.2);
}

.language-switcher:hover .language-options {
  display: block;
}

.language-option {
  padding: 10px 15px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.language-option:hover {
  background-color: rgba(78, 164, 220, 0.2);
}

.language-option.active {
  background-color: rgba(78, 164, 220, 0.3);
  color: var(--primary-color);
  font-weight: 500;
}

/* ===== 响应式设计 ===== */
@media (max-width: 992px) {
  .intro-content {
    flex-direction: column;
  }

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

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

  .section-title {
    font-size: 2.2rem;
  }

  .cta-title {
    font-size: 2.4rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 15px 25px;
    flex-wrap: wrap;
  }

  .nav-links {
    gap: 20px;
    margin-top: 15px;
    width: 100%;
    justify-content: center;
  }

  .container {
    margin-top: 140px;
  }

  .section {
    padding: 30px;
  }

  .cta-section {
    padding: 50px 25px;
  }

  .cta-title {
    font-size: 2rem;
  }

  .cta-text {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 12px 15px;
  }

  .logo {
    font-size: 1.5rem;
  }

  .nav-links {
    gap: 12px;
    font-size: 0.9rem;
  }

  .container {
    margin-top: 160px;
  }

  .section {
    padding: 20px;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .feature {
    padding: 15px;
  }

  .cta-button {
    padding: 16px 40px;
    font-size: 1.2rem;
  }
}
.line-through {
  text-decoration: line-through;
}

/* ===== 修复pre-scrollable问题 ===== */
.pre-scrollable {
  max-height: 250px;
  overflow-y: auto;
}

/* 确保pre元素有宽度约束 */
pre {
  width: 100%;
  max-width: 100%;
}