* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #121218;
  --bg-card: #1a1a24;
  --bg-navbar: rgba(18, 18, 24, 0.85);
  --blue-primary: #2563eb;
  --blue-hover: #3b82f6;
  --blue-glow: rgba(37, 99, 235, 0.35);
  --text-primary: #f0f0f5;
  --text-secondary: #9a9ab0;
  --border-color: rgba(255, 255, 255, 0.06);
  --error-color: #ef4444;
  --error-glow: rgba(239, 68, 68, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Page Entrance ── */
.page-fade {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.page-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  background: var(--bg-navbar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.navbar-logo:hover {
  opacity: 0.85;
}

.navbar-logo img {
  height: 36px;
  width: auto;
}

.navbar-logo span {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Nav user dropdown (when logged in) */
.nav-user-dropdown {
  position: relative;
}

.nav-user-toggle {
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
}

.nav-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.nav-user-chevron {
  font-size: 10px;
  opacity: 0.8;
}

.nav-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  padding: 6px 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 50;
}

.nav-user-menu[hidden] {
  display: none;
}

.nav-user-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.nav-user-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-user-item:first-child {
  border-radius: 6px 6px 0 0;
}

.nav-user-item:last-child {
  border-radius: 0 0 6px 6px;
}

/* ── Hero ── */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  padding: 120px 24px 80px;
}

/* Radial glow behind the hero */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: 10%;
  left: 50%;
  translate: -50% 0;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  background: radial-gradient(circle, var(--blue-glow) 0%, transparent 70%);
  animation: glow-drift 8s ease-in-out infinite;
}

.hero::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, transparent 70%);
  animation: glow-drift-alt 10s ease-in-out infinite;
}

@keyframes glow-drift {
  0% {
    translate: -50% 0;
    scale: 1;
    opacity: 1;
  }
  25% {
    translate: -40% -5%;
    scale: 1.08;
    opacity: 0.85;
  }
  50% {
    translate: -55% 5%;
    scale: 0.95;
    opacity: 1;
  }
  75% {
    translate: -45% -3%;
    scale: 1.05;
    opacity: 0.9;
  }
  100% {
    translate: -50% 0;
    scale: 1;
    opacity: 1;
  }
}

@keyframes glow-drift-alt {
  0% {
    translate: -50% 0;
    scale: 1;
    opacity: 0.7;
  }
  33% {
    translate: -60% 8%;
    scale: 1.12;
    opacity: 1;
  }
  66% {
    translate: -42% -6%;
    scale: 0.9;
    opacity: 0.75;
  }
  100% {
    translate: -50% 0;
    scale: 1;
    opacity: 0.7;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  margin-bottom: 28px;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue-hover);
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-primary);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero h1 .highlight {
  color: var(--blue-primary);
}

.hero p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 44px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--blue-primary);
  border: none;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 0 24px var(--blue-glow);
}

.btn-cta:hover {
  background: var(--blue-hover);
  box-shadow: 0 0 40px var(--blue-glow);
  transform: translateY(-1px);
}

.btn-cta:active {
  transform: translateY(0);
}

.btn-cta .arrow {
  transition: transform 0.2s;
}

.btn-cta:hover .arrow {
  transform: translateX(3px);
}

/* ── Features ── */
.features {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

.feature-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  transition: border-color 0.3s, transform 0.25s;
}

.feature-card:hover {
  border-color: rgba(37, 99, 235, 0.25);
  transform: translateY(-3px);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue-primary);
  font-size: 20px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ── Footer ── */
.footer {
  padding: 32px 40px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
}

/* ── Auth (Login / Register) ── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 120px 24px 80px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  text-align: center;
  font-family: inherit;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 28px;
  color: var(--text-primary);
  font-family: inherit;
}

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

.form-group {
  position: relative;
  text-align: left;
}

/* Floating label: label sits inside input area */
.form-group label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: inherit;
  pointer-events: none;
  transition: top 0.2s ease, transform 0.2s ease, font-size 0.2s ease, color 0.2s ease;
  z-index: 1;
}

/* When focused or has value: label moves to top-left, smaller, on the border with padding */
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label {
  top: 0;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-primary);
  background: var(--bg-card);
  padding: 0 6px;
  left: 10px;
}

.form-group input {
  width: 100%;
  padding: 14px 14px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input::placeholder {
  color: transparent;
  opacity: 0;
}

.form-group input:focus {
  border-color: var(--blue-primary);
}

/* Error state: red outline when required empty or validation fails */
.form-group.error input {
  border-color: var(--error-color);
}

.form-group.error input:focus {
  border-color: var(--error-color);
}

.btn-submit {
  margin-top: 8px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--blue-primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 24px var(--blue-glow);
}

.btn-submit:hover {
  background: var(--blue-hover);
  box-shadow: 0 0 40px var(--blue-glow);
}

.auth-error {
  font-size: 14px;
  color: var(--error-color);
  margin-bottom: 16px;
  font-family: inherit;
}

.auth-footer {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  font-family: inherit;
}

.auth-footer a {
  color: var(--blue-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  color: var(--blue-hover);
  text-decoration: underline;
}

/* ── 404 Page ── */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 120px 24px 80px;
  text-align: center;
}

.error-content {
  max-width: 420px;
}

.error-code {
  display: block;
  font-size: 80px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-secondary);
  opacity: 0.5;
  margin-bottom: 16px;
}

.error-content h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.error-content p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}

.error-content .btn-cta {
  display: inline-flex;
}

/* ── App layout (/app) ── */
.apps-page {
  overflow: hidden;
}

.apps-layout {
  display: flex;
  height: 100vh;
  background: var(--bg-dark);
}

.apps-sidebar {
  display: flex;
  flex-direction: column;
  width: 240px;
  min-width: 240px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  overflow: hidden;
}

.apps-sidebar-top {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.apps-sidebar-left .apps-section {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Profile nick at bottom of left sidebar */
.apps-profile-nick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  min-height: 72px;
  box-sizing: border-box;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
}

.apps-profile-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.apps-profile-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.apps-profile-display {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apps-profile-username {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apps-profile-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.apps-profile-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.apps-profile-logout {
  color: #ef4444;
}

.apps-profile-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Profile edit modal */
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.profile-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.profile-modal-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 36px 40px;
  max-width: 640px;
  width: calc(100% - 48px);
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.8);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.profile-modal-overlay.is-open .profile-modal-bubble {
  transform: scale(1);
  opacity: 1;
}

.profile-modal-identity {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.profile-modal-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-modal-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--blue-primary);
  color: #fff;
  font-size: 32px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--bg-card), 0 0 20px rgba(37, 99, 235, 0.4);
}

.profile-modal-status-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--bg-card);
}

.profile-modal-identity-info {
  min-width: 0;
  overflow: hidden;
}

.profile-modal-display-name {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-modal-details-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-modal-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-modal-view {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-modal-field-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.profile-modal-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.profile-modal-value {
  font-size: 15px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-modal-edit-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.profile-modal-edit-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.profile-modal-edit {
  width: 100%;
  flex-direction: column;
  align-items: stretch;
}

.profile-modal-edit .profile-modal-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.profile-modal-save-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--blue-primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  align-self: flex-end;
}

.profile-modal-save-btn:hover {
  background: var(--blue-hover);
}

.profile-modal-password-edit .profile-modal-input {
  margin-bottom: 4px;
}

.profile-modal-password-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.profile-modal-password-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.profile-modal-field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 8px;
  margin-bottom: 4px;
  display: block;
}

.profile-modal-field-label:first-of-type {
  margin-top: 0;
}

.profile-modal-required {
  color: var(--error-color);
}

.profile-modal-password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.profile-modal-cancel-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.profile-modal-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.profile-modal-done-btn {
  padding: 8px 20px;
}

/* Edit box (zoom-in when Edit clicked) */
.profile-editbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 210;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.profile-editbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.profile-editbox-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px 28px;
  max-width: 420px;
  width: calc(100% - 48px);
  position: relative;
  transform: scale(0.75);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.profile-editbox-panel[hidden] {
  display: none !important;
}

.profile-editbox-overlay.is-open .profile-editbox-bubble {
  transform: scale(1);
  opacity: 1;
}

.profile-editbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.profile-editbox-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.profile-editbox-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-editbox-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
  padding-right: 36px;
}

.profile-editbox-hint {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.profile-editbox-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 6px;
  display: block;
}

.profile-editbox-label:first-of-type {
  margin-top: 0;
}

.profile-editbox-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text-primary);
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}

.profile-editbox-input:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 2px var(--blue-glow);
}

.profile-editbox-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 24px;
}

.profile-editbox-cancel {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.profile-editbox-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.profile-editbox-done {
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--blue-primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.profile-editbox-done:hover {
  background: var(--blue-hover);
}

.profile-modal-input {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  outline: none;
  font-family: inherit;
}

.profile-modal-input:focus {
  border-color: var(--blue-primary);
}

.profile-modal-edit .profile-modal-input {
  margin-right: 0;
}

.apps-sidebar-right {
  border-right: none;
  border-left: 1px solid var(--border-color);
}

.apps-search-wrap {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.apps-search {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-dark);
  border: none;
  border-radius: 6px;
  outline: none;
  font-family: inherit;
}

.apps-search::placeholder {
  color: var(--text-secondary);
}

.apps-section {
  padding: 12px 0;
  overflow-y: auto;
}

.apps-section-title {
  padding: 0 12px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.apps-channel-list,
.apps-user-list {
  list-style: none;
}

.apps-channel-item,
.apps-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.apps-channel-item:hover,
.apps-user-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.apps-channel-item-active {
  background: rgba(255, 255, 255, 0.06);
}

.apps-channel-name,
.apps-user-name {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.apps-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-dark);
}

.apps-main-header {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
}

.apps-main-header-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.apps-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.apps-messages-placeholder {
  font-size: 14px;
  color: var(--text-secondary);
}

.apps-input-wrap {
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

.apps-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  outline: none;
  font-family: inherit;
}

.apps-input::placeholder {
  color: var(--text-secondary);
}

.apps-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Avatar: first letter + status dot */
.apps-avatar {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.apps-avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.apps-status-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

.apps-status-online {
  background: #22c55e;
}

.apps-status-away {
  background: #eab308;
}

.apps-status-offline {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .navbar {
    padding: 0 20px;
  }

  .hero h1 {
    font-size: 40px;
    letter-spacing: -1px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero::before {
    width: 400px;
    height: 400px;
  }

  .features {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 32px;
  }

  .navbar-logo span {
    font-size: 18px;
  }
}
