/* ===== Color Variables ===== */
:root {
  /* Accents */
  --rosewater: #f5e0dc;
  --flamingo: #f2cdcd;
  --pink: #f5c2e7;
  --mauve: #cba6f7;
  --red: #f38ba8;
  --maroon: #eba0ac;
  --peach: #fab387;
  --yellow: #f9e2af;
  --green: #a6e3a1;
  --teal: #94e2d5;
  --sky: #89dceb;
  --sapphire: #74c7ec;
  --blue: #89b4fa;
  --lavender: #b4befe;

  /* Text */
  --text: #cdd6f4;
  --subtext1: #bac2de;
  --subtext0: #a6adc8;

  /* Surfaces */
  --overlay2: #9399b2;
  --overlay1: #7f849c;
  --overlay0: #6c7086;

  --surface2: #585b70;
  --surface1: #45475a;
  --surface0: #313244;

  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;
}

/* ===== Base Layout ===== */
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--base);
  color: var(--text);
  line-height: 1.6;
}

/* ===== Typography ===== */

h1 {
  color: var(--red);
}

h2 {
  color: var(--mauve);
}

h3 {
  color: var(--pink);
}

h4 {
  color: var(--peach);
}

h5 {
  color: var(--yellow);
}

h6 {
  color: var(--green);
}

p {
  color: var(--sky);
}

small {
  color: var(--subtext0);
}

/* ===== Links ===== */

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--sky);
  text-decoration: underline;
}

a:visited {
  color: var(--lavender);
}

/* ===== Layout Elements ===== */

header {
  background: var(--mantle);
  border-bottom: 1px solid var(--surface0);
  padding: 1rem 2rem;
}

main {
  padding: 2rem;
  max-width: 900px;
  margin: auto;
}

footer {
  background: var(--mantle);
  border-top: 1px solid var(--surface0);
  padding: 1rem 2rem;
  color: var(--subtext0);
}

/* ===== Cards ===== */

.card {
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ===== Buttons ===== */

button {
  background: var(--blue);
  color: var(--crust);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

button:hover {
  background: var(--sapphire);
}

button.secondary {
  background: var(--surface1);
  color: var(--text);
}

button.secondary:hover {
  background: var(--surface2);
}

/* ===== Forms ===== */

input,
textarea,
select {
  background: var(--surface0);
  color: var(--text);
  border: 1px solid var(--surface1);
  padding: 0.5rem;
  border-radius: 6px;
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
}

/* ===== Tables ===== */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface0);
}

th {
  background: var(--surface1);
  color: var(--text);
}

td,
th {
  padding: 0.75rem;
  border: 1px solid var(--surface1);
}

/* ===== Alerts ===== */

.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.alert.success {
  background: rgba(166, 227, 161, 0.15);
  border-left: 4px solid var(--green);
}

.alert.warning {
  background: rgba(249, 226, 175, 0.15);
  border-left: 4px solid var(--yellow);
}

.alert.error {
  background: rgba(243, 139, 168, 0.15);
  border-left: 4px solid var(--red);
}

/* ===== Blockquotes ===== */

blockquote {
  border-left: 4px solid var(--mauve);
  padding-left: 1rem;
  margin-left: 0;
  color: var(--subtext1);
  font-style: italic;
}

/* ===== Code Blocks ===== */

code {
  background: var(--surface1);
  color: var(--peach);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

pre {
  background: var(--mantle);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 6px;
  border: 1px solid var(--surface0);
}

/* ===== Text Emphasis ===== */

strong {
  color: var(--maroon);
}

em {
  color: var(--teal);
}

mark {
  background: var(--yellow);
  color: var(--crust);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

/* ===== Lists ===== */

li {
  color: var(--text);
}

/* ===== Utility Classes ===== */

.text-muted {
  color: var(--subtext0);
}

.bg-surface {
  background: var(--surface0);
}

.border {
  border: 1px solid var(--surface1);
}

.content {
  background: var(--base);
  padding: 2rem;
}
