/* Centered date header for chat */
.date-header {
  text-align: center;
  margin: 16px 0 8px 0;
  font-weight: bold;
  color: #555;
  background: #f0f0f0;
  border-radius: 12px;
  display: inline-block;
  padding: 4px 16px;
}
/* Reset */
* {
  box-sizing: border-box;
  font-family: system-ui, Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* Body defaults */
body {
  background-color: #fff;
  height: 100vh;
}

button {
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

/* Links */
.links a {
  color: #007bff;
  font-size: 0.9rem;
  text-decoration: none;
}
.links a:hover {
  text-decoration: underline;
}

/* Login / Create Account / Forgot Password */
.login-container,
.add-friend-container {
  background-color: #fff;
  padding: 2rem 1.5rem;
  border-radius: 15px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.08);
  margin: auto;
}

.app-title {
  color: #e63946;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.profile-pic {
  width: 100px;
  height: 100px;
  background-color: white;
  border-radius: 50%;
  margin: 0 auto 1.2rem;
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.login-form,
.add-friend-form,
.settings-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

label {
  text-align: left;
  font-size: 0.9rem;
  color: #555;
}

input {
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  font-size: 1rem;
}

input::placeholder {
  color: #aaa;
}

/* App layout */
.app-container {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 200px;
  min-height: 100vh;
  background-color: #f7f7f7;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
}

.sidebar .app-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.sidebar .profile-pic {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
}

.sidebar-btn {
  width: 90%;
  padding: 0.8rem;
  margin: 0.3rem 0;
  border-radius: 8px;
}

/* Main content */
.main-content {
  flex: 1;
  padding: 1rem;
  /* padding: 200px; */
  min-height: 100vh;
}

.list-placeholder {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-placeholder li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

/* Friends page */
.friends-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.add-friend-btn {
  border-radius: 15px; 
  padding: 0.6rem 1rem;
}

.search-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.search-container input {
  flex: 1;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #ccc;
}
.search-container .add-btn {
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 1.2rem;
  line-height: 1;
}

/* Settings page */
body.settings-page .main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

.settings-section {
  width: 100%;
  max-width: 400px;
  margin-bottom: 1.5rem;
}

.settings-section input {
  width: 100%;
}

.save-btn {
  width: 100%;
  max-width: 400px;
  padding: 0.8rem;
}

/* ====================== Service Worker ====================== */

.popup {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background-color: #e63946;
  color: white;
  padding: 10px;
  text-align: center;
  text-transform: uppercase;

  box-shadow: 3px 3px 10px 0px black;
}

.popup div {
  margin-bottom: 5px;
}

.popup button {
  margin: 3px 5px;
  background-color: #0056b3;
  text-transform: uppercase;
  border: 0;
  padding: 3px 5px;
  cursor: pointer;
}

/* ====================== Register ====================== */

#previewImage {
  width: 300px; 
  height: 300px;
  border: solid black 2px;
  border-radius: 50%;
}

.small-icon {
  width: 50px;
  height: 50px;
  background-color: white;
  border-radius: 50%;
}

.recent-list {
  gap: 10px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  cursor: pointer;
}

.recent-list:hover {
  background-color: #cccccc;
}
