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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #1e1e1e;
  background-color: #2a2a2a;
}

body.dark-mode {
  background-color: #1a1a1a;
  color: #e0e0e0;
}

/* Navigation */
nav {
  border-bottom: 1px solid #e2e8f0;
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

body.dark-mode nav {
  border-color: #3f3f3f;
  background-color: #1a1a1a;
}

nav .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #9ca3af;
  text-decoration: none;
}

body.dark-mode nav .logo {
  color: #d1d5db;
}

nav .nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

nav a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.3s;
}

body.dark-mode nav a {
  color: #94a3b8;
}

nav a:hover {
  color: #6b7280;
}

body.dark-mode nav a:hover {
  color: #d1d5db;
}

/* Main container */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Footer */
footer {
  border-top: 1px solid #e2e8f0;
  background-color: #f1f5f9;
  padding: 2rem 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  margin-top: 3rem;
}

body.dark-mode footer {
  background-color: #0f172a;
  border-color: #1e293b;
  color: #94a3b8;
}

/* Typography */
h1 {
  font-size: 2.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.875rem;
  font-weight: bold;
  margin-bottom: 1rem;
  margin-top: 2rem;
  letter-spacing: -0.01em;
  clear: left;
}

.guide-content h2 {
  margin-top: 3rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #cbd5e1;
}

body.dark-mode .guide-content h2 {
  border-bottom-color: #4a4a4a;
}

h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

/* Hero section */
.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero h1 {
  color: #0f172a;
  margin-bottom: 1rem;
}

body.dark-mode .hero h1 {
  color: #f1f5f9;
}

.hero p {
  font-size: 1.125rem;
  color: #64748b;
  max-width: 42rem;
  margin: 0 auto 1rem;
}

body.dark-mode .hero p {
  color: #cbd5e1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background-color: #6b7280;
  color: #fff;
}

.btn-primary:hover {
  background-color: #4b5563;
}

.btn-secondary {
  background-color: #e2e8f0;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

body.dark-mode .btn-secondary {
  background-color: #1e293b;
  color: #f1f5f9;
  border-color: #475569;
}

.btn-secondary:hover {
  background-color: #cbd5e1;
}

body.dark-mode .btn-secondary:hover {
  background-color: #334155;
}

/* Cards */
.card {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background-color: #fff;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
  cursor: pointer;
}

body.dark-mode .card {
  background-color: #2a2a2a;
  border-color: #3f3f3f;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card h3 {
  color: #6b7280;
  margin-top: 0;
}

body.dark-mode .card h3 {
  color: #d1d5db;
}

.card p {
  color: #64748b;
  font-size: 0.875rem;
}

body.dark-mode .card p {
  color: #cbd5e1;
}

.card-tag {
  display: inline-block;
  background-color: #f3f4f6;
  color: #4b5563;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.75rem;
}

body.dark-mode .card-tag {
  background-color: #2a2a2a;
  color: #d1d5db;
}

/* Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

body.dark-mode .breadcrumbs {
  color: #94a3b8;
}

.breadcrumbs a {
  color: #6b7280;
  text-decoration: none;
}

body.dark-mode .breadcrumbs a {
  color: #d1d5db;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* Back button */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

body.dark-mode .back-button {
  color: #d1d5db;
}

.back-button:hover {
  text-decoration: underline;
}

/* Guide content */
.guide-content {
  margin: 2rem 0;
  overflow: hidden;
}

.guide-content p {
  margin: 1rem 0;
  color: #475569;
}

body.dark-mode .guide-content p {
  color: #cbd5e1;
}

/* Character section styling */
.guide-content h3 {
  clear: both;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #cbd5e1;
  font-size: 1.4rem;
  color: #1e293b;
}

body.dark-mode .guide-content h3 {
  color: #e0e0e0;
  border-bottom-color: #4a4a4a;
}

/* Images in guides */
.guide-content img {
  max-width: 140px;
  height: auto;
  border-radius: 12px;
  margin: 0 1.5rem 1rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  float: left;
  border: 2px solid #f0f0f0;
}

body.dark-mode .guide-content img {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border-color: #3f3f3f;
}

/* Character info list styling */
.guide-content h3 + img + ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-content h3 + img + ul li {
  margin: 0.5rem 0;
  padding: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.5;
}

body.dark-mode .guide-content h3 + img + ul li {
  color: #cbd5e1;
}

.guide-content li strong {
  color: #2563eb;
  font-weight: 600;
}

body.dark-mode .guide-content li strong {
  color: #60a5fa;
}

.guide-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.guide-content li {
  margin: 0.5rem 0;
  color: #475569;
}

body.dark-mode .guide-content li {
  color: #cbd5e1;
}

.guide-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.guide-content table th,
.guide-content table td {
  border: 1px solid #e2e8f0;
  padding: 0.75rem;
  text-align: left;
}

body.dark-mode .guide-content table th,
body.dark-mode .guide-content table td {
  border-color: #3f3f3f;
}

.guide-content table th {
  background-color: #f1f5f9;
}

body.dark-mode .guide-content table th {
  background-color: #2a2a2a;
}

/* Navigation between guides */
.guide-nav {
  border-top: 1px solid #e2e8f0;
  padding-top: 2rem;
  margin-top: 2rem;
}

body.dark-mode .guide-nav {
  border-color: #334155;
}

/* Utility classes */
.text-center {
  text-align: center;
}

.space-y {
  margin-bottom: 2rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.pt-6 {
  padding-top: 1.5rem;
}

.pb-6 {
  padding-bottom: 1.5rem;
}

/* Link styling */
a {
  color: #6b7280;
  text-decoration: none;
}

body.dark-mode a {
  color: #d1d5db;
}

a:hover {
  text-decoration: underline;
}

/* 404 error page */
.error-page {
  text-align: center;
  padding: 3rem 1.5rem;
}

.error-page h1 {
  color: #dc2626;
}

body.dark-mode .error-page h1 {
  color: #f87171;
}

.error-page p {
  color: #64748b;
  margin: 1rem 0;
}

body.dark-mode .error-page p {
  color: #cbd5e1;
}
