/* ===== General Body ===== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: #f0f2f5;
  color: #333;
}

/* ===== Header ===== */
header {
  background: linear-gradient(90deg, #6a5acd, #836fff);
  color: #fff;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

nav a {
  color: #fff;
  margin-left: 20px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
}

nav a:hover {
  color: #ffeb3b;
  transform: scale(1.05);
}

/* ===== Main Content ===== */
main {
  padding: 30px 20px;
  max-width: 900px;
  margin: auto;
}

/* ===== Posts Cards ===== */
#posts .post {
  background: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

#posts .post:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* ===== Post Header with Avatar ===== */
.post-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.avatar {
  width: 45px;
  height: 45px;
  background: #6a5acd;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 12px;
}

.title-author {
  display: flex;
  flex-direction: column;
}

.title-input {
  font-size: 22px;
  font-weight: 600;
  color: #6a5acd;
  cursor: pointer;
  transition: color 0.3s;
}

.title-input:hover {
  color: #ff4081;
}

.title-author p {
  font-size: 14px;
  color: #555;
  margin: 2px 0 0 0;
}

/* Post snippet */
#posts .post p {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  margin: 10px 0;
}

/* Post footer */
.post-footer {
  margin-top: 10px;
  color: #6a5acd;
  font-weight: 500;
}

.post-footer i {
  vertical-align: middle;
  margin-right: 5px;
}

/* ===== Forms ===== */
form input, form textarea, form button {
  display: block;
  width: 100%;
  margin-bottom: 15px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 15px;
  transition: all 0.3s;
}

form input:focus,
form textarea:focus {
  border-color: #6a5acd;
  box-shadow: 0 0 5px rgba(106, 90, 205, 0.5);
  outline: none;
}

form button {
  background: linear-gradient(90deg, #6a5acd, #836fff);
  color: #fff;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

form button:hover {
  background: linear-gradient(90deg, #ff4081, #ff80ab);
  transform: scale(1.05);
}

/* ===== Comment Section ===== */
.comments-container {
  margin-top: 40px;
  background: #fff;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.comments-container h3 {
  margin-top: 0;
  color: #6a5acd;
  font-size: 20px;
}

.comments-box {
  margin-top: 15px;
}

#comments {
  list-style: none;
  padding: 0;
  margin-bottom: 15px;
}

#comments li {
  background: #f1f3f6;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}

#comments li::before {
  content: "💬";
  position: absolute;
  left: -25px;
  top: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    margin-top: 10px;
    float: none;
  }

  #posts .post {
    padding: 15px;
  }

  form input, form textarea, form button {
    padding: 10px;
  }
}
