@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  --bg-main: radial-gradient(circle at top, #0f2027, #203a43, #2c5364);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);
  --neon-blue: #4facfe;
  --neon-purple: #a855f7;
  --neon-pink: #ec4899;
  --neon-green: #22c55e;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-main);
  padding: 10px;
  color: var(--text-main);
}

/* ================= Wrapper ================= */
.wrapper {
  width: 100%;
  max-width: 450px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

/* ================= Forms ================= */
.form {
  padding: 30px;
}

.form header {
  font-size: 26px;
  font-weight: 600;
  text-align: center;
  padding-bottom: 15px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.form form {
  margin-top: 20px;
}

.form .field {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
  position: relative;
}

.form label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.form input {
  height: 42px;
  padding: 0 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-main);
  outline: none;
}

.form input::placeholder {
  color: #6b7280;
}

.form input:focus {
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 1px var(--neon-blue);
}

.form .button input {
  margin-top: 15px;
  height: 46px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form .button input:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(79, 172, 254, 0.4);
}

.form .link {
  text-align: center;
  margin-top: 15px;
}

.form .link a {
  color: var(--neon-blue);
  text-decoration: none;
}

.form .link a:hover {
  text-decoration: underline;
}

/* ================= Users ================= */
.users {
  padding: 25px;
}

.users header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
}

.users header img {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  border: 2px solid var(--neon-blue);
}

.users header .logout {
  padding: 8px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 15px;
}

.users .search {
  margin: 20px 0;
  position: relative;
}

.users .search input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
}

/* ================= User List ================= */
.users-list {
  max-height: 350px;
  overflow-y: auto;
}

.users-list a {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, transform 0.2s ease;
}

.users-list a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.users-list img {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  border: 2px solid var(--neon-purple);
}

.users-list .details {
  margin-left: 12px;
}

.users-list .details span {
  font-size: 16px;
  font-weight: 500;
}

.users-list .details p {
  font-size: 13px;
  color: var(--text-muted);
}

.users-list .status-dot {
  margin-left: auto;
  font-size: 12px;
  color: var(--neon-green);
}

.users-list .status-dot.offline {
  color: #6b7280;
}

/* ================= Chat Area ================= */
.chat-area header {
  display: flex;
  align-items: center;
  padding: 18px;
  background: linear-gradient(135deg, #111827, #1f2933);
}

.chat-area header img {
  height: 45px;
  width: 45px;
  margin: 0 12px;
  border-radius: 50%;
  border: 2px solid var(--neon-blue);
}

.chat-box {
  height: 500px;
  padding: 20px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.3);
}

.chat {
  margin: 15px 0;
  display: flex;
}

.chat p {
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.4;
  max-width: 75%;
}

/* Outgoing */
.outgoing {
  justify-content: flex-end;
}

.outgoing p {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Incoming */
.incoming {
  align-items: flex-end;
}

.incoming img {
  height: 34px;
  width: 34px;
  border-radius: 50%;
  margin-right: 8px;
}

.incoming p {
  background: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
  border-bottom-left-radius: 4px;
}

/* ================= Typing Area ================= */
.typing-area {
  display: flex;
  padding: 15px;
  background: rgba(0, 0, 0, 0.5);
}

.typing-area input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px 0 0 12px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
}

.typing-area button {
  width: 56px;
  border: none;
  background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
  border-radius: 0 12px 12px 0;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}
