/* ==========================================================================
   BOKITCORD DESIGN SYSTEM — DISCORD THEME SPECIFICATION
   ========================================================================== */

:root {
  --bg-primary: #313338;
  --bg-secondary: #2b2d31;
  --bg-secondary-alt: #232428;
  --bg-tertiary: #1e1f22;
  --bg-accent: #383a40;
  --bg-floating: #232428;
  --bg-modifier-hover: rgba(255, 255, 255, 0.06);
  --bg-modifier-active: rgba(255, 255, 255, 0.1);
  --bg-modifier-selected: rgba(255, 255, 255, 0.08);

  --brand-blurple: #5865f2;
  --brand-blurple-hover: #4752c4;
  --status-green: #57f287;
  --status-yellow: #fee75c;
  --status-red: #ed4245;
  --status-red-hover: #da373c;
  --status-fuchsia: #eb459e;
  --status-sky: #00b0f4;

  --text-normal: #dbdee1;
  --text-muted: #949ba4;
  --text-header: #f2f3f5;
  --text-link: #00a8fc;
  --text-positive: #57f287;
  --text-danger: #fa777c;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --font-primary: 'gg sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-primary);
  background-color: var(--bg-tertiary);
  color: var(--text-normal);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

#app-root {
  width: 100%;
  height: 100%;
  position: relative;
}

.view-screen {
  width: 100%;
  height: 100%;
  display: flex;
}

.hidden {
  display: none !important;
}

/* Custom Discord Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #1a1b1e;
  border-radius: var(--radius-full);
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #111214;
}

/* ==========================================================================
   BUTTONS & COMMON UI
   ========================================================================== */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  transition: all 0.15s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.17s ease, transform 0.1s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-block {
  width: 100%;
}
.btn-blurple {
  background-color: var(--brand-blurple);
  color: #ffffff;
}
.btn-blurple:hover {
  background-color: var(--brand-blurple-hover);
}
.btn-secondary {
  background-color: #4e5058;
  color: #ffffff;
}
.btn-secondary:hover {
  background-color: #6d6f78;
}
.btn-danger {
  background-color: var(--status-red);
  color: #ffffff;
}
.btn-danger:hover {
  background-color: var(--status-red-hover);
}
.btn-success {
  background-color: #248046;
  color: #ffffff;
}
.btn-success:hover {
  background-color: #1a6334;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.icon-btn:hover {
  background-color: var(--bg-modifier-hover);
  color: var(--text-header);
}

/* ==========================================================================
   AUTHENTICATION & REGISTRATION SCREEN
   ========================================================================== */
#auth-view {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1e1f22;
  position: relative;
  overflow-y: auto;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.auth-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
}
.auth-glow-1 {
  width: 480px;
  height: 480px;
  background: var(--brand-blurple);
  top: -100px;
  left: -100px;
}
.auth-glow-2 {
  width: 520px;
  height: 520px;
  background: #57f287;
  bottom: -150px;
  right: -150px;
  opacity: 0.15;
}

.auth-card-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  padding: 24px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 20px;
}
.auth-logo-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background: var(--brand-blurple);
  color: #fff;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.4);
}
.auth-brand-title {
  color: var(--text-header);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.auth-brand-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}
.auth-brand-subtitle strong {
  color: var(--brand-blurple);
}

.auth-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.auth-tabs {
  display: flex;
  background: var(--bg-secondary-alt);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 22px;
  gap: 4px;
}
.auth-tab-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  text-align: center;
}
.auth-tab-btn.active {
  background: var(--brand-blurple);
  color: #ffffff;
}

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.required-star {
  color: var(--status-red);
}
.field-tip {
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background-color: var(--bg-tertiary);
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-xs);
  color: var(--text-normal);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--brand-blurple);
}
.form-group textarea {
  resize: vertical;
}

.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
}
.input-prefix {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
}
.input-with-prefix input {
  padding-left: 28px;
}

/* 200 Character Note Counter */
.label-with-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.label-with-counter label {
  margin-bottom: 0;
}
.char-counter {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.char-counter.counter-warn {
  color: var(--status-yellow);
}
.char-counter.counter-limit {
  color: var(--status-red);
  font-weight: 700;
}
.badge-optional {
  display: inline-block;
  background: rgba(88, 101, 242, 0.15);
  color: var(--brand-blurple);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  margin-left: 6px;
}

.field-subtext {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Auth Alert Box */
.auth-alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 13px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: slideDown 0.2s ease;
}
.auth-alert.alert-pending {
  background: rgba(254, 231, 92, 0.1);
  border: 1px solid rgba(254, 231, 92, 0.4);
  color: #fff6a9;
}
.auth-alert.alert-rejected {
  background: rgba(237, 66, 69, 0.12);
  border: 1px solid rgba(237, 66, 69, 0.45);
  color: #ffb4b6;
}
.auth-alert.alert-error {
  background: rgba(237, 66, 69, 0.12);
  border: 1px solid rgba(237, 66, 69, 0.45);
  color: #ffb4b6;
}
.auth-alert.alert-success {
  background: rgba(87, 242, 135, 0.12);
  border: 1px solid rgba(87, 242, 135, 0.4);
  color: #c9ffda;
}
.auth-alert-icon {
  flex-shrink: 0;
  margin-top: 1px;
}
.auth-alert-content {
  flex: 1;
  line-height: 1.45;
}
.auth-alert-content strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}
.auth-alert-quote {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid currentColor;
  border-radius: 3px;
  font-style: italic;
  font-size: 12.5px;
}

.auth-demo-hint {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.auth-demo-hint code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-normal);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   DISCORD WORKSPACE: 3-PANE LAYOUT
   ========================================================================== */
#discord-view {
  display: flex;
  height: 100vh;
  width: 100vw;
  background-color: var(--bg-primary);
}

/* 1. SERVER NAVIGATION RAIL */
.server-rail {
  width: 72px;
  height: 100%;
  background-color: var(--bg-tertiary);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  flex-shrink: 0;
}

.server-icon-btn {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.server-pill {
  position: absolute;
  left: -12px;
  width: 4px;
  height: 8px;
  background: #ffffff;
  border-radius: 0 4px 4px 0;
  transition: all 0.18s ease;
  opacity: 0;
}
.server-icon-btn:hover .server-pill {
  opacity: 1;
  height: 20px;
}
.server-icon-btn.active .server-pill {
  opacity: 1;
  height: 40px;
}
.server-icon-inner {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-normal);
  font-weight: 700;
  font-size: 16px;
  transition: all 0.2s ease;
}
.server-icon-btn:hover .server-icon-inner {
  border-radius: 16px;
  background-color: var(--brand-blurple);
  color: #ffffff;
}
.server-icon-btn.active .server-icon-inner {
  border-radius: 16px;
  background-color: var(--brand-blurple);
  color: #ffffff;
}
.brand-icon {
  background-color: var(--brand-blurple);
  color: #ffffff;
}
.community-icon {
  background-color: #383a40;
}
.admin-icon {
  background-color: #2b2d31;
  color: var(--status-yellow);
}
.admin-rail-btn:hover .admin-icon {
  background-color: var(--status-yellow);
  color: #111214;
}

.rail-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background-color: var(--status-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 3px solid var(--bg-tertiary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.rail-separator {
  width: 32px;
  height: 2px;
  background-color: var(--border-subtle);
  border-radius: 1px;
  margin: 4px 0;
}

/* 2. CHANNELS & DM SIDEBAR */
.channels-sidebar {
  width: 240px;
  height: 100%;
  background-color: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.15);
}

.sidebar-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.sidebar-header-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-header);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
}
.sidebar-section {
  margin-bottom: 16px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.channel-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
}
.channel-item:hover {
  background-color: var(--bg-modifier-hover);
  color: var(--text-normal);
}
.channel-item.active {
  background-color: var(--bg-modifier-selected);
  color: var(--text-header);
}
.channel-hash {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 400;
}
.channel-item.active .channel-hash {
  color: var(--text-header);
}

/* User Panel Bar */
.user-panel {
  height: 52px;
  background-color: var(--bg-secondary-alt);
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-blurple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}
.status-indicator {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary-alt);
}
.status-indicator.online { background-color: var(--status-green); }
.status-indicator.idle { background-color: var(--status-yellow); }
.status-indicator.dnd { background-color: var(--status-red); }
.status-indicator.offline { background-color: #80848e; }

.user-info {
  flex: 1;
  min-width: 0;
}
.user-displayname {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-header);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-username {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3. MAIN CHAT & HEADER AREA */
.main-chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  min-width: 0;
  height: 100%;
}

.chat-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  z-index: 5;
}
.channel-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.channel-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-header);
}
.header-divider {
  width: 1px;
  height: 16px;
  background-color: var(--border-subtle);
  margin: 0 4px;
}
.channel-topic {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-admin-alert {
  background: rgba(254, 231, 92, 0.15);
  border: 1px solid rgba(254, 231, 92, 0.4);
  color: var(--status-yellow);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: pulseGlow 2.5s infinite;
}
.btn-admin-alert:hover {
  background: rgba(254, 231, 92, 0.25);
}
.count-pill {
  background: var(--status-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(254, 231, 92, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(254, 231, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(254, 231, 92, 0); }
}

/* Chat Inner View */
.chat-inner-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.message-stream {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Message Entry */
.chat-message {
  display: flex;
  gap: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.1s ease;
}
.chat-message:hover {
  background-color: rgba(2, 2, 2, 0.08);
}
.msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--brand-blurple);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.msg-content-wrap {
  flex: 1;
  min-width: 0;
}
.msg-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.msg-displayname {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-header);
  cursor: pointer;
}
.msg-displayname:hover {
  text-decoration: underline;
}
.msg-username-tag {
  font-size: 12px;
  color: var(--text-muted);
}
.role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
}
.role-badge.admin {
  background: rgba(237, 66, 69, 0.2);
  color: var(--status-red);
}
.role-badge.bot {
  background: var(--brand-blurple);
  color: #fff;
}
.msg-timestamp {
  font-size: 11.5px;
  color: var(--text-muted);
}
.msg-text {
  font-size: 14.5px;
  color: var(--text-normal);
  word-break: break-word;
  line-height: 1.45;
}

/* ==========================================================================
   DISCORD RICH EMBEDS
   ========================================================================== */
.discord-embed {
  margin-top: 8px;
  max-width: 520px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-xs);
  border-left: 4px solid var(--brand-blurple);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.embed-grid {
  flex: 1;
  min-width: 0;
}
.embed-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-header);
}
.embed-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.embed-title a {
  color: var(--text-link);
  text-decoration: none;
}
.embed-title a:hover {
  text-decoration: underline;
}
.embed-description {
  font-size: 13.5px;
  color: var(--text-normal);
  line-height: 1.45;
  margin-bottom: 8px;
  word-break: break-word;
}
.embed-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 8px;
}
.embed-field-col {
  min-width: 0;
}
.embed-field-col.full-width {
  grid-column: 1 / -1;
}
.embed-field-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-header);
  margin-bottom: 2px;
}
.embed-field-value {
  font-size: 13px;
  color: var(--text-normal);
  word-break: break-word;
}
.embed-banner-wrap {
  margin-top: 8px;
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.embed-banner-wrap img {
  max-width: 100%;
  max-height: 280px;
  display: block;
  border-radius: var(--radius-xs);
  object-fit: cover;
}
.embed-thumb-wrap {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.embed-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.embed-footer-row {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Typing Indicator */
.typing-indicator {
  height: 24px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.typing-dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  background-color: var(--text-muted);
  border-radius: 50%;
  margin-right: 2px;
  animation: wave 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes wave {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

/* Chat Input Bar */
.chat-input-container {
  padding: 0 16px 24px;
  flex-shrink: 0;
}
.chat-input-form {
  background-color: var(--bg-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  padding: 2px 14px;
  gap: 12px;
}
.input-action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-normal);
  font-size: 12px;
  font-weight: 600;
}
.input-action-btn:hover {
  background: var(--brand-blurple);
  color: #ffffff;
}
.chat-input-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-header);
  font-size: 15px;
  font-family: inherit;
  padding: 10px 0;
}
.btn-send-msg {
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-xs);
}
.btn-send-msg:hover {
  color: var(--brand-blurple);
}

/* ==========================================================================
   4. MEMBERS SIDEBAR
   ========================================================================== */
.members-sidebar {
  width: 240px;
  height: 100%;
  background-color: var(--bg-secondary);
  padding: 16px 10px;
  overflow-y: auto;
  flex-shrink: 0;
  border-left: 1px solid rgba(0, 0, 0, 0.15);
}
.member-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 4px 8px;
  margin-top: 8px;
}
.member-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}
.member-card-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.member-card-item:hover {
  background-color: var(--bg-modifier-hover);
}
.member-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-blurple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}
.member-details {
  flex: 1;
  min-width: 0;
}
.member-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.member-display {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-normal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-card-item:hover .member-display {
  color: var(--text-header);
}
.member-tag {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   FRIENDS VIEW (ONLINE / ALL / ADD FRIEND BY USERNAME ONLY)
   ========================================================================== */
.friends-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
}
.friends-subnav {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.friends-subnav-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.bold-title {
  font-weight: 700;
  font-size: 15.5px;
  color: var(--text-header);
}
.subnav-divider {
  width: 1px;
  height: 18px;
  background-color: var(--border-subtle);
  margin: 0 4px;
}
.subnav-tab {
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.subnav-tab:hover {
  background-color: var(--bg-modifier-hover);
  color: var(--text-normal);
}
.subnav-tab.active {
  background-color: var(--bg-modifier-selected);
  color: var(--text-header);
}
.subnav-tab.tab-add-friend {
  color: var(--status-green);
}
.subnav-tab.tab-add-friend.active {
  background-color: rgba(87, 242, 135, 0.15);
  color: var(--status-green);
}
.badge-mini {
  background: var(--status-red);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
}

.friends-content-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}
.friend-tab-pane {
  max-width: 800px;
}

.add-friend-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-header);
  margin-bottom: 4px;
}
.add-friend-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.strict-rule-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(254, 231, 92, 0.1);
  border: 1px solid rgba(254, 231, 92, 0.3);
  border-radius: var(--radius-sm);
  color: #fff4a3;
  font-size: 13.5px;
  margin-bottom: 20px;
}

.add-friend-input-wrap {
  display: flex;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 6px 8px;
  border: 1px solid rgba(0, 0, 0, 0.4);
  margin-bottom: 12px;
}
.add-friend-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-normal);
  font-size: 15px;
  padding: 8px 12px;
}
.add-friend-feedback {
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  margin-bottom: 20px;
  animation: slideDown 0.2s ease;
}
.add-friend-feedback.success {
  background: rgba(87, 242, 135, 0.15);
  border: 1px solid rgba(87, 242, 135, 0.3);
  color: #a4ffc0;
}
.add-friend-feedback.error {
  background: rgba(237, 66, 69, 0.15);
  border: 1px solid rgba(237, 66, 69, 0.4);
  color: #ffa1a4;
}

.friend-quick-guide {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border-subtle);
  margin-top: 24px;
}
.friend-quick-guide h4 {
  font-size: 13px;
  color: var(--text-header);
  margin-bottom: 6px;
}
.friend-quick-guide p {
  font-size: 13px;
  color: var(--text-muted);
}
.friend-quick-guide code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--brand-blurple);
}

/* Friend Cards Grid */
.friends-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.friend-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease;
}
.friend-row-card:hover {
  background-color: var(--bg-accent);
}
.friend-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.friend-row-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-blurple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.friend-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   MODALS (ADMIN REQUESTS, EMBED BUILDER, PROFILE)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  position: relative;
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-header.danger-header {
  border-left: 4px solid var(--status-red);
}
.modal-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-header-icon.admin-crown {
  background: rgba(254, 231, 92, 0.15);
  color: var(--status-yellow);
}
.modal-header-icon.embed-icon {
  background: rgba(88, 101, 242, 0.15);
  color: var(--brand-blurple);
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-header);
}
.modal-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
}
.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 24px;
  color: var(--text-muted);
  line-height: 1;
}
.modal-close-btn:hover {
  color: var(--text-header);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}
.modal-footer {
  padding: 14px 20px;
  background: var(--bg-secondary-alt);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
}

/* Bokit Admin Modal */
.modal-admin-card {
  width: 100%;
  max-width: 680px;
  height: 600px;
}
.modal-tabs {
  display: flex;
  background: var(--bg-secondary-alt);
  padding: 0 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-tab-btn {
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}
.modal-tab-btn.active {
  color: var(--text-header);
  border-bottom-color: var(--brand-blurple);
}

.requests-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.request-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.request-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.request-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.request-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand-blurple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}
.request-names {
  display: flex;
  flex-direction: column;
}
.request-display {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-header);
}
.request-username {
  font-size: 12.5px;
  color: var(--text-muted);
}
.request-date {
  font-size: 12px;
  color: var(--text-muted);
}

.request-note-box {
  background: var(--bg-secondary);
  border-left: 3px solid var(--brand-blurple);
  padding: 10px 14px;
  border-radius: 4px;
}
.request-note-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.request-note-content {
  font-size: 13.5px;
  color: var(--text-normal);
  line-height: 1.4;
  word-break: break-word;
}

.request-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}
.status-badge.approved {
  background: rgba(87, 242, 135, 0.15);
  color: var(--status-green);
}
.status-badge.rejected {
  background: rgba(237, 66, 69, 0.15);
  color: var(--status-red);
}

/* Modal Small Reject Dialog */
.modal-small-card {
  width: 100%;
  max-width: 480px;
}
.reject-prompt-text {
  font-size: 13.5px;
  color: var(--text-normal);
  margin-bottom: 16px;
}

/* Rich Embed Builder Modal */
.modal-embed-card {
  width: 100%;
  max-width: 960px;
  height: 640px;
}
.embed-builder-body {
  flex: 1;
  display: flex;
  min-height: 0;
}
.embed-inputs-column {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  border-right: 1px solid var(--border-subtle);
}
.embed-preview-column {
  width: 440px;
  background: var(--bg-primary);
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.preview-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.discord-message-preview {
  display: flex;
  gap: 12px;
}
.preview-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-blurple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.preview-message-content {
  flex: 1;
  min-width: 0;
}
.preview-user-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.preview-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-header);
}
.preview-badge {
  background: var(--brand-blurple);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
}
.preview-time {
  font-size: 11px;
  color: var(--text-muted);
}

.color-palette-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}
.color-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.color-dot:hover {
  transform: scale(1.15);
}
.color-dot.active {
  border-color: #ffffff;
  transform: scale(1.15);
}
#embed-custom-color {
  width: 32px;
  height: 32px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.form-row {
  display: flex;
  gap: 12px;
}
.form-row .form-group {
  flex: 1;
}

.fields-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.btn-text-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-blurple);
}
.btn-text-action:hover {
  text-decoration: underline;
}
.embed-fields-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.field-edit-row {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--bg-tertiary);
  padding: 8px;
  border-radius: var(--radius-xs);
}
.field-edit-row input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-normal);
  padding: 6px 8px;
  font-size: 13px;
}
.field-inline-checkbox {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

/* User Profile Flyout */
.modal-profile-card {
  width: 100%;
  max-width: 360px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.profile-banner {
  height: 90px;
  background: linear-gradient(135deg, #5865f2, #eb459e);
}
.profile-avatar-row {
  position: relative;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: -40px;
}
.profile-avatar-large {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--brand-blurple);
  border: 6px solid var(--bg-secondary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
}
.badge-role {
  background: var(--bg-secondary-alt);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
}
.profile-details {
  padding: 16px;
}
.profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-header);
}
.username-copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-tertiary);
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  margin: 8px 0 14px;
}
.profile-username {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-normal);
}
.btn-copy-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-blurple);
}
.btn-copy-tag:hover {
  text-decoration: underline;
}
.profile-bio-box {
  background: var(--bg-tertiary);
  border-radius: var(--radius-xs);
  padding: 10px;
  margin-bottom: 16px;
}
.bio-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.bio-text {
  font-size: 13px;
  color: var(--text-normal);
  line-height: 1.4;
  word-break: break-word;
}

/* ==========================================================================
   TELEGRAM-STYLE END-TO-END ENCRYPTION (E2EE) STYLES
   ========================================================================== */
.btn-telegram-e2ee {
  background: rgba(87, 242, 135, 0.12);
  border: 1px solid rgba(87, 242, 135, 0.35);
  color: var(--status-green);
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-telegram-e2ee:hover {
  background: rgba(87, 242, 135, 0.22);
  border-color: var(--status-green);
  box-shadow: 0 0 12px rgba(87, 242, 135, 0.25);
}

.modal-telegram-crypto {
  width: 100%;
  max-width: 500px;
}
.telegram-header .telegram-icon {
  background: rgba(87, 242, 135, 0.15);
  color: var(--status-green);
}

.crypto-hero-card {
  background: linear-gradient(135deg, rgba(87, 242, 135, 0.08), rgba(88, 101, 242, 0.08));
  border: 1px solid rgba(87, 242, 135, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.crypto-shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(87, 242, 135, 0.2);
  color: var(--status-green);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.crypto-explainer {
  font-size: 13px;
  color: var(--text-normal);
  line-height: 1.45;
}

.telegram-fingerprint-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}
.fingerprint-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.crypto-emojis-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 38px;
  margin: 6px 0 12px;
  user-select: none;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  animation: emojiPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes emojiPop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.fingerprint-subtext {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.crypto-specs-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.spec-row:last-child {
  border-bottom: none;
}
.spec-label {
  color: var(--text-muted);
  font-weight: 500;
}
.spec-val {
  color: var(--text-header);
  font-weight: 600;
  text-align: right;
}
.spec-code {
  font-family: 'Consolas', monospace;
  background: var(--bg-secondary);
  color: var(--status-green);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
}

.msg-encrypted-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--status-green);
  background: rgba(87, 242, 135, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 4px;
}

/* ==========================================================================
   GLOBAL TOP NAVIGATION BAR
   ========================================================================== */
.global-navbar {
  height: 42px;
  background-color: #111214;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 50;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 6px;
}
.brand-spark {
  background: var(--brand-blurple);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}
.brand-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-header);
  letter-spacing: -0.2px;
}
.navbar-status-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(87, 242, 135, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
}
.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--status-green);
}
.status-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--status-green);
}

.navbar-center-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.navbar-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.navbar-tab:hover {
  background-color: var(--bg-modifier-hover);
  color: var(--text-normal);
}
.navbar-tab.active {
  background-color: var(--brand-blurple);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.4);
}
.badge-proxy-tag {
  background: rgba(255, 255, 255, 0.2);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
  text-transform: uppercase;
  font-weight: 700;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wisp-quick-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 176, 244, 0.12);
  border: 1px solid rgba(0, 176, 244, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--status-sky);
}
.nav-user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-blurple);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-normal);
}

/* ==========================================================================
   WEB PROXY VIEW (SCRAMJET & LIBCURL & WISP)
   ========================================================================== */
#proxy-view {
  width: 100%;
  height: calc(100vh - 42px);
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
}
.proxy-app-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.proxy-control-bar {
  height: 52px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  flex-shrink: 0;
}
.proxy-nav-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.proxy-omnibox-form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 2px 10px;
  transition: border-color 0.2s ease;
}
.proxy-omnibox-form:focus-within {
  border-color: var(--brand-blurple);
}
.omnibox-badge {
  color: var(--status-green);
  display: flex;
  align-items: center;
}
.proxy-omnibox-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-header);
  font-size: 14px;
  padding: 8px 0;
}
.adblock-shield-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(35, 165, 89, 0.15);
  border: 1px solid rgba(35, 165, 89, 0.35);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #57f287;
  white-space: nowrap;
  user-select: none;
  letter-spacing: 0.3px;
  box-shadow: 0 0 10px rgba(35, 165, 89, 0.2);
}
.adblock-shield-badge .shield-icon {
  font-size: 12px;
}
.btn-proxy-go {
  padding: 6px 16px;
  font-size: 13px;
}

.proxy-top-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.proxy-select {
  background: var(--bg-tertiary);
  color: var(--text-normal);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.proxy-select:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: var(--bg-accent);
}
.proxy-select:focus {
  border-color: var(--brand-blurple);
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
}
.proxy-select option {
  background: #1e1f22;
  color: var(--text-normal);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

/* Wisp Diagnostics Drawer */
.wisp-diagnostics-drawer {
  background-color: #1a1b1e;
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 20px;
  animation: slideDown 0.2s ease;
}
.wisp-drawer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.wisp-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--status-sky);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.wisp-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.wisp-code {
  background: var(--bg-secondary);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Consolas', monospace;
  font-size: 12px;
}
.wisp-ping-result {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-normal);
}
.ping-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.ping-dot.ready { background: var(--text-muted); }
.ping-dot.success { background: var(--status-green); box-shadow: 0 0 8px var(--status-green); }
.ping-dot.loading { background: var(--status-yellow); animation: wave 1s infinite; }
.ping-dot.error { background: var(--status-red); }

/* Proxy Home Page */
.proxy-home-container {
  flex: 1;
  padding: 40px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.proxy-hero {
  text-align: center;
  max-width: 600px;
  margin-bottom: 32px;
}
.proxy-hero-badge {
  display: inline-block;
  background: rgba(88, 101, 242, 0.15);
  color: var(--brand-blurple);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.proxy-hero-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-header);
  letter-spacing: -0.5px;
}
.proxy-hero-sub {
  font-size: 14.5px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

.proxy-apps-section {
  width: 100%;
  max-width: 840px;
}

.apps-category-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.apps-category-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-header);
  letter-spacing: 0.3px;
}
.apps-category-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

.apps-grid {
  display: grid;
  gap: 14px;
}
.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.app-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.app-card:hover {
  background: var(--bg-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* TikTok App Card Specifics */
.app-card.tiktok-app {
  border: 1px solid rgba(254, 44, 85, 0.4);
  background: linear-gradient(145deg, rgba(37, 244, 238, 0.04) 0%, rgba(254, 44, 85, 0.07) 100%), var(--bg-secondary);
}
.app-card.tiktok-app:hover {
  border-color: #fe2c55;
  box-shadow: 0 8px 26px rgba(254, 44, 85, 0.3), 0 0 16px rgba(37, 244, 238, 0.25);
}
.tiktok-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #010101;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.tiktok-svg-logo {
  filter: drop-shadow(-1px -1px 0px #25f4ee) drop-shadow(1px 1px 0px #fe2c55);
}

/* App Badges */
.app-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
}
.app-card-badge.hot-badge {
  background: linear-gradient(135deg, #fe2c55, #ff007f);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(254, 44, 85, 0.5);
}

.app-card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-tertiary);
}
.youtube-icon-wrap { background: rgba(255, 0, 0, 0.1); }
.discord-icon-wrap { background: rgba(88, 101, 242, 0.12); }
.reddit-icon-wrap { background: rgba(255, 69, 0, 0.1); }

.app-card-info {
  flex: 1;
  min-width: 0;
}
.app-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.app-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-header);
}
.app-tag-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}
.app-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Quick Bookmarks Grid */
.bookmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.bookmark-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
}
.bookmark-card:hover {
  background: var(--bg-accent);
  border-color: var(--brand-blurple);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.bookmark-icon {
  font-size: 22px;
}
.bookmark-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-header);
}

/* Proxy Viewport Iframe */
.proxy-viewport-container {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #ffffff;
  transition: all 0.25s ease;
}
.proxy-viewport-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Discord Empty Channel State */
.empty-channel-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 40px 16px 20px;
  animation: fadeIn 0.2s ease;
}
.empty-hash-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #4e5058;
  color: #ffffff;
  font-size: 42px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.empty-channel-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-header);
  margin-bottom: 6px;
}
.empty-channel-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.4;
}


