body {
  background: #000;
  color: #e6e6e6;
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
  margin: 0;
  font-size: 17px;
}

/* Top Bar */
.x-topbar {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  background: #000;
  border-bottom: 1px solid #222;
  padding: 0 10px;
}
.x-topbar-left, .x-topbar-center, .x-topbar-right {
  display: flex;
  align-items: center;
}
.x-topbar-center {
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.dbad-logo {
  max-width: 120px;
  height: auto;
  display: block;
  margin-left: 20px;
}
.dbad-hero {
  flex-direction: column;
  gap: 1px;
}
.dbad-avatar {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dbad-avatar-link {
  text-decoration: none;
  z-index: 999;
}
.x-username-link {
  text-decoration: none;
}
.x-topbar-blip {
  display: inline-block;
  color: #fff;
  background: #1da1f2;
  border: none;
  outline: none;
  padding: 8px 22px 8px 22px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  margin-left: 12px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(24,90,200,0.07);
  transition: background 0.13s, box-shadow 0.13s;
}
.x-topbar-blip:hover, .x-topbar-blip:focus {
  background: #177acb;
  text-decoration: none;
}

/* Tabs */
.x-tabs {
  display: flex;
  background: #000;
  border-bottom: 1px solid #222;
}
.x-tab {
  flex: 1;
  background: none;
  border: none;
  color: #8b98a5;
  font-size: 16px;
  padding: 14px 0 11px 0;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
.x-tab.active, .x-tab:focus {
  color: #fff;
  border-bottom: 3px solid #1da1f2;
}

/* FEED WRAPPER */
.feed-fab-wrapper {
  position: relative;
  max-width: 600px;
  margin: 0 auto 62px auto;
  min-height: calc(100vh - 124px);
}

/* FEED */
.x-feed-mobile {
  max-width: 600px;
  margin: 0 auto;
}

/* Blip (Post) */
.x-blip-grid-row {
  display: grid;
  grid-template-columns: 1px 100%;
  align-items: flex-start; /* Ensures vertical alignment at the top */
  margin: 13px 16px;
}
.x-blip-reply-grid-row {
  display: grid;
  grid-template-columns: 1px 100%;
  align-items: flex-start; /* Ensures vertical alignment at the top */
  margin: 13px 16px;
}
.blip-reply-vert-line {
  width: 2px;
  background-color: rgb(52, 53, 60);
  height: 40px;
  margin-left: 18px;
  margin-top: 12px;
}
@media (min-width: 700px) {
  .blip-reply-vert-line { height: 50px; }
}

.x-blip {
  border-bottom: 1px solid #222;
}
.x-blip-reply {
  width: 100%;
}
.x-blip-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
  padding: 0 16px;
  margin-left: 30px;
}
.x-username {
  font-size: 14px;
  color: #aaa;
  text-decoration: none;
}
.x-username a {
  font-size: 14px;
  color: #aaa;
  text-decoration: none;
}
.x-displayname {
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
}
.x-displayname a {
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
}
.x-time {
  font-size: 13px;
  color: #8b98a5;
  margin-left: 10px;
}
.x-blip-content {
  font-size: 15.5px;
  color: #e6e6e6;
  margin-bottom: 5px;
  margin-left: 50px;
  word-break: break-word;
}
.x-blip-img {
  max-width: 100%;
  width: 100%;
  border-radius: 16px;
  margin: 10px 0 8px 0;
  display: block;
}
.x-showmore {
  cursor: pointer;
  transition: color 0.12s;
  color: #1da1f2;
  font-size: 14px;
}
.x-blip-actions-row {
  display: flex;
  gap: 10px;
  color: #8b98a5;
  font-size: 12px;
  padding: 0 12px;
  padding-top: 3px;
  margin-left: 30px;
  margin-bottom: 10px;
}
.x-blip-actions-row a {
  color: #1da1f2;
  text-decoration: none;
  font-size: 14px;
}
.x-blip-actions-row span {
  cursor: pointer;
  transition: color 0.12s;
}
.x-blip-actions-row span:hover {
  color: #1da1f2;
}
.x-blip-actions-row button {
  color: #1da1f2;
  background: #000000;
  text-decoration: none;
  font-size: 15px;
  margin: 2px 2px;
  border: 0px;
}

/* Feed loading and end message */
#feed-loading,
#feed-end {
  color: #8b98a5;
  text-align: center;
  font-size: 16px;
  padding: 16px;
}

/* Bottom Navigation (Mobile) */
.x-bottomnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 58px;
  background: #000;
  border-top: 1px solid #222;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 30;
}
.x-bnav-link {
  flex: 1 1 25%;
  text-align: center;
  color: #8b98a5;
  font-size: 28px;
  text-decoration: none;
  padding: 8px 0 0 0;
  transition: color .13s;
}
.x-bnav-link.active, .x-bnav-link:hover {
  color: #1da1f2;
}

@media (min-width: 700px) {
  .x-topbar, .x-bottomnav, .x-tabs { max-width: 600px; margin: 0 auto; }
  .x-bottomnav { display: none; }
}

/* ----- Modal Styles (Top-aligned, Centered) ----- */
.dbad-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: #000;
  justify-content: flex-start;    /* Align modal to top */
  overflow-y: auto;
  padding-top: 48px;             /* Space from very top */
}

.dbad-modal-content {
  width: auto;
  max-width: 600px;
  margin: 0 auto;
  background: #000;
  color: #fff;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  top: 50px;
}

/* MODAL CLOSE BUTTON: always in top-right of modal */
.dbad-modal-close {
  position: absolute;
  top: 0px;
  right: 0px;
  font-size: 2rem;
  color: #1da1f2;
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  z-index: 10;
  line-height: 1;
}

.dbad-modal-content h2 {
  width: 100%;
  max-width: 250px;
  margin: 0 0 0px 0;
  font-weight: 800;
  font-size: 2rem;
  text-align: left;
}
.dbad-modal-content form {
  width: 100%;
  max-width: 340px;
  align: top;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.dbad-modal-content h4 {
  font-size: 15.5px;
  color: #e6e6e6;
  word-break: break-word;
  margin-top: 35px;
  font-weight: 400;
  text-decoration: none;
  width: 100%;
  max-width: 340px;
}
.dbad-modal-content h5 {
  font-size: 15px;
  color: #e6e6e6;
  word-break: break-word;
  margin: 0 auto;
  font-weight: 400;
  width: 100%;
  height: 20px;
  max-width: 340px;
}

.dbad-modal-content input[type="text"], 
.dbad-modal-content input[type="email"], 
.dbad-modal-content input[type="password"],
.dbad-modal-content textarea {
  margin: 10px 0;
  padding: 14px 12px;
  border-radius: 7px;
  border: none;
  background: #23272f;
  color: #fff;
  font-size: 1.08rem;
  resize: none;
}

.dbad-modal-content input[type="file"] {
  margin-bottom: 14px;
  color: #fff;
}
.dbad-modal-content button {
  padding: 14px;
  background: #1da1f2;
  color: #fff;
  font-size: 1.07rem;
  font-weight: 700;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: background 0.13s;
  margin-top: 5px;
}
.dbad-modal-content button:hover { background: #177acb; }
.dbad-modal-footer {
  margin-top: 26px;
  text-align: center;
  color: #8b98a5;
  font-size: 1.02rem;
}
.dbad-modal-footer a {
  color: #1da1f2;
  text-decoration: none;
  font-weight: 600;
  margin-left: 6px;
}
.dbad-modal-footer a:hover { text-decoration: underline; }
.dbad-modal-error {
  color: #ff5151;
  font-size: 1.02rem;
  margin-bottom: 5px;
  min-height: 10px;
  text-align: center;
}

/* Profile Card Hover Modal */
.profile-card-modal {
  background: none !important;
  position: fixed !important;
  top: 0; left: 0; width: auto; height: auto;
  z-index: 9999 !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  box-shadow: none;
  padding: 0 !important;
  pointer-events: none;
}

.profile-card-content {
  box-shadow: 0 8px 32px rgba(10,30,80,0.21);
  background: #191b20;
  color: #fff;
  border-radius: 16px;
  min-width: 220px;
  max-width: 310px;
  padding: 0;
  position: relative;
  margin: 0;
  pointer-events: auto;
}

/* ----- Profile Page Header Styling ----- */
.profile-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.profile-user-info {
  display: flex;
  align-items: center;
  gap: 18px;
}
.profile-avatar-lg {
  width: 66px;
  height: 66px;
  border-radius: 7px;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-username {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .5px;
  line-height: 1.25;
}
.profile-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}
.profile-follow-btn, .profile-following-btn {
  min-width: 104px;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 22px;
  padding: 9px 20px;
  border: none;
  outline: none;
  cursor: pointer;
  transition: background .14s, color .14s, border .14s;
  margin-left: 6px;
}
.profile-follow-btn {
  background: #1da1f2;
  color: #fff;
}
.profile-follow-btn:hover { background: #177acb; }
.profile-following-btn {
  background: #fff;
  color: #1da1f2;
  border: 2px solid #1da1f2;
}
.profile-following-btn:hover {
  background: #f1faff;
  color: #1182d3;
  border: 2px solid #1182d3;
}
.profile-bio {
  font-size:1.08rem;
  color:#8b98a5;
  margin-top:6px;
  margin-left:4px;
}
.profile-header-section {
  padding: 10px 0 10px 0;
  border-bottom: 1px solid #222;
  margin-bottom: 5px;
}

@media (max-width: 700px) {
  .x-topbar, .x-bottomnav, .x-tabs, .feed-fab-wrapper, .x-feed-mobile {
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .profile-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0 0 8px 0;
  }
  .profile-user-info { gap: 14px; }
  .profile-avatar-lg { width: 54px; height: 54px; }
  .profile-username { font-size: 1.3rem; }
  .profile-buttons {
    width: 100%;
    justify-content: flex-start;
    margin-top: 14px;
  }
  .x-feed-mobile { padding-left: 0; padding-right: 0; }
  .feed-fab-wrapper { padding-left: 0; padding-right: 0; }
}
.profile-social-stats {
  display: flex;
  gap: 18px;
  margin-top: 8px;
  font-size: 1.04rem;
}
.profile-social-stats strong {
  color: #fff;
  font-weight: 700;
  font-size: 1.08rem;
  margin-right: 3px;
}
.profile-social-stats span {
  color: #a9b5c1;
  font-weight: 400;
  cursor: pointer;
  transition: text-decoration .15s;
}
.profile-social-stats span:hover {
  text-decoration: underline;
}
/* Overlay background */
.side-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background-color: rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

/* When visible */
.side-drawer-overlay.open {
  display: block !important;
  opacity: 1;
}

/* Drawer content itself */
.side-drawer {
  background: #191b20 !important;
  color: #fff !important;
  width: 85vw !important;
  max-width: 400px !important;
  left: 0 !important;
  top: 0 !important;
  height: 100vh !important;
  z-index: 100000 !important;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5) !important;
  padding: 20px;
  box-sizing: border-box;
  position: fixed;
  transform: translateX(-100%);
  transition: transform 0.3s ease-out;
}

.side-drawer-overlay.open .side-drawer {
  transform: translateX(0);
}

/* Close X */
.drawer-close {
  font-size: 22px;
  color: #fff;
  cursor: pointer;
  margin-bottom: 12px;
  text-align: right;
}

/* User section */
.drawer-user-info {
  margin-bottom: 18px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-avatar {
  width: 48px;
  height: 48px;
  background-color: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-name {
  margin-top: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.drawer-handle {
  color: #8b98a5;
  font-size: 0.95rem;
}

/* Stats */
.drawer-follow-stats {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
}
.drawer-follow-stats a {
  color: #ccc;
  font-size: 0.95rem;
  text-decoration: none;
}

/* Menu links */
.drawer-menu-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.drawer-menu-links a {
  color: #fff;
  font-size: 1rem;
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-menu-links a:hover {
  color: #1da1f2;
}
.rich-input {
  border: 1px solid #ccc;
  min-height: 100px;
  height: 140px;
  width: 335px;
  background-color: white;
  color: black;
  overflow-y: auto;
  margin-top: 0px;
  margin-bottom: 10px;
}
.rich-input:empty::before {
  content: attr(data-placeholder);
  color: #999;
  pointer-events: none;
  position: absolute;
}
.rich-input:focus {
  outline: 2px solid #1da1f2;
}
.dbad-search-box {
  background-color: #16181c;
  border: 1px solid #333;
  border-radius: 9999px;
  padding: 8px 2px;
  font-size: 14px;
  color: #fff;
  width: 150px;
  outline: none;
  transition: all 0.3s ease;
}

.dbad-search-box::placeholder {
  color: #888;
}

.dbad-search-box:focus {
  border-color: #1da1f2;
  background-color: #1a1d21;
}
.dbad-search-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 10px;
  cursor: pointer;
}

/* Search icon */
.dbad-search-icon {
  transition: transform 0.3s ease;
  margin-right: 3px;
}

/* Search input (collapsed by default) */
.dbad-search-box {
  background-color: #16181c;
  border: 1px solid #333;
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 14px;
  color: #fff;
  width: 0;
  opacity: 0;
  outline: none;
  transition: width 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

/* Expanded state */
.dbad-search-box.expanded {
  width: 150px;
  opacity: 1;
  pointer-events: auto;
}

/* Hide on mobile */
@media (max-width: 768px) {
  .dbad-search-container {
    display: none;
  }
}
    .profile-follow-btn, .profile-following-btn {
      min-width: 104px;
      font-weight: 700;
      font-size: 1rem;
      border-radius: 22px;
      padding: 9px 20px;
      border: none;
      outline: none;
      cursor: pointer;
      transition: background .14s, color .14s, border .14s;
      margin-left: 6px;
    }
    .profile-follow-btn {
      background: #1da1f2;
      color: #fff;
    }
    .profile-follow-btn:hover { background: #177acb; }
    .profile-following-btn {
      background: #fff;
      color: #1da1f2;
      border: 2px solid #1da1f2;
    }
    .profile-following-btn:hover {
      background: #f1faff;
      color: #1182d3;
      border: 2px solid #1182d3;
    }
    @media (max-width: 700px) {
      .profile-header-flex { flex-direction: column; align-items: flex-start; gap: 0; padding: 0 0 8px 0; display: flex; }
      .profile-user-info { gap: 14px; }
      .profile-avatar-lg { width: 54px; height: 54px; }
      .profile-username { font-size: 1.3rem; }
      .profile-buttons { width: 100%; justify-content: flex-start; margin-top: 14px; display: flex; }
    }
    .profile-bio { font-size:1.08rem; color:#8b98a5; margin-top:6px; margin-left:4px; }

    .profile-follow-err { color: #ff5252; font-size: 1.01rem; margin-top: 6px; min-height: 16px;}

    /* Follower/following counts, X style */
    .profile-social-stats {
      display: flex;
      gap: 18px;
      margin-top: 8px;
      font-size: 1.04rem;
    }
    .profile-social-stats strong {
      color: #fff;
      font-weight: 700;
      font-size: 1.08rem;
      margin-right: 3px;
    }
    .profile-social-stats span {
      color: #a9b5c1;
      font-weight: 400;
      cursor: pointer;
      transition: text-decoration .15s;
    }
    .profile-social-stats span:hover {
      text-decoration: underline;
    }

