/* ===== Global Reset ===== */
* {
  box-sizing: border-box;
}

/* ===== Base styles ===== */
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0b132b, #1c2541, #3a506b); /* deep blue gradient */
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  text-align: center;
}

/* ===== Navigation Bar ===== */
.navbar {
  display: flex;
  justify-content: center;
  gap: 40px;
  background-color: #1c2541;
  padding: 15px 0;
  border-bottom: 2px solid #5bc0be;
  width: 100%;
}

.navbar a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.3s ease, color 0.3s ease;
}

.navbar a:hover {
  background-color: #5bc0be;
  color: #0b132b;
}

/* ===== Shared Container ===== */
.container {
  max-width: 600px;
  margin: 40px auto;
  padding: 30px;
  background: rgba(58, 80, 107, 0.6);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  text-align: center;
  overflow: hidden;
  word-wrap: break-word;
  backdrop-filter: blur(10px);
}

/* ===== Headings ===== */
h1, h2 {
  font-size: 2.5rem;
  margin: 20px 0;
  background: linear-gradient(90deg, #5bc0be, #3a506b);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ===== Paragraph ===== */
p {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #d1d1d1;
}

/* ===== Buttons ===== */
button,
.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 30px;
  background-color: #5bc0be;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  margin-top: 10px;
}

button:hover,
.btn:hover {
  background-color: #3a506b;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* Danger (delete) button */
.btn.danger {
  background-color: #dc3545;
}

.btn.danger:hover {
  background-color: #c82333;
}

/* ===== Form Layout ===== */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

textarea,
input[type="text"],
input[type="password"] {
  padding: 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1rem;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  background: rgba(255,255,255,0.2);
  box-shadow: 0 0 8px #5bc0be;
}

/* ===== Feedback Messages ===== */
p.error {
  color: #ff6b6b;
  font-size: 0.95rem;
  margin-top: 10px;
}

p.success {
  color: #5bc0be;
  font-size: 0.95rem;
  margin-top: 10px;
}

/* ===== Password strength meter ===== */
#strength-bar {
  height: 8px;
  border-radius: 4px;
  margin-top: 5px;
  transition: width 0.3s ease, background 0.3s ease;
}

#strength-text {
  font-size: 0.85rem;
  margin-top: 5px;
  color: #d1d1d1;
}

/* ===== Footer ===== */
footer {
  margin-top: 40px;
  font-size: 0.9rem;
  color: #aaa;
}

/* ===== Dashboard Styles ===== */
a {
  color: #5bc0be;
  text-decoration: none;
  font-weight: 600;
  margin: 10px 0;
  display: inline-block;
  transition: color 0.3s ease;
}

a:hover {
  color: #f4f4f4;
}

#notifications {
  background: rgba(58, 80, 107, 0.6);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  margin: 20px auto;
  max-width: 600px;
  text-align: left;
}

#notifications strong {
  color: #5bc0be;
}

form[action="post.php"],
form[action="posts.php"] {
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  background: rgba(58, 80, 107, 0.6);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  box-sizing: border-box;
}

/* ===== Post Cards ===== */
.posts {
  margin-top: 20px;
}

.card {
  background: rgba(58, 80, 107, 0.6);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  text-align: left;
}

.card p {
  margin: 5px 0;
}

.card small {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color:#ccc;
}



