/* ==========================================================================
   CodeShift — Minimalist Black & White Collaborative Editor
   "Share Code in Real-Time Seamlessly Without Login"
   ========================================================================== */

:root {
  --cs-bg: #000000;
  --cs-canvas: #050505;
  --cs-panel: #0a0a0a;
  --cs-panel-elevated: #111111;
  --cs-border: rgba(255, 255, 255, 0.12);
  --cs-border-light: rgba(255, 255, 255, 0.22);
  --cs-coral: #ffffff;
  --cs-coral-hover: #e5e5e5;
  --cs-emerald: #ffffff;
  --cs-amber: #888888;
  --cs-blue: #ffffff;
  --cs-violet: #d4d4d8;
  --cs-text-high: #ffffff;
  --cs-text-muted: #888888;
  --cs-text-dim: #666666;
  --cs-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --cs-font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, Consolas, monospace;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--cs-bg);
  color: var(--cs-text-high);
  font-family: var(--cs-font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: 13px;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #000000;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

.flex { display: flex !important; }
.hidden, .modal-backdrop.hidden { display: none !important; }

/* ==========================================================================
   MESH BACKGROUND CANVAS (Monochrome Obsidian & Clean Depth)
   ========================================================================== */

.mesh-background-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(at 0% 0%, rgba(255, 255, 255, 0.04) 0px, transparent 45%),
    radial-gradient(at 100% 0%, rgba(255, 255, 255, 0.03) 0px, transparent 45%),
    radial-gradient(at 100% 100%, rgba(255, 255, 255, 0.03) 0px, transparent 45%),
    radial-gradient(at 0% 100%, rgba(255, 255, 255, 0.04) 0px, transparent 45%);
  background-color: var(--cs-bg);
}

.mesh-grid-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ==========================================================================
   MAIN APP SHELL
   ========================================================================== */

#app {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Navigation Header */
.app-header, .editor-header {
  height: 54px;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #1f1f1f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 30;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: #ffffff;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}

.brand-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  font-family: var(--cs-font-sans);
  color: #ffffff;
  font-weight: 700;
}

.brand-shift {
  background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.presence-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff;
}

.room-path-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--cs-font-mono);
  font-size: 12px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}
.room-path-pill:hover {
  background: #1a1a1a;
  border-color: #ffffff;
}

/* Auto-Save & Cloud Sync Indicator */
.save-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  background: #111111;
  border: 1px solid #2a2a2a;
  color: #888888;
  user-select: none;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.status-dot.saved {
  background-color: #ffffff;
  box-shadow: 0 0 8px #ffffff;
}

.status-dot.saving {
  background-color: #888888;
  box-shadow: 0 0 8px #888888;
  animation: pulseSaving 1s infinite;
}

@keyframes pulseSaving {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes pulseSaving {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Header Center Controls */
.header-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-dropdown-select {
  background: #000000;
  border: 1px solid #333333;
  color: #ffffff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.language-dropdown-select:hover, .language-dropdown-select:focus {
  border-color: #ffffff;
}

.online-users-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
  padding: 4px 10px;
  background: #111111;
  border-radius: 4px;
  border: 1px solid #2a2a2a;
  user-select: none;
}

/* Header Right Buttons */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Minimal Gamified Black & White Action Buttons */
.btn-game-bw {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #000000;
  color: #ffffff;
  font-family: 'JetBrains Mono', 'Inter', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 6px;
  border: 1.5px solid #333333;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 0 #111111;
  transition: all 0.12s ease;
  letter-spacing: -0.2px;
}
.btn-game-bw:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 3px 0 #444444;
}
.btn-game-bw:active {
  transform: translateY(1px);
  box-shadow: 0 0 0 #000;
}
.btn-game-bw.btn-game-icon {
  padding: 6px 9px;
}

/* Remote Cursor Widget & Highlights (Collaborative presence matching Screenshot 3) */
.remote-cursor-widget {
  position: absolute;
  z-index: 55;
  pointer-events: none;
  border-radius: 4px;
  padding: 2px 7px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
  transform: translateY(-6px);
  transition: transform 0.08s ease, top 0.08s ease, left 0.08s ease;
}
.remote-cursor-arrow {
  position: absolute;
  bottom: -4px;
  left: 6px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
}
@keyframes caretBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.btn-coral-share {
  background-color: #ffffff;
  color: #000000;
  font-weight: 700;
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
  transition: all 0.15s ease;
}
.btn-coral-share:hover {
  background-color: #e5e5e5;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.35);
}

.btn-subtle-action {
  background: #000000;
  color: #ffffff;
  border: 1px solid #333333;
  padding: 6px 11px;
  border-radius: 4px;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.btn-subtle-action:hover {
  color: #000000;
  background: #ffffff;
  border-color: #ffffff;
}

.btn-icon-rail {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 14px;
  transition: all 0.15s ease;
}
.btn-icon-rail:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* ==========================================================================
   CODE TYPING CANVAS & SYNTAX SPACE
   ========================================================================== */

.editor-viewport-wrapper {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  background: #000000;
}

#monaco-editor-container {
  width: 100%;
  height: 100%;
}

.monaco-editor, .monaco-editor-background {
  background-color: transparent !important;
}

/* Fallback Code Area (if Monaco CDN is pending or disabled) */
#fallback-editor-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
}

#editor-line-numbers {
  width: 52px;
  padding: 18px 8px;
  text-align: right;
  font-family: var(--cs-font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #555555;
  user-select: none;
  background: #000000;
  border-right: 1px solid #1f1f1f;
}

#code-editor-textarea {
  flex: 1;
  height: 100%;
  padding: 18px 20px;
  background: transparent;
  color: #ffffff;
  font-family: var(--cs-font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  border: none;
  outline: none;
  resize: none;
  tab-size: 2;
  white-space: pre;
}

/* Bottom Status Strip */
.editor-status-bar {
  height: 26px;
  background: #000000;
  border-top: 1px solid #1f1f1f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 11px;
  color: #777777;
  user-select: none;
  flex-shrink: 0;
}

.status-left, .status-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Remote Cursor Flag */
.monaco-remote-cursor {
  position: absolute;
  width: 2px !important;
  background-color: var(--cs-coral);
  pointer-events: none;
  z-index: 100;
}

.monaco-remote-flag {
  position: absolute;
  top: -18px;
  left: 0;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  color: #ffffff;
  white-space: nowrap;
  pointer-events: none;
  z-index: 101;
}

/* ==========================================================================
   CLEAN MODALS (Cloud Sync / Firebase, Settings, Share Link)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  animation: modalFade 0.18s ease-out;
}

@keyframes modalFade {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #222222;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111111;
}

.modal-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.modal-close-btn {
  color: #888888;
  font-size: 15px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.modal-content {
  padding: 20px;
}

.modal-description {
  font-size: 12.5px;
  color: #888888;
  margin-bottom: 16px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  background: #141414;
  border: 1px solid #333333;
  border-radius: 4px;
  padding: 8px 12px;
  color: #ffffff;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.15s ease;
}
.form-input:focus {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.modal-footer {
  padding: 12px 18px;
  background: #111111;
  border-top: 1px solid #222222;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-secondary {
  padding: 6px 14px;
  border: 1px solid #333333;
  border-radius: 4px;
  font-size: 12px;
  color: #888888;
  background: #111111;
  transition: all 0.15s ease;
}
.btn-secondary:hover {
  background: #222222;
  color: #ffffff;
  border-color: #ffffff;
}

.btn-primary {
  padding: 6px 16px;
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.15s ease;
}
.btn-primary:hover {
  background: #e5e5e5;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.3);
}

/* Toast Container */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-msg {
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
  background: #0a0a0a;
  border: 1px solid #333333;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  animation: toastSlide 0.18s ease-out;
}

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

/* ==========================================================================
   RESPONSIVE DESIGN — TABLETS, MOBILE & TOUCH DEVICES
   ========================================================================== */

#app, #editor-page {
  height: 100vh;
  height: 100dvh;
}

/* Tablet screens (< 900px) */
@media (max-width: 900px) {
  .header-left {
    gap: 8px;
  }
  .room-path-pill {
    max-width: 140px;
  }
  #room-nav-id {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .online-users-badge {
    padding: 3px 8px;
    font-size: 11px;
  }
}

/* Mobile & Small Tablets (< 768px) */
@media (max-width: 768px) {
  .app-header, .editor-header {
    height: 48px;
    padding: 0 10px;
  }
  .brand-text {
    display: none;
  }
  .room-path-pill {
    max-width: 110px;
    font-size: 11.5px;
    padding: 3px 6px;
  }
  .save-status-pill {
    padding: 3px 6px;
    font-size: 11px;
  }
  .online-users-badge {
    padding: 3px 7px;
    font-size: 11px;
  }
  .header-right {
    gap: 5px;
  }
  .btn-coral-share {
    padding: 6px 10px;
    font-size: 12px;
  }
  .btn-coral-share span:last-child {
    display: none;
  }
  .btn-subtle-action {
    padding: 6px 9px;
    font-size: 12px;
  }
  .btn-subtle-action span:last-child {
    display: none;
  }
  .editor-status-bar {
    height: 24px;
    padding: 0 10px;
    font-size: 11px;
  }
  .status-right {
    display: none;
  }
}

/* ==========================================================================
   PRO IDE WORKBENCH (VS CODE / CURSOR STYLE)
   ========================================================================== */

.ide-workbench-root {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #000000;
  color: #ffffff;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* TOP PRO BAR */
.ide-top-bar {
  height: 42px;
  background: #0d0d0d;
  border-bottom: 1px solid #1f1f1f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  flex-shrink: 0;
  user-select: none;
}

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

.ide-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: -0.4px;
}

.ide-brand-name {
  color: #ffffff;
}

.ide-brand-shift {
  color: #888888;
}

/* Room Pill / Copy Link */
.ide-room-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
  background: #141414;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid #222222;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ide-room-pill:hover {
  background: #202020;
  border-color: #ffffff;
  color: #ffffff;
}

/* Cloud Save Indicator */
.ide-save-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #888888;
  padding: 2px 8px;
  border-radius: 4px;
  background: #111111;
  border: 1px solid #222222;
}

/* Presence Pill */
.ide-presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  padding: 3px 9px;
  border-radius: 100px;
  background: #111111;
  border: 1px solid #262626;
}

.ide-top-center {
  position: relative;
}

.ide-presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  padding: 3px 9px;
  border-radius: 100px;
  background: #111111;
  border: 1px solid #262626;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.ide-presence-pill:hover {
  background: #1c1c1c;
  border-color: #555555;
}

.presence-arrow {
  font-size: 8px;
  color: #777777;
  margin-left: 1px;
}

/* COLLABORATORS POPUP */
.peers-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  width: 270px;
  background: #0d0d0d;
  border: 1px solid #282828;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.9);
  z-index: 100;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.peers-dropdown-menu.hidden {
  display: none !important;
}

.peers-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #777777;
  padding-bottom: 6px;
  border-bottom: 1px solid #1a1a1a;
}

.peers-close-btn {
  background: transparent;
  border: none;
  color: #666666;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
}

.peers-close-btn:hover { color: #ffffff; }

.peers-dropdown-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 180px;
  overflow-y: auto;
}

.peer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: #141414;
  border: 1px solid #222222;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.peer-row-left {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.peer-name-text {
  color: #ffffff;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.peer-role-tag {
  font-size: 8.5px;
  color: #28c840;
  background: rgba(40, 200, 64, 0.12);
  padding: 1px 4px;
  border-radius: 3px;
}

.peer-loc-tag {
  font-size: 9.5px;
  color: #888888;
  flex-shrink: 0;
}

.peers-dropdown-footer {
  border-top: 1px solid #1a1a1a;
  padding-top: 8px;
}

.peer-name-edit-box {
  display: flex;
  gap: 6px;
}

.peer-nickname-input {
  flex: 1;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  color: #ffffff;
  padding: 5px 8px;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  outline: none;
}

.peer-nickname-input:focus {
  border-color: #ffffff;
}

.peer-nickname-btn {
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.peer-nickname-btn:hover {
  background: #e5e5e5;
}

.ide-presence-pill .presence-pulse {
  background: #28c840;
  box-shadow: 0 0 6px #28c840;
}

/* Top Right Actions */
.ide-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ide-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 5px;
  background: #141414;
  border: 1px solid #262626;
  color: #888888;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ide-btn-icon:hover {
  background: #222222;
  border-color: #ffffff;
  color: #ffffff;
}

.ide-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 600;
  background: #141414;
  border: 1px solid #2a2a2a;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ide-action-btn:hover {
  background: #222222;
  border-color: #ffffff;
}

.ide-action-primary {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.ide-action-primary:hover {
  background: #e5e5e5;
  color: #000000;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}

/* Mobile More Menu */
.mobile-more-wrapper {
  display: none;
  position: relative;
}

.mobile-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  width: 175px;
  background: #0d0d0d;
  border: 1px solid #282828;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.95);
  z-index: 100;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-dropdown-menu.hidden {
  display: none !important;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.mobile-menu-item:hover, .mobile-menu-item:active {
  background: #1f1f1f;
  color: #ffffff;
}

.mob-menu-icon {
  font-size: 13px;
  width: 16px;
  display: inline-flex;
  justify-content: center;
}

/* WORKSPACE BODY — FULL SCREEN DISTRACTION-FREE */
.ide-workspace-body {
  flex: 1;
  width: 100%;
  height: calc(100vh - 42px - 25px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: #000000;
}

/* MONACO VIEWPORT (100% Full Width & Height) */
.ide-editor-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #000000;
}

#monaco-editor-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  user-select: text !important;
  -webkit-user-select: text !important;
}

#monaco-editor-container .monaco-editor,
#monaco-editor-container .view-lines,
#monaco-editor-container .view-line,
#monaco-editor-container .lines-content,
#code-editor-textarea {
  user-select: text !important;
  -webkit-user-select: text !important;
}

/* Ensure Monaco selection highlights stand out boldly */
.monaco-editor .selected-text {
  background-color: rgba(255, 255, 255, 0.28) !important;
}
.monaco-editor .focused .selected-text {
  background-color: rgba(255, 255, 255, 0.35) !important;
}

/* BOTTOM PRO STATUS BAR */
.ide-status-bar {
  height: 25px;
  min-height: 25px;
  width: 100%;
  background: #0a0a0a;
  border-top: 1px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #777777;
  user-select: none;
  flex-shrink: 0;
  box-sizing: border-box;
  z-index: 30;
}

.ide-status-bar .status-left,
.ide-status-bar .status-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-item.clickable {
  cursor: pointer;
  transition: color 0.15s;
}

.stat-item.clickable:hover {
  color: #ffffff;
}

.stat-sep {
  color: #333333;
}

.status-lang-select {
  background: transparent;
  border: 1px solid transparent;
  color: #888888;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 3px;
  outline: none;
  transition: all 0.15s ease;
}

.status-lang-select:hover,
.status-lang-select:focus {
  color: #ffffff;
  border-color: #333333;
  background: #141414;
}

.status-lang-select option {
  background: #0d0d0d;
  color: #ffffff;
}

/* Responsive Overrides */
@media (max-width: 640px) {
  .desktop-only-btn {
    display: none !important;
  }
  .mobile-more-wrapper {
    display: block !important;
  }
  .ide-top-bar {
    padding: 0 6px;
    gap: 4px;
  }
  .ide-top-left {
    gap: 5px;
    flex-shrink: 0;
  }
  .ide-brand-name {
    display: none !important;
  }
  .ide-room-pill {
    padding: 3px 6px;
    font-size: 11px;
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .ide-save-pill #save-status-text {
    display: none !important;
  }
  .ide-save-pill {
    padding: 4px 5px;
    flex-shrink: 0;
  }
  .ide-presence-pill {
    padding: 3px 6px;
    font-size: 10px;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .ide-top-right {
    gap: 4px;
    flex-shrink: 0;
  }
  .ide-action-btn {
    padding: 4px 7px;
    min-width: 28px;
    font-size: 11px;
  }
  .ide-action-btn span {
    display: none !important;
  }
  .ide-btn-icon {
    width: 28px;
    height: 28px;
  }
  .peers-dropdown-menu {
    width: 240px;
    left: auto;
    right: -30px;
    transform: none;
  }
  .ide-status-bar {
    padding: 0 8px;
    overflow: hidden;
    white-space: nowrap;
  }
  #code-stats,
  #code-chars-count,
  .ide-status-bar .status-left .stat-sep:nth-of-type(2),
  .ide-status-bar .status-left .stat-sep:nth-of-type(3) {
    display: none !important;
  }
  .ide-status-bar .status-right {
    display: none !important;
  }
}



