/* ===== Global reset ===== */
html, body {
  box-sizing: border-box;
  margin: 0;
  height: 100%;
}

@font-face {
  font-family: 'FF DIN Pro Bold';
  src: url('fonts/FFDINPro-Bold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@media (max-width: 480px) {
  .container {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    margin: 0;
    min-height: 100vh;
  }
}

/* ===== Dark Gray Theme for Body & Container ===== */
body {
  font-family: 'FF DIN Pro Bold', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #2a2a2a;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  background: #383838;
  border-radius: 10px;
  width: 100%;
  max-width: 600px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ===== Fixed Header ===== */
.header {
  background: #333;
  height: 60px;
  padding: 0 1rem;
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.header.conversation-view {
  position: relative;
}

.back-button {
  background: #5a5a5a;
  border: none;
  padding: 0.5rem 1rem;
  color: #fff;
  border-radius: 50px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
  position: absolute;
  left: 2%;
}

.back-button:hover {
  background: #707070;
}

/* ===== Chat Area Wrapper & Scrollable Content ===== */
.chat-area-wrapper {
  position: relative;
  flex: 1;
  overflow: hidden;
}
.chat-area-wrapper:active {
  cursor: grabbing;
}

.chat-content {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  padding: 1rem;
  color: #fff;
  background: url('images/garden.png') no-repeat top center;
  background-size: cover;
  cursor: auto;
}

/* Make all text selectable by default */
.chat-content,
.chat-content * {
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.chat-content:active {
  cursor: grabbing;
}

.chat-content::after {
  content: "";
  display: block;
  min-height: 20vh;
}

/* Hide scrollbars */
::-webkit-scrollbar {
  width: 0;
}
* {
  scrollbar-width: none;
}

/* ===== Conversation List ===== */
.profile-pic {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.chat-option {
  background-color: #333;
  padding: 1rem;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: #fff;
  margin: 4px;
}

.chat-option:hover {
  box-shadow: 0 0 0 10px #444;
}

.divider {
  width: 80%;
  height: 4px;
  margin: 0 auto;
  background-color: #444;
  border-radius: 2px;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
  display: block;
}

.chat-snippet {
  font-size: 1.5rem;
  color: #808080;
}

/* ===== Conversation View ===== */
#chat-title {
  font-size: 1.5rem;
  font-weight: bold;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.chat-card {
  padding: 0.25rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.chat-message {
  display: flex;
  align-items: flex-start;
}

.chat-message img.profile-pic {
  width: 90px;
  height: 90px;
  margin-right: 1rem;
}

.message-content {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 1rem;
  font-weight: normal;
  margin-bottom: 0.5rem;
  color: #C4C4C4;
}

.card-body {
  font-size: 1rem;
  line-height: 1.5;
  background-color: rgba(58, 58, 58, 1);
  padding: 1rem;
  border-radius: 0 12px 12px 12px;
  letter-spacing: 0.05rem;
  margin-bottom: 8px;

  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  cursor: text;
  pointer-events: auto; 
}

/* ===== Chat Input/Footer ===== */
.chat-footer {
  padding: 1rem;
  border-top: 1px solid #444;
  background: rgba(51, 51, 51, 0.9);
  display: flex;
}

.chat-footer input {
  flex: 1;
  padding: 0.75rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px;
  margin-right: 0.5rem;
}

.chat-footer button {
  padding: 0.75rem 1rem;
  background: #5a5a5a;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-footer button:hover {
  background: #707070;
}

/* Hide conversation-view on load */
#conversation-view {
  display: none;
}
