/* ===== REPLICATING LEETCODE DESIGN SYSTEM ===== */

:root {
  --bg-color: #ffffff;
  --header-bg: #ffffff;
  --text-primary: rgba(0, 0, 0, 0.85);
  --text-secondary: rgba(0, 0, 0, 0.65);
  --text-muted: rgba(0, 0, 0, 0.45);
  --border-color: #f0f0f0;
  --link-color: #007aff;
  --max-width: 1100px;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

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

body {
  font-family: var(--font-stack);
  background-color: var(--bg-color);
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.header {
  height: 50px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 55px;
  position: sticky;
  top: 0;
  background: var(--header-bg);
  z-index: 1000;
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 10px;
}

.logo img {
  height: 34px;
  width: auto;
  border-radius: 4px;
}

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

/* ===== MAIN CONTENT ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 10px 100px 50px; /* Increased left padding for nesting */
}

.title-section {
  text-align: left;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.title-section h1 {
  font-size: 40px;
  font-weight: 400;
  margin-left: -40px; /* Pull back to the left */
  /* Light weight for the first part */
  color: var(--text-primary);
}

.title-section h1 strong {
  font-weight: 600;
  /* Bold weight for the second part */
}

.last-updated {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ===== DOCUMENT CONTENT ===== */
.content h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 48px 0 12px -40px; /* Pull back to the left */
  text-transform: none;
  /* LeetCode uses mixed case in many sections, but I will make it clean */
}

.content h3 {
  font-size: 25px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 32px 0 8px -20px; /* Partial indent for sub-headers */
}

.content p {
  margin-bottom: 10px;
  word-wrap: break-word;
}

.content ul {
  margin-bottom: 10px;
  padding-left: 24px;
}

.content li {
  margin-bottom: 4px;
}

.content strong {
  color: var(--text-primary);
}

.content a {
  color: var(--link-color);
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
}

/* ===== BOX STYLE (For special content) ===== */
.info-box {
  background: #f8f8f8;
  border-radius: 4px;
  padding: 20px;
  margin: 20px 0;
  border-left: 4px solid #ddd;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 30px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header {
    padding: 0 10px;
  }

  .container {
    padding: 30px 20px 60px 20px;
  }

  .title-section h1 {
    font-size: 24px;
  }

  .content h2 {
    font-size: 20px;
  }
}