:root {
  --navy: #0b0f19; /* deeper navy for contrast */
  --accent: #0b67ff;
  --accent-light: #4c8dff;
  --surface: #0f1724;
  --muted: #93a0b3;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.03);
  --shadow: 0 6px 25px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --transition: all 0.25s ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, Arial, sans-serif;
  background: linear-gradient(180deg, var(--navy), #09142b);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 20px;
  overflow-x: hidden;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
  background-color: #0b0f19;
}

/* Container */
.inbox-wrap {
  font-family: "Poppins", sans-serif;
  max-width: 1600px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 90vh;
  gap: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  margin-top: 60px;
}

/* Sidebar */
.sidebar {
  padding: 22px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.01)
  );
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.logo1 {
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 1.2rem;
  text-transform: uppercase;
  color: var(--accent-light);
  text-shadow: 0 0 8px rgba(11, 103, 255, 0.3);
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-btn {
  background: transparent;
  border: 0;
  color: var(--white);
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 8px rgba(11, 103, 255, 0.4);
}

/* Platform section */
.platforms {
  margin-top: 20px;
}

.platform-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition);
}

.platform-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.platform-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Main section */
.main {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.4s ease-in-out;
}

/* Top bar */
.topbar {
  display: flex;
  gap: 14px;
  align-items: center;
}

.search {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--glass);
  padding: 10px 12px;
  border-radius: 10px;
  gap: 8px;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.search:hover {
  border-color: var(--accent-light);
  box-shadow: 0 0 8px rgba(11, 103, 255, 0.2);
}

.search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--white);
  padding: 6px;
}

.tabs {
  display: flex;
  gap: 10px;
}

.tab {
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: var(--transition);
}

.tab:hover {
  background: rgba(255, 255, 255, 0.05);
}

.tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(11, 103, 255, 0.5);
}

/* Messages list */
.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 6px;
}

.msg {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.msg:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 16px rgba(11, 103, 255, 0.15);
  transform: translateY(-2px);
}

.msg.unread {
  border-left: 3px solid var(--accent);
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #233042;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 2px solid rgba(11, 103, 255, 0.3);
  transition: var(--transition);
}

.avatar:hover {
  border-color: var(--accent-light);
}

.msg-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.username {
  font-weight: 700;
  letter-spacing: 0.3px;
}

.platform {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  text-transform: capitalize;
}

.time {
  font-size: 12px;
  color: var(--muted);
}

.text {
  margin-top: 8px;
  color: #e6eefc;
  line-height: 1.5;
}

.replies {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: fadeInUp 0.4s ease-in-out;
}

.reply {
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid var(--accent-light);
  transition: var(--transition);
}

.reply:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.06);
}

.reply-area {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.reply-area input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.02);
  color: var(--white);
  outline: none;
  transition: var(--transition);
}

.reply-area input:focus {
  border-color: var(--accent-light);
  background: rgba(255, 255, 255, 0.04);
}

.btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  font-size: 13px;
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn.primary {
  background: var(--accent);
  color: #fff;
}

.btn.primary:hover {
  background: var(--accent-light);
  box-shadow: 0 0 12px rgba(11, 103, 255, 0.3);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scrollbar */
.list::-webkit-scrollbar {
  width: 6px;
}
.list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}
.list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 880px) {
  .inbox-wrap {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding: 14px;
    justify-content: space-between;
  }

  .main {
    padding: 14px;
  }

  .avatar {
    width: 44px;
    height: 44px;
  }
}
