:root {
  --primary-color: #e94560;
  --primary-dark: #c23a51;
  --primary-light: #ff6b9d;
  --background: #1a1a2e;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --code-background: #0f172a;
  --code-border: #1e293b;
  --card-bg: #16213e;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
  line-height: 1.8;
  color: var(--text-primary);
  background: var(--background);
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  padding: 3rem 0;
  border-bottom: 3px solid var(--primary-color);
  margin-bottom: 3rem;
}

.standard-badge {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.version {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

nav {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 2rem;
  margin-bottom: 3rem;
}

nav h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

nav ol {
  list-style: none;
  counter-reset: chapter;
}

nav li {
  margin-bottom: 0.75rem;
  counter-increment: chapter;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

nav a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(0.5rem);
}

nav a::before {
  content: counter(chapter) ".";
  font-weight: 700;
  color: var(--primary-color);
  margin-right: 1rem;
  min-width: 2rem;
}

nav a:hover::before {
  color: white;
}

h2 {
  font-size: 2rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
}

h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-light);
}

h4 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

code {
  background: var(--code-background);
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
  font-size: 0.875em;
  border: 1px solid var(--code-border);
  color: var(--primary-light);
}

pre {
  background: var(--code-background);
  border: 1px solid var(--code-border);
  border-left: 4px solid var(--primary-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.info-box {
  background: rgba(233, 69, 96, 0.1);
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0.5rem;
}

.info-box h4 {
  color: var(--primary-color);
  margin-top: 0;
}

.warning-box {
  background: rgba(251, 191, 36, 0.1);
  border-left: 4px solid #fbbf24;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0.5rem;
}

.warning-box h4 {
  color: #fbbf24;
  margin-top: 0;
}

.example-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

.example-box h4 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
}

thead {
  background: var(--primary-color);
  color: white;
}

th, td {
  padding: 1rem;
  text-align: left;
  border: 1px solid var(--border-color);
}

tbody tr:nth-child(even) {
  background: var(--card-bg);
}

tbody tr:hover {
  background: rgba(233, 69, 96, 0.1);
}

.navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.nav-button {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.nav-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(233, 69, 96, 0.3);
}

.nav-button.prev::before {
  content: "← ";
}

.nav-button.next::after {
  content: " →";
}

footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-motto {
  font-style: italic;
  color: var(--primary-color);
  margin-top: 1rem;
  font-weight: 600;
  font-size: 1rem;
}

.shield-layers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.shield-card {
  background: var(--card-bg);
  border: 2px solid var(--primary-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}

.shield-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(233, 69, 96, 0.3);
}

.shield-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.shield-card h4 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .shield-layers {
    grid-template-columns: 1fr;
  }
}
