/* Global Styles */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: url('bg.jpg') no-repeat center center fixed;
  background-size: cover;
  color: #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* Top Navigation Bar (desktop: top-left capsule) */
.navbar {
  position: fixed;
  top: 20px;
  left: 20px;              /* ✅ anchor to left side */
  display: flex;
  align-items: center;
  padding: 10px 25px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.3),
              0 6px 18px rgba(0,0,0,0.25);
  z-index: 1000;
}

.navbar .logo {
  font-weight: bold;
  font-size: 1.2em;
  color: #fff;
  margin-right: 20px;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.navbar ul li a {
  padding: 8px 18px;
  border-radius: 30px;
  background: transparent;
  color: #eee;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.navbar ul li a:hover,
.navbar ul li a.active {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.5),
              0 4px 12px rgba(0,0,0,0.25);
  color: #007aff;
}

/* Card Style (for all sections) */
.card {
  margin-top: 140px; /* space below navbar */
  width: 80%;
  max-width: 900px;
  padding: 40px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(40px) saturate(220%);
  -webkit-backdrop-filter: blur(40px) saturate(220%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.3),
              0 8px 25px rgba(0,0,0,0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card + .card {
  margin-top: 60px; /* spacing between cards */
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.5),
              0 12px 35px rgba(0,0,0,0.35);
}

/* Profile Card */
.profile-card {
  text-align: center;
}

.profile-pic {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  margin-bottom: 20px;
}

/* Capsule Buttons & Inputs */
.capsule {
  border-radius: 50px;
  padding: 12px 20px;
  margin: 12px 0;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.3),
              0 4px 12px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
  font-size: 1em;
  color: #eee;
  box-sizing: border-box;   /* ✅ keeps capsules inside card */
  max-width: 100%;          /* ✅ prevents overflow */
}

.capsule:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.5),
              0 6px 18px rgba(0,0,0,0.3);
}

input.capsule, textarea.capsule, button.capsule {
  width: 100%;
  display: block;
  margin-bottom: 15px;   /* ✅ spacing between bars */
}

textarea.capsule {
  min-height: 120px;        /* proper height */
  resize: none;             /* optional: prevent resizing */
  text-align: center;       /* ✅ centers text horizontally */
  vertical-align: middle;   /* helps with alignment */
  display: flex;            /* use flexbox for vertical centering */
  justify-content: center;  /* center horizontally */
  align-items: center;      /* center vertically */
}

button.capsule {
  cursor: pointer;
  font-weight: bold;
  color: #007aff;
  text-align: center;
}

/* Expandable Card */
.expandable-card {
  cursor: pointer;
  overflow: hidden;
  transition: max-height 0.6s ease, padding 0.4s ease;
  max-height: 120px; /* collapsed */
}
.expandable-card.active {
  max-height: 600px; /* expanded */
}
.expandable-card .card-content {
  opacity: 0;
  transition: opacity 0.6s ease;
}
.expandable-card.active .card-content {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    top: 0;
    left: 0;
    right: 0;
    border-radius: 0;       /* ✅ full-width bar on mobile */
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 20px;
  }

  .navbar ul {
    flex-direction: column; /* ✅ stack items vertically */
    gap: 10px;
    margin-top: 10px;
  }

  .card {
    margin-top: 120px;
    width: 95%;             /* ✅ adaptive card width */
  }
}
