:root {
  --bg: #0b0b0f;
  --panel: #14141b;
  --red: #d11a2a;
  --white: #f5f5f5;
  --muted: #9a9aa7;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 60px;
  position: sticky;
  top: 0;
  background: rgba(11,11,15,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 10;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--white);
}

nav a {
  margin: 0 15px;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--white);
}

.nav-cta {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
}

.hero {
  display: flex;
  justify-content: space-between;
  padding: 80px 60px;
  gap: 40px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3rem;
}

.hero-content span {
  color: var(--red);
}

.hero-actions {
  margin-top: 20px;
}

.primary, .secondary {
  padding: 12px 24px;
  border-radius: 8px;
  margin-right: 10px;
  cursor: pointer;
  border: none;
}

.primary {
  background: var(--red);
  color: var(--white);
}

.secondary {
  background: transparent;
  border: 1px solid var(--white);
  color: var(--white);
}

.hero-card {
  background: var(--panel);
  border-radius: 16px;
  width: 420px;
  padding: 20px;
}

.card-header {
  display: flex;
  gap: 6px;
}

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

.dot.red { background: var(--red); }
.dot.white { background: var(--white); }
.dot.dark { background: #333; }

.card-body {
  display: flex;
  margin-top: 20px;
  gap: 15px;
}

.server-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.server {
  width: 50px;
  height: 50px;
  background: #1f1f27;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: bold;
}

.server.active {
  border: 2px solid var(--red);
}

.chat-preview {
  flex: 1;
  background: #101015;
  border-radius: 12px;
  padding: 10px;
  font-size: 0.85rem;
}

.message {
  background: #1a1a22;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.features, .screens, .testimonials, .cta {
  padding: 80px 60px;
  text-align: center;
}

.feature-grid, .testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 20px;
  margin-top: 40px;
}

.feature-card, .testimonial {
  background: var(--panel);
  padding: 20px;
  border-radius: 12px;
}

.screen-strip {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.screen-card {
  width: 200px;
  height: 140px;
  background: #1f1f27;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

footer {
  padding: 30px 60px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

:root {
  --bg: #0b0b0f;
  --panel: #14141b;
  --panel-2: #1a1a24;
  --red: #d11a2a;
  --white: #f5f5f5;
  --muted: #9a9aa7;
}

/* ---------- Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
}

/* ---------- Landing Styles (existing) ---------- */
/* (Keep your landing CSS here — unchanged) */

/* ---------- Dashboard Styles ---------- */
.dashboard-body {
  background: #0b0b10;
  height: 100vh;
  overflow: hidden;
}

.dashboard {
  display: grid;
  grid-template-columns: 70px 260px 1fr 320px;
  height: 100vh;
}

/* Server Rail */
.server-rail {
  background: #0d0d13;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  gap: 12px;
}

.server-logo {
  background: var(--red);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.server-divider {
  width: 40px;
  height: 2px;
  background: #222;
  margin: 6px 0;
}

.server-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  border: none;
  background: #1c1c27;
  color: var(--white);
  cursor: pointer;
}

.server-icon.active {
  outline: 2px solid var(--red);
}

/* Sidebar */
.sidebar {
  background: var(--panel);
  display: flex;
  flex-direction: column;
  padding: 15px;
  gap: 20px;
}

.sidebar-search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: #0f0f16;
  border: 1px solid #2a2a3a;
  color: var(--white);
}

.sidebar-section h4 {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.sidebar-item {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--white);
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.sidebar-item.active {
  background: var(--panel-2);
}

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

.dm-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: #12121a;
}

.sidebar-footer {
  margin-top: auto;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #12121a;
  border-radius: 10px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--red);
  display: grid;
  place-items: center;
}

/* Main Content */
.content {
  padding: 20px;
  background: #0f0f15;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.tab {
  padding: 8px 16px;
  background: #1b1b27;
  border: none;
  color: var(--white);
  border-radius: 8px;
  cursor: pointer;
}

.tab.active {
  background: var(--panel-2);
}

.tab.accent {
  background: var(--red);
}

.content-search {
  margin: 15px 0;
}

.content-search input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2a2a3a;
  background: #0f0f16;
  color: var(--white);
}

.content-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.friend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #15151f;
  padding: 12px;
  border-radius: 10px;
}

.friend-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.friend-actions button {
  background: #232334;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--white);
  cursor: pointer;
}

/* Activity */
.activity {
  background: var(--panel);
  padding: 20px;
  border-left: 1px solid #202030;
}

.activity-card {
  background: #1a1a24;
  padding: 12px;
  border-radius: 10px;
  margin-top: 12px;
  font-size: 0.9rem;
}

.status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status.online { background: #2bd66d; }
.status.idle { background: #e0a300; }
.status.dnd { background: #e03c3c; }

/* ---------- Auth Pages ---------- */
.auth-body {
  background: radial-gradient(circle at top, #151523, #0b0b10 60%);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.auth-wrap {
  width: 100%;
  max-width: 460px;
}

.auth-card {
  background: rgba(20, 20, 30, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.auth-brand {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 8px;
}

.auth-sub {
  color: var(--muted);
  margin-bottom: 20px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form label {
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-form input {
  background: #0f0f16;
  border: 1px solid #2a2a3a;
  color: var(--white);
  padding: 12px;
  border-radius: 8px;
}

.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.check {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
}

.auth-link {
  color: var(--red);
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.full {
  width: 100%;
  margin-top: 10px;
}

.auth-foot {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Logo / Brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--white);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.rail-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  margin-top: 6px;
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  background: #14141b;
  border: 1px solid rgba(255,255,255,0.08);
  width: 100%;
  max-width: 520px;
  padding: 24px;
  border-radius: 16px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal h2 {
  margin-bottom: 6px;
}

.modal .muted {
  color: var(--muted);
  margin-bottom: 16px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
}

.modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.hidden {
  display: none;
}

.form-label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.modal input[type="text"],
.modal input[type="file"] {
  width: 100%;
  background: #0f0f16;
  border: 1px solid #2a2a3a;
  color: var(--white);
  padding: 10px 12px;
  border-radius: 8px;
}

.icon-preview {
  width: 72px;
  height: 72px;
  margin-top: 12px;
  border-radius: 18px;
  background: #1c1c27;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--white);
}

/* ---------- Server View ---------- */
.server-view {
  display: grid;
  grid-template-columns: 260px 1fr 280px;
  gap: 0;
  height: 100%;
}

.server-sidebar {
  background: var(--panel);
  padding: 16px;
  border-right: 1px solid #202030;
}

.server-title {
  font-weight: 700;
  margin-bottom: 16px;
}

.channel-group {
  margin-top: 16px;
}

.channel-group h4 {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.channel-item {
  padding: 8px 10px;
  border-radius: 8px;
  background: #12121a;
  margin-bottom: 6px;
}

.server-main {
  padding: 20px;
  background: #0f0f15;
  display: grid;
  place-items: center;
  text-align: center;
}

.server-main h1 {
  font-size: 2rem;
}

.server-main p {
  color: var(--muted);
  margin-top: 8px;
}

.member-list {
  background: var(--panel);
  padding: 16px;
  border-left: 1px solid #202030;
}

.member-list h4 {
  color: var(--muted);
  margin-bottom: 8px;
}

.member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: #12121a;
  margin-bottom: 6px;
}

.crown {
  color: #f5c542;
  font-size: 0.9rem;
}

/* ---------- Rail Home Button ---------- */
.rail-home {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.rail-home:focus {
  outline: 2px solid var(--red);
  outline-offset: 4px;
  border-radius: 12px;
}

.auth-error {
  color: #ff5b5b;
  font-size: 0.9rem;
  margin-top: 8px;
}