body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}
:root {
  --bg: #f7f8fa;
  --text: #222;
  --accent: #e94e77;
  --card-bg: #fff;
  --nav-bg: #fff;
  --footer-bg: #222;
  --footer-text: #fff;
}
.dark {
  --bg: #181a1b;
  --text: #f7f8fa;
  --accent: #e94e77;
  --card-bg: #222;
  --nav-bg: #222;
  --footer-bg: #181a1b;
  --footer-text: #e94e77;
}
header {
  background: var(--nav-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  width: 100%;
}

@media (min-width: 901px) {
  header {
    position: sticky;
    top: 0;
    z-index: 1000;
    left: 0;
  }
}

@media (max-width: 900px) {
  header {
    position: static;
  }
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}
.logo {
  font-size: 1.7rem;
  font-weight: bold;
  color: var(--accent);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  position: relative;
  transition: color 0.3s, transform 0.3s cubic-bezier(.4,0,.2,1);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(.4,0,.2,1);
}
}
.nav-links a:hover {
  color: var(--accent);
  transform: translateY(-8px) scale(1.12);
}
}
.nav-links a:hover::after {
  width: 100%;
}
}
#theme-toggle {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
}
/* Profile Icon Color */
#profile-btn i {
  color: var(--accent);
  transition: color 0.3s;
}
.dark #profile-btn i {
  color: #e94e77;
}
.hero {
  text-align: center;
  padding: 4rem 2rem 2rem 2rem;
}
.cta-btn {
  border-radius: 30px;
  text-decoration: none;
  transition: background 0.2s;
}
.card-grid {
  display: grid;
}
.card:hover {
  margin-top: 2rem;
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 14px;
  color: var(--text);
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.comment-section h3 {
  color: var(--accent);
  margin-bottom: 1rem;
}
.comments-list {
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  padding: 1.5rem;
  background: #fafbfc;
  margin-bottom: 2rem;
  transition: background 0.3s, border-color 0.3s;
}
.dark .comments-list {
  background: #222;
  border-color: #444;
}
.comment-parent {
  margin-bottom: 1.2rem;
}
.comment-parent > div:first-child {
  font-weight: bold;
  color: var(--accent);
}
.comment-parent > div span {
  color: #888;
  font-weight: normal;
  font-size: 0.95rem;
}
.comment-parent > div:nth-child(2) {
  margin: 0.5rem 0 0.5rem 0;
}
.comment-child {
  margin-left: 2rem;
  margin-top: 0.7rem;
}
.comment-child > div:first-child {
  font-weight: bold;
  color: var(--accent);
}
.comment-child > div span {
  color: #888;
  font-weight: normal;
  font-size: 0.95rem;
}
.comment-child > div:nth-child(2) {
  margin: 0.5rem 0 0.5rem 0;
}
.comment-section button[type="button"] {
  background: #ffe3ed;
  color: var(--accent);
  border: none;
  border-radius: 6px;
  padding: 0.3rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  transition: background 0.2s, color 0.2s;
}
.dark .comment-section button[type="button"] {
  background: #333;
  color: var(--accent);
}
.comment-section textarea {
  width: 100%;
  padding: 0.7rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  margin-bottom: 1rem;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}
.dark .comment-section textarea {
  border-color: #444;
}
.comment-section button[type="submit"] {
  padding: 0.7rem 2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.comment-section button[type="submit"]:hover {
  background: #c13c5c;
}
.read-more {
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
}
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2rem 0 1rem 0;
  text-align: center;
}
.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 0 0 0;
  padding: 0;
}
.footer-links a {
  color: var(--footer-text);
  text-decoration: none;
  font-weight: 500;
}
.footer-links a:hover {
  text-decoration: underline;
}
/* Login/Signup/Contact/Categories */
.form-container {
  max-width: 400px;
  margin: 3rem auto;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.form-container h2 {
  margin-bottom: 1.5rem;
  color: var(--accent);
}
.form-group {
  margin-bottom: 1.2rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-btn {
  width: 100%;
  padding: 0.8rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.2s;
}
.form-btn:hover {
  background: #c13c5c;
}
.categories-list {
  max-width: 700px;
  margin: 3rem auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.category-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s;
}
.category-card:hover {
  transform: scale(1.04);
  background: #ffe3ed;
}
.category-card h3 {
  color: var(--accent);
  margin-bottom: 0.7rem;
}

/* Latest Posts Grid */
.latest-posts {
  padding: 2rem 0;
}
.latest-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 2rem auto;
}
.post-card {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}
.post-card:hover {
  transform: scale(1.03);
}
.post-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}
.post-info {
  padding: 1.2rem;
}
.post-info h3 {
  margin: 0 0 0.7rem 0;
  color: var(--accent);
  font-size: 1.1rem;
}
.post-date {
  font-size: 0.95rem;
  color: #888;
  margin-bottom: 0.7rem;
}
.hashtags {
  margin-top: 0.5rem;
}
.hashtags span {
  display: inline-block;
  background: #ffe3ed;
  color: var(--accent);
  border-radius: 8px;
  padding: 0.2rem 0.7rem;
  font-size: 0.9rem;
  margin-right: 0.5rem;
  margin-bottom: 0.3rem;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  margin: 2rem 0 0 0;
}
.pagination a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: #ffe3ed;
  color: var(--accent);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: background 0.2s;
}
.pagination a:hover {
  background: var(--accent);
  color: #fff;
}
.pagination .current {
  background: var(--accent);
  color: #fff;
  pointer-events: none;
  font-weight: bold;
}

@media (max-width: 900px) {
  .latest-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .post-thumb {
    height: 140px;
  }
}

  /* Responsive Design */
  @media (max-width: 900px) {
    .navbar {
      flex-direction: column;
      align-items: flex-start;
      padding: 1rem;
    }
    .nav-links {
      flex-direction: column;
      gap: 1rem;
      width: 100%;
      margin-top: 1rem;
    .logo {
      margin-bottom: 1rem;
    }
    .card-grid, .categories-list {
      grid-template-columns: 1fr;
  /* Hamburger menu styles */
  .hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 32px;
    height: 32px;
    justify-content: center;
    align-items: center;
  }
  .hamburger span {
    height: 4px;
    width: 100%;
    background: var(--accent);
    margin: 4px 0;
    border-radius: 2px;
    transition: 0.3s;
  }

  @media (max-width: 900px) {
    .hamburger {
      display: flex;
    }
    .nav-links {
      display: none;
      flex-direction: column;
      gap: 1rem;
      width: 100%;
      margin-top: 1rem;
      background: var(--nav-bg);
      position: absolute;
      top: 60px;
      left: 0;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
      z-index: 100;
      padding: 1rem 2rem;
    }
    .nav-links.active {
      display: flex;
    }
    .navbar {
      position: relative;
    }
  }
      gap: 1.2rem;
    }
    .form-container {
      max-width: 95vw;
      padding: 1rem;
    }
  }

  @media (max-width: 600px) {
    .navbar {
      padding: 0.5rem;
    }
    .logo {
      font-size: 1.2rem;
    }
    .hero {
      padding: 2rem 0.5rem 1rem 0.5rem;
    }
    .featured {
      padding: 1rem;
    }
    .card {
      padding: 1rem;
    }
    .form-container {
      padding: 0.5rem;
    }
    .footer-links {
      flex-direction: column;
      gap: 0.7rem;
    }
  }
