:root {
  --primary-color: #4a90e2;
  --primary-dark: #357abd;
  --accent-color: #ff5e57;
  --success-color: #2ecc71;
  --body-bg: #f4f6f8;
  --card-bg: #ffffff;
  --text-main: #2c3e50;
  --text-muted: #95a5a6;
  --border-radius: 12px;
  --nav-height: 60px;
  --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--body-bg);
  color: var(--text-main);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

.navbar {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  box-shadow: var(--shadow-soft);
  padding: 10px 0;
  color: white;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
  margin-right: 20px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 15px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.container.mt-4 {
  flex: 1;
  width: 90%;
  max-width: 1200px;
  margin: 20px auto;
}

.card {
  background: var(--card-bg);
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  margin-bottom: 25px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card-header {
  background-color: white;
  border-bottom: 1px solid #eee;
  padding: 15px 20px;
  font-weight: 600;
  color: var(--primary-dark);
}

.card-body {
  padding: 20px;
}

.profile-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: var(--shadow-soft);
}

.small-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 10px;
}

.post-img {
  /* width: 100%; */
  /* height: auto; */
  max-height: 500px;
  border-radius: 8px;
  margin-top: 15px;
}

.message-box {
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  padding: 15px;
  height: 400px;
  overflow-y: auto;
  border: 1px solid #e9ecef;
}

.my-message,
.other-message {
  padding: 10px 15px;
  margin: 5px 0;
  max-width: 75%;
  font-size: 0.95rem;
  line-height: 1.4;
  position: relative;
}

.my-message {
  background-color: var(--primary-color);
  color: white;
  border-radius: 15px 15px 2px 15px;
  align-self: flex-end;
  margin-left: auto;
}

.other-message {
  background-color: white;
  color: var(--text-main);
  border: 1px solid #ddd;
  border-radius: 15px 15px 15px 2px;
  align-self: flex-start;
}

.btn {
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.2s;
  display: inline-block;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}
.btn-success {
  background-color: var(--success-color);
  color: white;
}
.btn-danger {
  background-color: var(--accent-color);
  color: white;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

footer {
  background-color: #343a40;
  color: #adb5bd;
  text-align: center;
  padding: 20px 0;
  margin-top: auto;
}
