@import url('https://fonts.googleapis.com/css2?family=Noto+Nastaliq+Urdu:wght@400;700&display=swap');

:root {
  --bg-light: #fafafa;
  --bg-dark: #1e1e1e;
  --text-light: #222;
  --text-dark: #eee;
  --accent: #4a90e2;
  --transition: 0.3s ease;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-light);
  transition: background-color var(--transition), color var(--transition);
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

.blog-title {
  font-family: 'Noto Nastaliq Urdu', serif;
  font-weight: 700;
  font-size: -1rem;
  text-align: center;
  margin: 0rem 0;
}

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background-color: var(--accent);
  color: white;
}

header h1 {
  margin: 0;
  font-size: 1.4rem;
}

.toggle-btn {
  background-color: white;
  color: var(--accent);
  border: none;
  border-radius: 4px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  font-weight: bold;
  transition: var(--transition);
}

body.dark .toggle-btn {
  background-color: #333;
  color: white;
}

.container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: auto;
  padding: 1rem;
}

.sidebar {
  width: 100%;
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: #f4f3f3;
  border-radius: 8px;
  transition: var(--transition);
}

body.dark .sidebar {
  background-color: #2a2a2a;
}

.blog-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: flex-start;
  justify-content: center;
  margin: 40px auto;
  max-width: 1200px;
  padding: 0 20px;
}

.novel-cover-side {
  flex: 1 1 300px;
  max-width: 400px;
  text-align: center;
}

.novel-cover-img {
  width: 50%;
  height: 250px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}

.novel-cover-img:hover {
  transform: scale(1.03);
}

.blog-content-side {
  flex: 2 1 500px;
  max-width: 800px;
  font-family: 'Noto Nastaliq Urdu', serif;
  font-size: 20px;
  line-height: 2.2;
  direction: rtl;
}

.read-more-btn {
  margin-top: 15px;
  padding: 8px 16px;
  font-size: 16px;
  border: none;
  background-color: #222;
  color: #fff;
  cursor: pointer;
  border-radius: 6px;
}

.read-more-btn:hover {
  background-color: #444;
}

.novel-links a {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(5, 4, 4, 0.1);
  font-family: 'Noto Nastaliq Urdu', serif;
  font-weight: 500;
  transition: var(--transition);
}

.novel-links a:hover {
  text-decoration: underline;
}

.content {
  width: 100%;
  padding: 1rem;
}

.read-more-btn {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 6px 12px;
  margin-top: 10px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
  transition: var(--transition);
}

.read-more-btn:hover {
  background-color: #357ac7;
}

@media (min-width: 768px) {
  .sidebar {
    width: 25%;
    margin-bottom: 0;
  }

  .content {
    width: 75%;
  }
}

.blog {
  background-color: var(--bg-light);
  transition: background-color var(--transition);
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

body.dark .blog {
  background-color: #1f1f1f;
  border-color: #444;
}

.blog h2 {
  font-family: 'Noto Nastaliq Urdu', serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 2.5;
  word-spacing: 5px;
  margin-bottom: 1rem;
  direction: rtl;
  font-weight: bold;
}

.blog p {
  font-family: 'Noto Nastaliq Urdu', serif;
  font-weight: 400;
  word-spacing: 5px;
  font-size: 15px;
  line-height: 2.5;
  direction: rtl;
}

.likes {
  margin-top: 0.5rem;
}

.like-button {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
}

.comments {
  margin-top: 1rem;
}

textarea,
input {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-family: 'Segoe UI', sans-serif;
  transition: var(--transition);
}

button.comment-btn,
button.reply-btn {
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.reply {
  margin-left: 20px;
  border-left: 2px solid #ccc;
  padding-left: 10px;
  margin-top: 0.5rem;
  font-family: 'Segoe UI', sans-serif;
}

footer {
  position: relative;
  text-align: center;
  padding: 1.5rem;
  background-color: var(--accent);
  color: white;
  margin-top: 33px;
  font-size: 0.9rem;
}

.author-tag {
  color: white;
  background-color: #007bff;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: bold;
}

.comments {
  margin-top: 20px;
}

.comments .comment {
  margin-bottom: 10px;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.comment-btn {
  margin-top: 5px;
}

#commentList div {
  margin-bottom: 1rem;
  padding: 0.5rem;
  border-bottom: 1px solid #ccc;
}

.reply {
  margin-left: 1.5rem;
  padding: 0.3rem 0.5rem;
  border-left: 3px solid #ddd;
  background-color: #f9f9f9;
  margin-top: 0.5rem;
  border-radius: 4px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  margin-left: 8px;
  font-size: 0.85rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

button[onclick^="replyTo"] {
  background-color: #4caf50;
  color: white;
}

button[onclick^="replyTo"]:hover {
  background-color: #45a049;
}

button[onclick^="deleteComment"],
button[onclick^="deleteReply"] {
  background-color: #f44336;
  color: white;
}

button[onclick^="deleteComment"]:hover,
button[onclick^="deleteReply"]:hover {
  background-color: #d32f2f;
}

.reply-area button {
  background-color: #2196f3;
  color: white;
  margin-left: 0;
  margin-top: 5px;
}

.reply-area button:hover {
  background-color: #1976d2;
}

.reply-area textarea {
  width: 100%;
  min-height: 50px;
  resize: vertical;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  margin-top: 5px;
}
