/* HabitDesign · Common Stylesheet */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1c1c1e;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7fa 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-color-scheme: dark) {
  body {
    color: #f2f2f7;
    background: linear-gradient(180deg, #000000 0%, #1c1c1e 100%);
  }
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* Header */
header {
  text-align: center;
  padding: 48px 0 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 32px;
}

@media (prefers-color-scheme: dark) {
  header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
}

header .logo {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.25);
}

header .logo svg {
  width: 44px;
  height: 44px;
  fill: #ffffff;
}

header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

header p.subtitle {
  font-size: 14px;
  color: #8e8e93;
  margin-bottom: 0;
}

/* Page title block */
.page-title {
  margin-bottom: 32px;
}

.page-title h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-title .meta {
  font-size: 13px;
  color: #8e8e93;
}

/* Main content */
main {
  font-size: 16px;
}

main h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
  letter-spacing: -0.3px;
}

main h2:first-child {
  margin-top: 0;
}

main h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 8px;
}

main p {
  margin-bottom: 12px;
  color: #3a3a3c;
}

@media (prefers-color-scheme: dark) {
  main p {
    color: #c7c7cc;
  }
}

main strong {
  font-weight: 600;
  color: #1c1c1e;
}

@media (prefers-color-scheme: dark) {
  main strong {
    color: #f2f2f7;
  }
}

main ul,
main ol {
  margin: 12px 0 16px 24px;
}

main li {
  margin-bottom: 6px;
  color: #3a3a3c;
}

@media (prefers-color-scheme: dark) {
  main li {
    color: #c7c7cc;
  }
}

main a {
  color: #007aff;
  text-decoration: none;
}

main a:hover {
  text-decoration: underline;
}

/* Highlight blocks */
.highlight {
  background: linear-gradient(135deg, #007aff10 0%, #5856d610 100%);
  border-left: 3px solid #007aff;
  padding: 16px 20px;
  border-radius: 12px;
  margin: 20px 0;
  font-size: 15px;
}

@media (prefers-color-scheme: dark) {
  .highlight {
    background: linear-gradient(135deg, #007aff20 0%, #5856d620 100%);
  }
}

.highlight strong {
  display: block;
  margin-bottom: 4px;
}

/* Cards */
.card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 24px;
  margin: 16px 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
  .card {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.1);
  }
}

/* Section divider */
section {
  padding: 24px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  section {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
}

section:last-child {
  border-bottom: none;
}

/* FAQ */
.faq-item {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: box-shadow 0.2s;
}

.faq-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  .faq-item {
    background: #1c1c1e;
    border-color: rgba(255, 255, 255, 0.1);
  }
}

.faq-item .question {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  color: #007aff;
}

.faq-item .answer {
  color: #3a3a3c;
  font-size: 15px;
}

@media (prefers-color-scheme: dark) {
  .faq-item .answer {
    color: #c7c7cc;
  }
}

/* Email link */
.contact-block {
  background: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
  color: #ffffff;
  padding: 24px;
  border-radius: 16px;
  text-align: center;
  margin: 24px 0;
}

.contact-block .icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.contact-block .label {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 4px;
}

.contact-block a {
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

/* Footer */
footer {
  text-align: center;
  padding: 32px 0 0;
  margin-top: 48px;
  font-size: 13px;
  color: #8e8e93;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  footer {
    border-top-color: rgba(255, 255, 255, 0.1);
  }
}

footer .links {
  margin-bottom: 12px;
}

footer .links a {
  color: #007aff;
  text-decoration: none;
  margin: 0 8px;
}

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

/* Lang switch */
.lang-switch {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 4px;
}

@media (prefers-color-scheme: dark) {
  .lang-switch {
    background: rgba(255, 255, 255, 0.08);
  }
}

.lang-switch a {
  padding: 4px 10px;
  font-size: 13px;
  color: #1c1c1e;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
}

@media (prefers-color-scheme: dark) {
  .lang-switch a {
    color: #f2f2f7;
  }
}

.lang-switch a.active {
  background: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  .lang-switch a.active {
    background: #2c2c2e;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .container {
    padding: 24px 16px 60px;
  }

  header h1 {
    font-size: 24px;
  }

  main h2 {
    font-size: 18px;
  }

  .lang-switch {
    top: 16px;
    right: 16px;
  }
}
