/* 🌐 Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', Arial, sans-serif;
  background-color: #f7f9fb;
  color: #222;
  line-height: 1.6;
}

/* 🌈 Header */
header {
  background: #0056b3;
  color: #fff;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 a {
  color: #fff;
  text-decoration: none;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
}

header nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 12px;
  font-weight: 500;
  transition: 0.3s;
}

header nav a:hover {
  color: #ffd700;
}

/* 🏠 Main Section */
main {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

/* ✍️ Form Styles */
.form-container {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
  margin-top: 20px;
}

.form-container h2 {
  text-align: center;
  color: #0056b3;
  margin-bottom: 20px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 15px;
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button {
  width: 100%;
  padding: 12px;
  background: #0056b3;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #003d80;
}

/* 📰 Post Card */
.post-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
  margin-bottom: 25px;
  transition: transform 0.2s ease-in-out;
}

.post-card:hover {
  transform: translateY(-3px);
}

.post-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 10px;
}

.post-card h3 a {
  color: #0056b3;
  text-decoration: none;
  font-size: 22px;
  transition: 0.3s;
}

.post-card h3 a:hover {
  color: #003d80;
}

.post-card p {
  margin-top: 5px;
  color: #444;
}

/* 💬 Comments Section */
.comments {
  margin-top: 40px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.comments h3 {
  color: #0056b3;
  margin-bottom: 15px;
}

.comment-list {
  margin-top: 20px;
}

.comment-card {
  background: #f2f4f7;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.comment-card b {
  color: #0056b3;
}

/* 🧰 Admin Dashboard */
.admin-section {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 35px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.admin-section h3 {
  color: #0056b3;
  margin-bottom: 15px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

th, td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background: #0056b3;
  color: white;
}

td a.delete {
  color: red;
  font-weight: 600;
  text-decoration: none;
}

td a.delete:hover {
  text-decoration: underline;
}

/* 🌆 Footer */
footer {
  background: #0056b3;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 40px;
  font-size: 14px;
}

/* 📱 Responsive Design */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  header nav {
    margin-top: 10px;
  }

  main {
    width: 95%;
    padding: 0 10px;
  }

  button {
    font-size: 15px;
  }
}
