@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =========================
   BASE COLOR VARIABLES
   ========================= */
:root {
  --color-bg: #f8f9fb;
  --color-surface: rgba(255, 255, 255, 0.8);
  --color-text: #1f1f29;
  --color-muted: #60636f;
  --color-primary: #0066ff;
  --color-accent: #4f46e5;
  --color-border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 16px;
  --transition: all 0.3s ease;
}

/* =========================
   DARK MODE
   ========================= */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0d1117;
    --color-surface: rgba(255, 255, 255, 0.05);
    --color-text: #e6e6ef;
    --color-muted: #a4a7b3;
    --color-primary: #3793ff;
    --color-accent: #7a6eff;
    --color-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.6);
  }
}

/* =========================
   GLOBAL STYLES
   ========================= */
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  padding: 0;
  transition: background 0.4s ease, color 0.4s ease;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* =========================
   HEADER / NAVIGATION
   ========================= */
header {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  text-align: center;
  padding: 1.5em 0;
  transition: var(--transition);
}

h1 {
  margin: 0;
  font-size: 2em;
  font-weight: 700;
}

.nav-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1em;
}

.nav-btn {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  padding: 0.75em 2.5em;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.nav-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* =========================
   MAIN CONTENT
   ========================= */
main {
  max-width: 1100px;
  margin: 3em auto;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 2em;
  transition: var(--transition);
}

.list-title {
  text-align: center;
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 1.5em;
}

.demon-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.demon-list li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1.2em;
  margin-bottom: 0.75em;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.demon-list li:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.level-layout {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.level-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.thumb-link {
  display: inline-block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.thumb-link:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}
.thumb {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.level-center,
.level-right {
  font-size: 1em;
  color: var(--color-muted);
}

.label {
  font-weight: 600;
  color: var(--color-text);
}

/* =========================
   FOOTER
   ========================= */
footer {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: 2em 0;
  color: var(--color-muted);
  font-size: 0.9em;
  transition: var(--transition);
}
footer a {
  color: var(--color-primary);
}
footer a:hover {
  color: var(--color-accent);
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 768px) {
  main {
    margin: 1.5em;
    padding: 1.25em;
  }
  .level-layout {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1em;
  }
  .level-left {
    flex-direction: column;
  }
  .thumb {
    width: 100%;
    max-width: 250px;
  }
  .nav-btn {
    width: 100%;
    text-align: center;
  }
}