/* General Styles */
body {
  font-family: "Arial", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f0f2f5; /* Light grey background */
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5px 20px; /* 这里的 padding-top 已经是 5px */
}

/* Header */
header {
  background-color: #ffffff;
  padding: 0; /* 移除header自身的内边距，由.header-inner-content处理 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center; /* PC: 使内部内容居中 */
  align-items: center;
  flex-wrap: wrap;
  position: relative; /* For hamburger menu positioning */
}

/* 新增的内部容器，用于PC端布局 */
.header-inner-content {
  width: 100%; /* 占据header的全部宽度 */
  max-width: 1200px; /* 限制内容的最大宽度 */
  padding: 15px 20px; /* 在这里应用内边距 */
  display: flex;
  justify-content: space-between; /* 将logo推到左侧，按钮推到右侧 */
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Styles for the new image logo */
.header-left .site-logo {
  height: 70px; /* Set the height of the logo */
  width: 70px; /* Set the width to make it 1:1 */
  max-width: 100%; /* Ensure responsiveness */
  object-fit: contain; /* Maintain aspect ratio */
  margin: 0; /* Remove default margin */
  padding: 0; /* Remove default padding */
}

/* Removed h1 specific styles as it's replaced by img */
.header-left h1 {
  /* These styles are no longer needed for the text logo */
  /* font-size: 60px; */
  /* color: #0056b3; */
  /* margin: 0; */
  /* padding: 0; */
  /* font-weight: bold; */
  display: none; /* Hide h1 if it somehow remains */
}

.header-right {
  display: flex;
  gap: 15px;
}

.btn {
  background-color: #ff8c00; /* Orange for primary actions */
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px; /* More rounded corners */
  cursor: pointer;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn:hover {
  background-color: #e67e00; /* Darker orange on hover */
  transform: translateY(-2px);
}

.btn.register {
  background-color: #28a745; /* Green for register */
}

.btn.register:hover {
  background-color: #218838;
}

/* Hamburger Menu Icon */
.hamburger-menu {
  display: none; /* Hidden by default, shown on mobile */
  font-size: 30px;
  cursor: pointer;
  color: #0056b3;
  padding: 5px;
  border-radius: 5px;
  background-color: #e9f5ff;
  line-height: 1; /* Ensure icon is centered */
}

/* Navigation Bar (PC View) */
.navbar-container {
  background-color: #0056b3; /* Deep blue navigation bar */
  padding: 10px 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-top: 15px; /* Space below header */
  border-radius: 8px;
}

.navbar-container nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px; /* Spacing between links */
}

.navbar-container nav ul li a {
  text-decoration: none;
  color: #ffffff; /* White text for contrast */
  font-weight: bold;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.navbar-container nav ul li a:hover {
  background-color: #004085; /* Darker blue on hover */
}

/* Mobile Navigation (Hidden by default) */
.mobile-nav-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent overlay */
  z-index: 999;
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: -250px; /* Hidden off-screen */
  width: 250px;
  height: 100%;
  background-color: #0056b3; /* Blue background */
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  transition: left 0.3s ease-in-out;
  z-index: 1000;
  padding-top: 60px; /* Space for close button/top content */
}

.mobile-nav.open {
  left: 0; /* Slide in */
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav ul li a {
  display: block;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
}

.mobile-nav ul li a:hover {
  background-color: #004085;
}

.mobile-nav .close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

/* Main Content */
main {
  background-color: #ffffff;
  padding: 2px 40px 40px 40px; /* 调整 padding-top 为 5px */
  margin-top: 0; /* 移除 margin-top */
  border-radius: 12px; /* More rounded corners */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h1 {
  color: #0056b3;
  font-size: 36px; /* Larger headings */
  margin-bottom: 25px;
  text-align: center;
  font-weight: bold;
  position: relative;
  padding-bottom: 10px;
}

h1::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #ff8c00; /* Orange underline */
  border-radius: 2px;
}

/* Updated h2 styling for left alignment */
h2 {
  color: #0056b3;
  font-size: 30px;
  margin-top: 40px;
  margin-bottom: 20px;
  text-align: left; /* Default to left for h2 */
  font-weight: bold;
  position: relative; /* For underline */
  padding-bottom: 10px; /* Space for underline */
}

h2::after {
  content: "";
  position: absolute;
  left: 0; /* Align underline to left */
  bottom: 0;
  width: 80px;
  height: 4px;
  background-color: #ff8c00; /* Orange underline */
  border-radius: 2px;
}

/* Specific styles for the home page content block */
.home-content-section {
  display: flex;
  flex-direction: column; /* Stack elements vertically */
  align-items: center; /* Center horizontally */
  gap: 25px; /* Space between image and button */
  margin-bottom: 40px;
}

/* Re-add .home-content-section img styles */
.home-content-section img {
  max-width: 500px; /* Larger images */
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* New styles for the app download hero section */
.app-download-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2px 20px;
  background-color: #e9f5ff; /* Light blue background for emphasis */
  border-radius: 12px;
  margin-bottom: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.app-download-hero h2 {
  font-size: 38px;
  color: #0056b3;
  margin-bottom: 25px;
  text-align: center; /* Center align for this specific h2 */
}

.app-download-hero h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.app-hero-image {
  max-width:500px;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 30px;
}

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.download-buttons .btn {
  padding: 15px 30px;
  font-size: 18px;
  min-width: 200px; /* Ensure buttons are wide enough */
}

.download-buttons .btn .icon {
  margin-right: 8px;
  vertical-align: middle;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  background-color: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

table th,
table td {
  border: 1px solid #e0e0e0;
  padding: 15px; /* More padding */
  text-align: left;
}

table th {
  background-color: #0056b3; /* Blue header for tables */
  color: white;
  font-weight: bold;
  text-transform: uppercase;
}

table tr:nth-child(even) {
  background-color: #f2f2f2;
}

.text-content {
  line-height: 1.8; /* Better readability */
  margin-bottom: 30px;
  font-size: 17px;
}

.text-content h3 {
  color: #ff8c00; /* Orange for subheadings */
  margin-top: 35px;
  margin-bottom: 18px;
  font-size: 24px;
  font-weight: bold;
}

.text-content ul,
.text-content ol {
  list-style-position: inside;
  padding-left: 0; /* Remove default padding */
}

.text-content li {
  margin-bottom: 10px;
  padding-left: 25px; /* Indent list items */
  position: relative;
}

.text-content ul li::before {
  content: "•"; /* Custom bullet */
  color: #28a745; /* Green bullet */
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

/* Re-add .article-image-container and .article-image-container img styles */
.article-image-container {
  text-align: center;
  margin: 30px 0;
}
.article-image-container img {
  max-width: 100%; /* Larger images */
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* FAQ Section Styles */
.faq-section {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.faq-item {
  background-color: #fdfdfd;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #e9f5ff; /* Light blue for questions */
  color: #0056b3;
  font-weight: bold;
  cursor: pointer;
  font-size: 18px;
  transition: background-color 0.3s ease;
}

.faq-question:hover {
  background-color: #d0e9ff;
}

.faq-question .icon {
  font-size: 24px;
  transition: transform 0.3s ease;
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  background-color: #ffffff;
}

.faq-answer p {
  padding-bottom: 15px;
  margin: 0;
}

.faq-item.open .faq-answer {
  max-height: 200px; /* Adjust as needed for content length */
  padding: 15px 20px;
}

.faq-item.open .faq-question .icon {
  transform: rotate(180deg);
}

/* Footer */
footer {
  background-color: #222; /* Darker footer */
  color: #ccc;
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
  border-top: 5px solid #ff8c00; /* Orange top border */
}

footer .footer-links {
  margin-top: 20px;
  margin-bottom: 15px;
}

footer .footer-links a {
  color: #ff8c00; /* Orange links */
  text-decoration: none;
  margin: 0 15px;
  font-size: 15px;
  transition: color 0.3s ease;
}

footer .footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Specific styles for the login form */
.login-form-container {
  background-color: #fdfdfd;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  max-width: 450px;
  margin: 40px auto;
  text-align: center;
}

.login-form-container h2 {
  color: #0056b3;
  font-size: 28px;
  margin-bottom: 25px;
  text-align: center;
}

.login-form-container h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #555;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  width: calc(100% - 24px); /* Adjust for padding */
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box; /* Include padding in width */
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
  border-color: #0056b3;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 25px;
}

.login-actions .btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 18px;
}

.forgot-password,
.register-link {
  margin-top: 15px;
  font-size: 15px;
}

.forgot-password a,
.register-link a {
  color: #0056b3;
  text-decoration: none;
  font-weight: bold;
}

.forgot-password a:hover,
.register-link a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  header {
    flex-direction: column; /* Stack logo and actions vertically */
    align-items: center; /* Center items horizontally */
    padding: 10px 20px;
    gap: 10px; /* Space between logo and action row */
  }
  .header-inner-content {
    flex-direction: column; /* Stack children vertically */
    padding: 0; /* Remove inner padding, handled by header */
    width: 100%; /* Take full width */
    max-width: none; /* Remove max-width constraint */
  }
  .header-left {
    width: 100%; /* Logo takes full width */
    justify-content: center; /* Center logo */
    margin-bottom: 10px; /* Space below logo */
  }
  .header-actions {
    width: 100%; /* Actions row takes full width */
    display: flex;
    justify-content: space-between; /* Hamburger left, buttons right */
    align-items: center;
    gap: 10px;
  }
  .hamburger-menu {
    display: block; /* Show hamburger menu */
    order: 0; /* Ensure hamburger is on the left */
  }
  .header-right {
    order: 1; /* Ensure login/register buttons are on the right */
  }

  /* Hide PC navigation bar on mobile */
  .navbar-container {
    display: none;
  }

  /* Show mobile navigation overlay and menu */
  .mobile-nav-overlay {
    display: block; /* Show overlay when menu is open */
  }
  .mobile-nav {
    display: block; /* Show mobile menu */
  }

  main {
    padding: 5px 25px 25px 25px; /* 调整 padding-top 为 5px */
  }
  h1 {
    font-size: 30px;
  }
  h2 {
    font-size: 26px;
  }
  h2::after {
    width: 60px; /* Adjust underline width for mobile */
  }
  .home-content-section img {
    max-width: 350px; /* Larger for mobile */
  }
  .app-download-hero h2 {
    font-size: 30px;
  }
  .app-hero-image {
    max-width: 250px;
  }
  .download-buttons .btn {
    padding: 12px 25px;
    font-size: 16px;
    min-width: 180px;
  }
  table th,
  table td {
    padding: 10px;
    font-size: 14px;
  }
  .text-content {
    font-size: 15px;
  }
  .text-content h3 {
    font-size: 20px;
  }
  .faq-question {
    font-size: 16px;
    padding: 12px 15px;
  }
  .faq-question .icon {
    font-size: 20px;
  }
  footer {
    padding: 20px 10px;
  }
  footer .footer-links a {
    margin: 0 8px;
  }
  .login-form-container {
    margin: 20px auto;
    padding: 20px;
  }
  .login-form-container h2 {
    font-size: 24px;
  }
  .form-group input {
    font-size: 15px;
  }
  .login-actions .btn {
    font-size: 16px;
    padding: 12px 15px;
  }
}

@media (max-width: 480px) {
  .header-left .site-logo {
    height: 70px; /* Adjust image logo size for mobile */
    width: 70px; /* Adjust image logo size for mobile */
  }
  .btn {
    padding: 8px 15px;
    font-size: 14px;
  }
  h1 {
    font-size: 26px;
  }
  h2 {
    font-size: 22px;
  }
  /* Re-add mobile-specific .home-content-section img styles */
  .home-content-section img {
    max-width: 300px; /* Larger for smaller mobile screens */
  }
  .app-download-hero h2 {
    font-size: 26px;
  }
  .app-hero-image {
    max-width: 200px;
  }
  .download-buttons .btn {
    min-width: unset; /* Remove min-width for very small screens */
    width: 100%; /* Make buttons full width */
  }
}
