.my-sessions-section {
  padding: 80px 24px 100px;
  max-width: 1240px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease;
  color: white;
}

/* ✏️ TITLE */
.section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  color: #facc15;
  margin-bottom: 40px;
  position: relative;
  letter-spacing: 0.5px;
}

.section-title::after {
  content: "";
  display: block;
  width: 100px;
  height: 4px;
  background-color: #facc15;
  margin: 14px auto 0;
  border-radius: 2px;
}

/* 🎛 FILTERS + TOOLBAR */
.session-controls,
.session-toolbar {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* 🧼 FILTER BUTTONS */
.filter-button {
  padding: 10px 22px;
  font-weight: 600;
  border: 2px solid #facc15;
  background: transparent;
  color: #facc15;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-button.active,
.filter-button:hover {
  background-color: #facc15;
  color: #1e1f22;
  transform: scale(1.05);
}

/* 📈 STATS */
.session-stats {
  text-align: center;
  font-weight: 600;
  color: #facc15;
  margin-bottom: 16px;
  font-size: 16px;
}

/* 🔽 SORT SELECT */
.session-toolbar select {
  padding: 10px 16px;
  border: 2px solid #facc15;
  background-color: #1e1f22;
  color: white;
  border-radius: 10px;
  font-weight: 600;
}

/* 📦 CARDS CONTAINER */
.session-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 24px;
  margin-top: 32px;
  padding-bottom: 40px;
}

/* 🧱 SESSION CARD */
.session-card {
  background: linear-gradient(145deg, #1e1f22, #19191b);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(250, 204, 21, 0.12);
  box-shadow: 0 0 0 transparent;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: fadeInCard 0.5s ease both;
}

.session-card:hover {
  box-shadow: 0 10px 25px rgba(250, 204, 21, 0.15);
  transform: translateY(-5px);
}

/* 📋 DETAILS */
.session-details h3 {
  font-size: 20px;
  font-weight: bold;
  color: #facc15;
  margin-bottom: 8px;
}

.session-details p {
  margin: 6px 0;
  font-size: 15px;
  color: #ddd;
}

.code {
  font-family: monospace;
  background-color: #2c2c2c;
  color: #facc15;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 14px;
}

/* 🚪 BUTTON */
.join-session-button {
  align-self: flex-end;
  margin-top: 20px;
  background: #facc15;
  color: #1e1f22;
  padding: 10px 20px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.join-session-button:hover {
  background: #eab308;
  transform: scale(1.05);
}

/* ✨ Animations */
@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInCard {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 📱 MOBILE */
@media screen and (max-width: 768px) {
  .session-controls,
  .session-toolbar,
  .session-stats {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .join-session-button {
    width: 100%;
  }
}


/* 🎛 Full Filter Bar */
.session-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 32px;
}

/* 📌 Toggle-style buttons */
.filter-buttons {
  display: flex;
  gap: 0;
  border: 2px solid #facc15;
  border-radius: 9999px;
  overflow: hidden;
  background-color: #1e1f22;
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.1);
}

.filter-button {
  padding: 10px 24px;
  font-weight: 600;
  font-size: 14px;
  color: #facc15;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-button:hover {
  background-color: rgba(250, 204, 21, 0.1);
}

.filter-button.active {
  background-color: #facc15;
  color: #1e1f22;
}

/* 📊 Stats display */
.session-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  font-weight: bold;
  font-size: 16px;
  color: #facc15;
}

/* 📎 Sorting row */
.session-toolbar {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
}

.session-toolbar label {
  font-weight: 500;
  color: white;
}

.session-toolbar select {
  background-color: #1e1f22;
  color: white;
  border: 2px solid #facc15;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.session-toolbar select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.3);
}

.filter-buttons {
  display: flex;
  gap: 0;
  border: 2px solid #facc15;
  border-radius: 9999px;
  overflow: hidden;
  background-color: #2c2222; /* ⬅️ warmer than black */
  box-shadow: 0 4px 10px rgba(250, 204, 21, 0.08);
}

.filter-button {
  padding: 10px 24px;
  font-weight: 600;
  font-size: 14px;
  color: #facc15;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-button:hover {
  background-color: rgba(250, 204, 21, 0.08);
}

.filter-button.active {
  background-color: #facc15;
  color: #1e1f22;
}

.filter-buttons {
  display: flex;
  gap: 0;
  border: 2px solid #ddb25f;
  border-radius: 9999px;
  overflow: hidden;
  background-color: #2b2220;
  box-shadow: 0 4px 12px rgba(221, 178, 95, 0.05);
}

.filter-button {
  padding: 10px 24px;
  font-weight: 600;
  font-size: 14px;
  color: #ddb25f;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-button:hover {
  background-color: rgba(221, 178, 95, 0.1);
}

.filter-button.active {
  background-color: #ddb25f;
  color: #2b2220;
}

/* 📊 Stats Display */
.session-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  font-weight: 600;
  font-size: 16px;
  color: #f0e2c0;
}

/* 📎 Sorting */
.session-toolbar {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  color: #f0e2c0;
}

.session-toolbar label {
  font-weight: 500;
}

.session-toolbar select {
  background-color: #2b2220;
  color: #f0e2c0;
  border: 2px solid #ddb25f;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.session-toolbar select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(221, 178, 95, 0.3);
}


@media (max-width: 768px) {
  /* Compact header */
  .chat-header {
    padding: 6px 8px;
    gap: 6px;
    font-size: 14px;
  }

  .session-code-bar,
  .user-count-badge {
    font-size: 12px;
    padding: 4px 6px;
  }

  /* Larger messages container */
  .messages-container {
    flex: 1;
    margin: 6px;
    padding: 10px;
    height: calc(100vh - 110px); /* maximize space for messages */
    border-radius: 12px;
    font-size: 15px;
  }

  .messages {
    padding: 8px;
    padding-bottom: 70px;
  }

  /* Bigger input bar */
  .message-input {
    margin: 6px auto;
    padding: 14px 16px;
    width: 94%;
    border-radius: 16px;
    font-size: 16px;
  }

  .message-input input {
    font-size: 16px;
    padding: 12px;
  }

  .send-btn {
    width: 40px;
    height: 40px;
  }
}
