* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(to right, #e0f0ff, #f8fbff);
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

/* Navigation bar styles */
header {
  padding: 0;
  background-color: white;
  position: relative;
  height: 90px;
  display: flex;
  align-items: center;
}

.header-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  height: 90px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-link {
  display: block;
  text-decoration: none;
}

.logo-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: #0078d4;
  border-bottom: 2px solid #0078d4;
}

.menu-toggle {
  display: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #e74c3c;
  background-color: white;
  color: #333;
  font-size: 1.5rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background-color: #e74c3c;
  color: white;
}

.page-title-container {
  text-align: center;
  margin: 2rem 0;
}

.page-title {
  color: #0066cc;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: #666;
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 2rem;
}

.example-answer {
  width: 100%;
  max-width: 900px;
  margin: 1.5rem auto;
  padding: 1.5rem;
  background-color: #f8fbff;
  border-radius: 0.8rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.example-answer h2 {
  color: #0066cc;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.example-answer p {
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.example-answer p:last-child {
  margin-bottom: 1rem;
}

.example-image-container {
  margin: 1.5rem 0 0.5rem;
  text-align: center;
  width: 100%;
}

.example-image {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.calculator-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}

.card {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
  margin-bottom: 0;
}


.title-line {
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid #444;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
}

.title-main {
  font-weight: bold;
  margin-right: 0.5rem;
}

.form-group {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.label-area {
  width: 80px;
  text-align: right;
  margin-right: 10px;
}

.input-area {
  flex: 1;
}

.label-big {
  font-size: 1.5rem;
  font-weight: normal;
  color: #666;
}

.calculator-instructions {
  text-align: center;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #666;
}

input[type="number"], .result-box {
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  outline: none;
  width: 100%;
  text-align: center;
  font-size: 1.3rem;
}

input[type="number"] {
  text-align: center;
}

.result-box {
  background-color: white;
  color: #000;
  padding: 1rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
  font-weight: bold;
}

.buttons-container {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 2rem;
}

button {
  background-color: #3B82F6;
  color: white;
  padding: 0.75rem;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
  background-color: #2563EB;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.section-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 0;
}

.section-title {
  font-size: 1.8rem;
  color: #0066cc;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* How it works section */
.how-it-works {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.step-card {
  background-color: white;
  border-radius: 0.8rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  flex: 1;
  min-width: 250px;
  text-align: center;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #3B82F6;
  color: white;
  border-radius: 50%;
  margin: 0 auto 1rem;
  font-weight: bold;
}

.step-title {
  font-weight: 600;
  margin-bottom: 0.8rem;
}

/* FAQ section */
.faq-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

details {
  background-color: white;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

summary {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 3rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 1.5rem;
  transform: rotate(0);
  transition: transform 0.3s;
}

details[open] summary::after {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 1.5rem 1.5rem;
  line-height: 1.6;
}

/* Blog section */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.blog-card {
  background-color: white;
  border-radius: 0.8rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s;
}

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-thumbnail {
  width: 100%;
  height: 140px;
  background-color: #e1e8f0;
  object-fit: cover;
}

.blog-content {
  padding: 1rem;
}

.blog-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.blog-excerpt {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
  max-height: 4.5em; /* 大约3行文字高度 */
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.blog-excerpt:after {
  content: "...";
  position: absolute;
  bottom: 0;
  right: 0;
  background: linear-gradient(to right, transparent, white 50%);
  padding-left: 40px;
}

.blog-link {
  display: inline-block;
  color: #3B82F6;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.blog-link:hover {
  text-decoration: underline;
}

footer {
  text-align: center;
  padding: 1rem;
  background: #f2f2f2;
  color: #666;
  margin-top: 2rem;
  display: block;
}

.footer-content {
  width: fit-content;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.copyright {
  font-size: 0.9rem;
}

.footer-links {
  margin: 0;
}

.footer-link {
  color: #555;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Privacy page specific styles */
.hero {
  width: 100%;
  padding: 2rem 0;
}

.hero-inner {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.privacy-card {
  background: white;
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  margin-bottom: 2rem;
}

.privacy-card h1 {
  color: #0066cc;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.privacy-card h2 {
  color: #0066cc;
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.privacy-card h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

.privacy-card p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.privacy-card ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.privacy-card li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.privacy-card a {
  color: #0078d4;
  text-decoration: none;
}

.privacy-card a:hover {
  text-decoration: underline;
}

/* Result box styles */
#resultBox {
  background-color: #f8fbff;
  border-radius: 0.5rem;
  padding: 1.2rem;
  margin-top: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-left: 4px solid #3B82F6;
  transition: all 0.3s ease;
}

.result-detail-box {
  background-color: #f8fbff;
  border-radius: 0.8rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid #eaeef5;
  margin-top: 1.5rem;
  width: 100%;
}

#resultBox p {
  margin: 0.7rem 0;
  line-height: 1.5;
}

#resultBox p:first-child {
  margin-top: 0;
}

#resultBox p:last-child {
  margin-bottom: 0;
}

#resultBox strong {
  color: #0066cc;
  font-weight: 600;
  display: inline-block;
  width: 130px;
}

#resultText, #simplifiedForm, #polarForm {
  font-family: 'Courier New', monospace;
  font-weight: 600;
}

#steps {
  display: block;
  margin-top: 0.5rem;
  padding-left: 130px;
  color: #666;
  font-size: 0.9rem;
}

/* Mobile adaptation */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 80px;
    left: 5%;
    right: 5%;
    width: 90%;
    flex-direction: column;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    gap: 1rem;
    z-index: 1000;
    border-radius: 5px;
  }

  .nav-links.show {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 0.5rem;
    border-bottom: none;
  }
  
  .nav-links li a:hover,
  .nav-links li a.active {
    border-bottom: none;
    color: #0078d4;
  }
  
  .nav-links li {
    border-bottom: 1px solid #eee;
    padding: 0.25rem 0;
  }
  
  .nav-links li:last-child {
    border-bottom: none;
  }
  
  .header-container {
    width: 95%;
    padding: 0.5rem 1rem;
  }

  .example-answer {
    padding: 1.2rem;
    margin: 1rem auto;
  }

  .example-answer h2 {
    font-size: 1.3rem;
  }

  .example-answer p {
    font-size: 1rem;
  }

  .example-image-container {
    margin: 1rem 0 0.5rem;
  }

  .example-image {
    max-width: 100%;
    border-radius: 0.4rem;
  }

  .how-it-works {
    flex-direction: column;
    gap: 1rem;
  }

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

  .privacy-card {
    padding: 1.5rem;
  }
  
  .privacy-card h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  .card {
    padding: 1.5rem 1rem;
  }
  
  .label-area {
    width: 60px;
  }
  
  .page-title {
    font-size: 1.5rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  main {
    padding: 1rem;
  }
  
  .privacy-card {
    padding: 1.2rem;
  }

  #resultBox {
    padding: 1rem;
    margin-top: 1.2rem;
  }
  
  #resultBox strong {
    width: 110px;
    font-size: 0.9rem;
  }
  
  #steps {
    padding-left: 0;
    margin-top: 0.7rem;
    font-size: 0.85rem;
  }

  .result-detail-box {
    padding: 1.2rem;
    margin-top: 1.2rem;
  }
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
  }
} 