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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #121212;
  color: #e0e0e0;
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

body[data-theme="light"] {
  background: #fafafa;
  color: #121212;
}

/* === HEADER === */
header {
  padding: 1rem;
  background: #1e1e1e;
  color: #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

button#theme-toggle {
  background: none;
  border: none;
  color: #e0e0e0;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.3s ease;
}

button#theme-toggle:hover {
  color: #a0a0a0;
}

/* === NAVIGATION === */
nav {
  background: #1e1e1e;
  padding: 1rem;
  border-bottom: 1px solid #333;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-list a {
  color: #e0e0e0;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-list a:hover {
  background: #333;
  color: #e0e0e0;
}

/* === MAIN CONTAINER === */
main.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
}

/* === CARD === */
.card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.card h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #e0e0e0;
}

.card p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #b0b0b0;
}

/* === POST LIST === */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  padding: 0.75rem;
  border-bottom: 1px solid #333;
  transition: background 0.3s ease;
}

.post-list li:hover {
  background: #2e2e2e;
}

.post-list li a {
  color: #e0e0e0;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.post-list li small {
  font-size: 0.85rem;
  color: #999;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #333;
  color: #e0e0e0;
  border: none;
  border-radius: 5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn:hover {
  background: #555;
  color: #e0e0e0;
}

/* === FOOTER === */
footer {
  background: #1e1e1e;
  color: #b0b0b0;
  padding: 1rem;
  text-align: center;
  margin-top: 2rem;
  border-top: 1px solid #333;
}

/* === LIGHT THEME === */
[data-theme="light"] .card {
  background: #f0f0f0;
  border-color: #e0e0e0;
}

[data-theme="light"] .card h2 {
  color: #121212;
}

[data-theme="light"] .card p {
  color: #333;
}

[data-theme="light"] .post-list li {
  background: #f8f8f8;
}

[data-theme="light"] .btn {
  background: #e0e0e0;
  color: #121212;
}

[data-theme="light"] .btn:hover {
  background: #b0b0b0;
}

/* === FOR MOBILE === */
@media (max-width: 768px) {
  .container {
    padding: 0.5rem;
  }

  main {
    margin: 1rem auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 0.75rem;
  }

  header h1 {
    font-size: 1.2rem;
  }

  .card {
    margin-bottom: 1.5rem;
  }

  .post-list li {
    padding: 0.5rem;
  }
}