:root {
  --primary: #a80e3a;
  --primary-dark: #860b2f;

  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;

  --note-bg: #fff1f5;
  --note-text: #7a1230;

  --shadow:
    0 10px 30px rgba(0, 0, 0, 0.06),
    0 2px 10px rgba(0, 0, 0, 0.03);
}

body.dark {
  --bg: #0f172a;
  --card: #111827;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #1e293b;

  --note-bg: rgba(168, 14, 58, 0.18);
  --note-text: #ffd6e2;

  --shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    0 2px 10px rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  word-wrap: break-word;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  padding: 16px;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

.container {
  width: 100%;
  max-width: 950px;
  margin: auto;
  background: var(--card);
  border-radius: 20px;
  padding: 48px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.toggle-btn {
  border: none;
  background: var(--primary);
  color: white;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: 0.25s ease;
}

.toggle-btn:hover {
  background: var(--primary-dark);
}

.header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
  margin-bottom: 40px;
}

.title {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 12px;
}

.updated {
  color: var(--muted);
  font-size: 0.95rem;
}

h2 {
  margin-top: 42px;
  margin-bottom: 16px;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  color: var(--primary);
  line-height: 1.3;
}

h3 {
  margin-top: 26px;
  margin-bottom: 12px;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.4;
}

p {
  margin-bottom: 16px;
  font-size: 1rem;
}

ul {
  margin-left: 22px;
  margin-bottom: 20px;
}

li {
  margin-bottom: 12px;
}

code {
  background: rgba(148, 163, 184, 0.15);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9rem;
  word-break: break-all;
}

.note {
  margin-top: 32px;
  background: var(--note-bg);
  border-left: 4px solid var(--primary);
  padding: 20px;
  border-radius: 12px;
  color: var(--note-text);
}

.footer {
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.floating-button {
  position: fixed;
  right: 14px;
  bottom: 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: var(--primary);
  color: white;
  text-decoration: none;

  padding: 14px 20px;
  border-radius: 999px;

  font-size: 14px;
  font-weight: 600;

  box-shadow:
    0 10px 25px rgba(168, 14, 58, 0.25),
    0 4px 10px rgba(0, 0, 0, 0.12);

  transition: 0.25s ease;
  z-index: 9999;
}

.floating-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .container {
    padding: 26px 18px;
    border-radius: 16px;
  }

  .topbar {
    justify-content: center;
  }

  .floating-button {
    left: 12px;
    right: 12px;
    bottom: 12px;
    text-align: center;
  }
}
