/* Modern Dark Mode Styles for HTML Learning Article */

:root {
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --bg-tertiary: #2d2d2d;
  --text-primary: #e8e8e8;
  --text-secondary: #b8b8b8;
  --accent: #29e218; /* Soft violet for links, borders, highlights */
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --radius: 12px;
  --transition: all 250ms ease-out;
}

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 17px;
  margin: 0;
  padding: 2rem;
  min-height: 100vh;
}

.page {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 3rem;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 600;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 2rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

p {
  margin-bottom: 1.5rem;
}

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

ul {
  list-style: disc;
}

ol {
  list-style: decimal;
}

li {
  margin-bottom: 0.75rem;
}

nav ul {
  list-style: none;
  padding-left: 0;
}

nav li {
  margin-bottom: 0.5rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

a:hover, a:focus {
  color: #a78bfa;
  text-decoration: underline;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

pre {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 15px;
  line-height: 1.6;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  background: var(--bg-tertiary);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--accent);
}

.demo-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

section {
  margin-bottom: 3rem;
}

hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 3rem 0;
}

@media (max-width: 768px) {
  body {
    padding: 1rem;
    font-size: 16px;
  }
  
  .page {
    padding: 2rem 1.5rem;
    border-radius: 8px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
}
