/* Variables for dark theme */
:root {
  --bg: #071026;
  --panel: #0b1220;
  --muted: #9aa4b2;
  --accent: #0b5cff;
  --accent-2: #06d6a0;
  --glass: rgba(255, 255, 255, 0.03);
  --card: #0b1228;
  --radius: 12px;
  --text: #e6eef6;
  --scrollbar: #0b5cff33;
  --divider: #142034;
  --preview-bg: #ffffff;
}

/* light theme */
:root.light {
  --bg: #f5f8fb;
  --panel: #ffffff;
  --muted: #4b5563;
  --accent: #0b5cff;
  --text: #0b1220;
  --scrollbar: #0b5cff22;
  --divider: #e6eef6;
  --preview-bg: #ffffff;
}

/* Universal box-sizing */
* {
  box-sizing: border-box;
}

/* General body styles */
html, body {
  height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  background: linear-gradient(180deg, #031029 0%, #071026 100%);
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Light theme body background */
:root.light body {
  background: linear-gradient(180deg, #fbfdff 0%, #f5f7fb 100%);
}

/* Topbar styles */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  backdrop-filter: blur(6px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.3s ease;
}

:root.light .topbar {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.02), transparent);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Brand text in topbar */
.brand {
  font-weight: 800;
  font-size: 18px;
  color: var(--accent);
  letter-spacing: 0.2px;
}

/* Controls container in topbar */
.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  justify-content: space-between;
}

/* Left and right aligned items in controls */
.left, .right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Hint text */
.hint {
  color: var(--muted);
  font-size: 13px;
}

/* 3D button styles */
.btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.08));
  color: var(--text);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: transform .12s ease, box-shadow .12s ease, background 0.3s ease;
  min-height: 44px;
  min-width: 44px;
  font-size: 14px;
}

:root.light .btn {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.06));
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Active state for 3D buttons */
.btn:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

/* Ghost button style */
.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 700;
  box-shadow: none;
}

:root.light .btn.ghost {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn.ghost:active {
  transform: translateY(1px);
}

/* Active/toggle state for buttons like AI toggle */
.btn.active {
  background: linear-gradient(180deg, var(--accent), #084bd1);
  color: white;
}

/* Tiny button size */
.btn.tiny {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  min-height: 36px;
  min-width: 36px;
}

/* Small text style */
.small {
  font-size: 13px;
  color: var(--muted);
}

/* Switch component styles */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}

/* Hidden input for switch */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Switch slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #263444;
  border-radius: 999px;
  transition: background 0.3s ease;
}

:root.light .slider {
  background: #cbd5e1;
}

/* Switch slider knob */
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .18s;
}

/* Checked state for switch slider */
.switch input:checked + .slider {
  background: linear-gradient(180deg, var(--accent), #084bd1);
}

/* Checked state for switch slider knob */
.switch input:checked + .slider:before {
  transform: translateX(18px);
}

/* Workspace grid layout */
.workspace {
  display: flex;
  gap: 12px;
  padding: 12px;
  height: calc(100vh - 86px);
}

/* Sidebar styles */
.sidebar {
  width: 260px;
  background: var(--panel);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 36px rgba(2, 6, 17, 0.6);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

:root.light .sidebar {
  box-shadow: 0 8px 36px rgba(2, 6, 17, 0.08);
}

/* Workspace head section */
.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Workspace title */
.ws-title {
  font-weight: 800;
}

/* Workspace actions */
.ws-actions {
  display: flex;
  gap: 6px;
}

/* File tree container */
.file-tree {
  overflow: auto;
  padding: 6px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent);
  flex: 1;
}

:root.light .file-tree {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.01), transparent);
}

/* Individual file item */
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
  cursor: pointer;
  transition: background 0.15s ease;
  min-height: 22px; /* VS Code accurate */
  font-size: 13px;
}
.file-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
:root.light .file-item:hover {
  background: rgba(0, 0, 0, 0.06);
}
.file-item.active {
  background: rgba(11, 92, 255, 0.18);
}


.file-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.file-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* File item name styling */
.file-item .name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

/* File actions */
.file-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.file-item:hover .file-actions {
  opacity: 1;
}

/* Active file item style */
.file-item.active {
  background: linear-gradient(180deg, rgba(11, 92, 255, 0.08), rgba(11, 92, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.file-item.active .file-actions {
  opacity: 1;
}

/* Sidebar bottom section */
.sidebar-bottom {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
}

:root.light .sidebar-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Split area with draggable divider */
.split-area {
  flex: 1;
  display: flex;
  min-width: 0;
  background: transparent;
  overflow: hidden;
  border-radius: 12px;
}

/* Left pane styles */
.left-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-radius: 12px;
  padding: 8px;
  min-width: 320px;
  max-width: 100%;
  transition: background 0.3s ease;
}

/* Draggable divider styles */
.divider {
  width: 8px;
  cursor: col-resize;
  background: linear-gradient(180deg, var(--divider), transparent);
  border-radius: 6px;
  margin: 0 6px;
  align-self: stretch;
  transition: background 0.3s ease;
  touch-action: none;
}

.divider:hover {
  background: linear-gradient(180deg, var(--accent), transparent);
}

/* Right pane styles */
.right-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
  transition: background 0.3s ease;
}

.right-top {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

/* Tabs container */



.tab-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.tab-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}



.tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 8px;
}

/* Individual tab style */
.tab {
  padding: 4px 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;   /* VS CODE SIZE */
  font-size: 13px;
  box-shadow: none;
  transition: background 0.15s ease;
}


.tab:hover {
  background: rgba(255, 255, 255, 0.02);
}

:root.light .tab:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* Active tab style */
.tab.active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}


:root.light .tab.active {
  background: rgba(0, 0, 0, 0.04);
  box-shadow: inset 0 -2px 0 var(--accent);
}


/* Close button for tabs */
.tab .x {
  margin-left: 6px;
  font-size: 12px;
  padding: 0 4px;
  color: var(--muted);
  border-radius: 3px;
}


.tab .x:hover {
  background: rgba(255, 0, 0, 0.1);
  color: #ff4444;
}

/* Editor shell container */
.editor-shell {
  flex: 1;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

/* Editor iframe/container */
.editor {
  height: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

:root.light .editor {
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Editor bottom section */
.editor-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
}

:root.light .editor-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.status {
  font-size: 12px;
  color: var(--muted);
}

.editor-actions {
  display: flex;
  gap: 6px;
}

/* Preview header styles */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

:root.light .preview-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.preview-header .title {
  font-weight: 700;
}

.preview-actions {
  display: flex;
  gap: 6px;
}

/* Preview frame */
#previewFrame {
  flex: 1;
  border: 0;
  min-height: 220px;
  background: var(--preview-bg);
  width: 100%;
}

/* Terminal container styles */
.terminal {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  min-height: 180px;
  max-height: 300px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent);
  transition: background 0.3s ease;
}

:root.light .terminal {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Terminal head */
.term-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

:root.light .term-head {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.term-title {
  font-weight: 700;
  font-size: 13px;
}

.term-actions {
  display: flex;
  gap: 6px;
}

/* Terminal body */
.term-body {
  flex: 1;
  padding: 8px;
  overflow: auto;
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  font-size: 13px;
  background: #020612;
  color: #cfeeff;
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

:root.light .term-body {
  background: #f8fafc;
  color: #1e293b;
}

/* Terminal input area */
.term-input {
  display: flex;
  padding: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
}

:root.light .term-input {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Terminal input field */
.term-input input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: var(--text);
  font-family: ui-monospace, monospace;
  font-size: 13px;
  min-height: 44px;
  transition: border 0.3s ease, background 0.3s ease;
}

:root.light .term-input input {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.term-input input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(11, 92, 255, 0.02);
}

/* Select element styling */
select {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex: 1;
  min-height: 36px;
  transition: border 0.3s ease, background 0.3s ease;
}

:root.light select {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Pinned footer styles */
.site-footer {
  position: fixed;
  right: 16px;
  bottom: 16px;
  height: 36px;
  line-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  text-decoration: none;
  font-size: 13px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.site-footer:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Light theme footer styles */
:root.light .site-footer {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: 0 6px 24px rgba(2, 6, 17, 0.06);
}

:root.light .site-footer:hover {
  box-shadow: 0 8px 32px rgba(2, 6, 17, 0.12);
}

/* Custom Modal/Popup Styles */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  backdrop-filter: blur(4px);
}

:root.light .custom-modal-overlay {
  background: rgba(0, 0, 0, 0.5);
}

.custom-modal-content {
  background: var(--panel);
  color: var(--text);
  padding: 24px;
  border-radius: var(--radius);
  max-width: 420px;
  width: 90%;
  box-shadow: 0 12px 48px rgba(2, 6, 17, 0.7);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
}

:root.light .custom-modal-content {
  box-shadow: 0 12px 48px rgba(2, 6, 17, 0.2);
}

.custom-modal-content h3 {
  margin: 0;
  font-size: 1.3em;
  color: var(--accent);
  font-weight: 800;
}

.custom-modal-content p {
  margin: 0;
  line-height: 1.6;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
}

#modalInput {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.1);
  color: var(--text);
  width: 100%;
  font-size: 14px;
  min-height: 44px;
  transition: border 0.3s ease, background 0.3s ease;
}

:root.light #modalInput {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

#modalInput:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(11, 92, 255, 0.02);
}

.modal-buttons .btn.ghost {
  color: var(--text);
}

/* Toolbar group */
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-group label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-group input[type="range"] {
  width: 80px;
}

/* Small responsive adjustments for tablets */
@media (max-width: 1024px) {
  .topbar {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .controls {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .left, .right {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 980px) {
  .workspace {
    flex-direction: column;
    padding: 8px;
    height: calc(100vh - 140px);
    gap: 8px;
  }

  .sidebar {
    order: 3;
    width: 100%;
    max-height: 300px;
  }

  .split-area {
    flex-direction: column;
    order: 1;
  }

  .divider {
    height: 12px;
    width: 100%;
    cursor: row-resize;
    margin: 6px 0;
    background: linear-gradient(90deg, var(--divider), transparent);
    touch-action: none;
  }

  .divider:hover {
    background: linear-gradient(90deg, var(--accent), transparent);
  }

  .left-pane {
    order: 2;
    min-width: 0;
    flex: 1;
    min-height: 300px;
  }

  .right-pane {
    order: 1;
    flex: 1;
    min-height: 400px;
  }

  .right-top {
    min-height: 200px;
  }

  .terminal {
    min-height: 150px;
    max-height: 200px;
  }

  .tabs {
    padding: 6px;
  }

  .tab {
    font-size: 13px;
    padding: 8px 10px;
  }

  .site-footer {
    left: 12px;
    right: auto;
    font-size: 11px;
    height: 32px;
    line-height: 32px;
  }

  .btn {
    font-size: 13px;
    padding: 8px 10px;
  }

  .hint {
    display: none;
  }

  .brand {
    font-size: 16px;
  }
}

/* Extra small screens */
@media (max-width: 640px) {
  .workspace {
    padding: 6px;
    gap: 6px;
  }

  .topbar {
    padding: 8px 10px;
  }

  .left, .right {
    gap: 6px;
  }

  .btn {
    padding: 8px 10px;
    font-size: 12px;
  }

  .btn.tiny {
    padding: 6px 8px;
    font-size: 11px;
  }

  .toolbar-group input[type="range"] {
    width: 60px;
  }

  .file-item {
    padding: 8px;
  }

  .sidebar {
    max-height: 250px;
  }

  .right-pane {
    min-height: 350px;
  }

  .custom-modal-content {
    width: 95%;
    padding: 20px;
  }
}

/* Styled scrollbars */
.file-tree::-webkit-scrollbar,
.term-body::-webkit-scrollbar,
.tabs::-webkit-scrollbar,
.editor-shell::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.file-tree::-webkit-scrollbar-thumb,
.term-body::-webkit-scrollbar-thumb,
.tabs::-webkit-scrollbar-thumb {
  background: var(--scrollbar);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.file-tree::-webkit-scrollbar-thumb:hover,
.term-body::-webkit-scrollbar-thumb:hover,
.tabs::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  background-clip: padding-box;
}

.file-tree,
.term-body,
.tabs {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar) transparent;
}

/* Small utility classes */
.hidden {
  display: none !important;
}

.hidden-sm {
  display: none;
}

@media (min-width: 640px) {
  .hidden-sm {
    display: block;
  }
}

/* Smooth transitions for theme changes */
* {
  transition-property: background-color, border-color, color, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}

/* Exclude specific elements from transition */
button, input, select, textarea, .slider:before {
  transition-property: all;
}






/* Sidebar resizer */
#sidebarDivider.sidebar-resizer {
  width: 8px;
  cursor: col-resize;
  background: linear-gradient(180deg, var(--divider), transparent);
  border-radius: 6px;
  margin-right: 6px;
  touch-action: none;
}

#sidebarDivider.sidebar-resizer:hover {
  background: linear-gradient(180deg, var(--accent), transparent);
}




/* Terminal resizer */
#terminalDivider.terminal-resizer {
  height: 10px;
  width: 100%;
  cursor: row-resize;
  background: linear-gradient(90deg, var(--divider), transparent);
  touch-action: none;
}

#terminalDivider.terminal-resizer:hover {
  background: linear-gradient(90deg, var(--accent), transparent);
}



.file-actions button i {
  font-size: 16px;
  pointer-events: none;
  color: var(--muted);
}

.file-actions button:hover i {
  color: var(--accent);
}



/* ===== GLOBAL GRADIENT SCROLLBARS ===== */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 #1e1e2e;
}

/* Chrome, Edge, Safari */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: #1e1e2e;
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6, #a855f7);
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #60a5fa, #c084fc);
}


::selection {
  background: linear-gradient(120deg, #3b82f6, #a855f7);
  color: #fff;
  text-shadow: 0 0 6px rgba(255,255,255,0.4);
}




.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
}

.brand img {
  height: 32px;        /* adjust size for your header */
  width: auto;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}




.status {
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.status:hover {
  color: var(--accent);
}


/* ===== PINNED BOTTOM FOOTER ===== */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;

  padding: 12px 15px;
  text-align: center;

  background: rgba(15, 15, 25, 0.85);
  backdrop-filter: blur(8px);

  border-top: 1px solid rgba(255, 255, 255, 0.06);

  color: var(--muted);
  font-size: 14px;

  cursor: pointer;
  user-select: none;

  z-index: 9999;

  /* center text always */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ❌ REMOVE ALL HOVER EFFECTS */
.site-footer:hover {
  color: var(--muted);
  text-decoration: none;
}

/* prevent overlapping content */
body {
  padding-bottom: 50px;
}





/* ======================= */
/* SPLASH SCREEN STYLES    */
/* ======================= */
.splash-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-logo {
  width: 220px;
  height: auto;
  opacity: 0;
  animation: splashFade 1.3s ease forwards;
}

@keyframes splashFade {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}









/* AI panel + divider (keep in styles.css) */
.ai-pane {
  width: 300px;
  min-width: 200px;
  max-width: 600px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
}

.ai-head {
  padding: 8px 12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid var(--divider);
}

.ai-iframe { flex:1; border:0; width:100%; }

#dividerAI {
  width: 8px;
  cursor: col-resize;
  background: linear-gradient(180deg, var(--divider), transparent);
  border-radius:6px;
  margin:0 6px;
}
#dividerAI:hover { background: linear-gradient(180deg, var(--accent), transparent); }

.ai-pane.hidden { display:none !important; }









.ai-open-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
}

.ai-open-btn .ai-open-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  pointer-events: none;
}











/* Layout groups */
.vscode-menu {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  gap: 12px;
  background: #1b1b1d;
  color: #e5e5e5;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  height: 38px;
  position: sticky;
  top: 0;
  z-index: 2000;
}

.menu-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.layout-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.layout-btn i {
  font-size: 16px;
}

.layout-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.layout-transition * {
  transition: all 0.25s ease;
}


.center-search {
  position: absolute;
  left: calc((var(--left-limit, 0px) + var(--right-limit, 100vw)) / 2);
  transform: translateX(-50%);

  display: flex;
  align-items: center;
  justify-content: center;   /* <<< KEY PART */

  gap: 6px;

  padding: 4px 10px;
  border-radius: 8px;
  background: #141416;
  border: 1px solid rgba(255,255,255,0.05);

  width: calc(var(--right-limit, 100vw) - var(--left-limit, 0px) - 40px);
  max-width: 600px;
  min-width: 140px;

  transition: width .25s ease, left .25s ease;
}

/* Center the text like VS Code */
.center-search input {
  background: transparent;
  border: none;
  outline: none;
  
  width: 100%;
  text-align: center;   /* <<< TEXT CENTER */

  color: #e5e5e5;
  font-size: 13px;
}

/* Slight opacity like VS Code */
.center-search i {
  opacity: 0.55;   /* softer, VS Code style */
  font-size: 14px;
}

/* menu items and dropdowns */
.menu-item {
  position: relative;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.menu-item:hover,
.menu-item.open {
  background: rgba(255,255,255,0.08);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 32px;
  left: 0;
  min-width: 160px;
  background: #1e1e20;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 6px;
  padding: 6px 0;
  box-shadow: 0 8px 20px #0007;
  z-index: 9999;
}

.menu-item.open .dropdown-content,
.menu-item:hover .dropdown-content {
  display: block;
}

.dd-item {
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.dd-separator {
  height: 1px;
  background: rgba(255,255,255,0.05);
  margin: 4px 0;
}

/* right button */
.icon-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: #e5e5e5;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.08);
}



/* enable dropdown via JS toggle */
.menu-item.open {
  background: rgba(255,255,255,0.08);
}

.menu-item.open .dropdown-content {
  display: block;
}





.dd-btn {
  cursor: pointer;
}

.dd-btn:active {
  background: rgba(255,255,255,0.12);
}







.popup {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup.hidden {
  display: none;
}

.popup-content {
  background: #1e1e1e;
  color: #fff;
  padding: 18px 24px;
  border-radius: 8px;
  min-width: 260px;
  text-align: center;
  box-shadow: 0 0 25px rgba(0,0,0,0.4);
}

.popup-content button {
  margin-top: 12px;
  padding: 6px 14px;
  background: #0e639c;
  border: none;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}













/* ============================
   VS CODE STYLE DARK POPUP
   ============================ */

.hidden { display: none !important; }

.vscode-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vscode-panel {
  width: 800px;
  max-width: calc(100% - 40px);
  background: #1e1e1e;
  border: 1px solid #3c3c3c;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  color: #dcdcdc;
}

/* head */
.vscode-panel-head {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: #2d2d2d;
  border-bottom: 1px solid #3c3c3c;
}
.vscode-title { font-weight: 600; }
.vscode-close {
  background: none;
  border: 0;
  color: #ccc;
  font-size: 17px;
  cursor: pointer;
}

/* body */
.vscode-panel-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* font grid */
.vscode-font-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 8px;
}
.vscode-font-card {
  background: #252526;
  border: 1px solid #3c3c3c;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}
.vscode-font-card:hover {
  background: #333;
}
.vscode-font-card.selected {
  border-color: #0078d7;
  box-shadow: 0 0 0 1px #0078d7;
}

/* custom input */
.vscode-custom-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vscode-input {
  background: #2d2d2d;
  border: 1px solid #3c3c3c;
  color: #fff;
  padding: 7px 10px;
  border-radius: 4px;
}
.vscode-preview {
  padding: 8px;
  background: #2a2a2a;
  border: 1px dashed #444;
  border-radius: 4px;
}

/* foot */
.vscode-panel-foot {
  padding: 10px;
  background: #2d2d2d;
  border-top: 1px solid #3c3c3c;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.vscode-btn {
  padding: 6px 14px;
  border: 1px solid #555;
  background: #3c3c3c;
  color: #ddd;
  border-radius: 4px;
  cursor: pointer;
}
.vscode-btn:hover { background: #444; }
.vscode-btn.primary {
  background: #0e639c;
  border-color: #0e639c;
}
.vscode-btn.primary:hover {
  background: #1177bb;
}


.autorun-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* optional: align toggle properly inside dropdown */
.autorun-row .switch {
  transform: scale(0.85);
}








/* Make Ask AI button look like the other top menu items */
.topbar-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  padding: 6px 12px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  height: 100%;
}

/* Hover effect identical to .menu-item */
.topbar-btn:hover {
  background: rgba(255,255,255,0.1);
}

/* Prevent default button outline */
.topbar-btn:focus {
  outline: none;
}





header.topbar {
  display: none !important;
}


.center-search {
  display: none !important;
}




.vscode-logo {
  width: 18px;        /* smaller icon size */
  height: 18px;       /* keep square ratio */
  object-fit: contain;
  margin-right: 8px;  /* spacing from File menu */
  opacity: 0.9;
  vertical-align: middle;
  pointer-events: none;
}





/* ======================
   ABOUT POPUP BACKDROP
======================== */
.about-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease;
}

.about-popup.hidden {
  display: none;
}

/* ======================
   WINDOW BOX
======================== */
.about-window {
  width: 820px;     /* Increased width */
  height: 520px;    /* Increased height */
  background: rgba(30, 30, 30, 0.85);
  border: 1px solid #3c3c3c;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  overflow: hidden;
  backdrop-filter: blur(20px);
  animation: popIn 0.25s ease;
  position: relative;
}


/* ======================
   TITLE BAR (DRAGGABLE)
======================== */
.about-titlebar {
  height: 32px;
  background: rgba(40, 40, 40, 0.8);
  border-bottom: 1px solid #3c3c3c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 14px;
  color: #fff;
  cursor: grab;
  user-select: none;
}

.about-titlebar:active {
  cursor: grabbing;
}

/* ======================
   CLOSE BUTTON
======================== */
.about-close {
  background: transparent;
  border: none;
  color: #bbb;
  font-size: 15px;
  cursor: pointer;
  padding: 0 6px;
}

.about-close:hover {
  color: #fff;
}

/* ======================
   IFRAME AREA
======================== */
.about-iframe {
  flex: 1;
  border: none;
  width: 100%;
  height: 100%;
  background: #111;
}

/* ======================
   RESIZE HANDLE
======================== */
.resize-handle {
  width: 18px;
  height: 18px;
  position: absolute;
  right: 4px;
  bottom: 4px;
  cursor: se-resize;
  background: linear-gradient(135deg, transparent 40%, #999 40%);
  opacity: 0.6;
}

.resize-handle:hover {
  opacity: 1;
}

/* ======================
   ANIMATIONS
======================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}





















/* DOCS POPUP — LANDSCAPE TABLET */
.docs-window {
  width: 1350px;     /* MUCH wider */
  height: 780px;     /* MUCH taller */
  background: rgba(28, 28, 28, 0.85);
  border: 1px solid #3c3c3c;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  overflow: hidden;
  backdrop-filter: blur(20px);
  animation: popIn 0.25s ease;
  position: relative;
}



/* iframe inside */
.docs-iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: #111;
}














/* ===== Accessibility Settings UI additions ===== */
.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: #2a2a2a;
  border-radius: 6px;
  border: 1px solid #3b3b3b;
  margin-bottom: 8px;
  color: #e6e6e6;
}

.setting-label { flex: 1; font-size: 14px; }

/* slider */
.slider-range { width: 200px; }

/* Switch (re-use earlier .switch/.slider if present; otherwise quick style) */
.switch { --w:40px; display:inline-block; vertical-align:middle; }
.switch input { display:none; }
.slider {
  width: var(--w); height: 22px; display:inline-block; background:#444; border-radius:14px; position:relative; cursor:pointer;
}
.slider::after {
  content:""; position:absolute; left:3px; top:3px; width:16px; height:16px; border-radius:12px; background:#fff; transition:transform .15s ease;
}
.switch input:checked + .slider { background:#0e639c; }
.switch input:checked + .slider::after { transform: translateX(18px); }

/* ===== SITE-WIDE ACCESSIBILITY RULES (applied by JS via body classes) ===== */

/* High contrast: dark background, bright text, high contrast UI */
body.acc-high-contrast {
  background: #000 !important;
  color: #fff !important;
}
body.acc-high-contrast a { color: #58a6ff !important; }
body.acc-high-contrast .vscode-menu, .vscode-panel, .vscode-btn { background: #000 !important; border-color:#333 !important; }

/* Reduced motion */
body.acc-reduce-motion *,
body.acc-reduce-motion *::before,
body.acc-reduce-motion *::after {
  transition-duration: 0.01ms !important;
  animation-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* UI Zoom applied by changing root font-size */
/* JS will set document.documentElement.style.fontSize = Npx */

/* Focus highlight */
body.acc-focus-ring :focus {
  outline: 3px solid #ffd24d !important;
  outline-offset: 2px;
}

/* Dyslexia-friendly font (fallback list) */
body.acc-dyslexia {
  font-family: "OpenDyslexic", "Atkinson Hyperlegible", "Comic Sans MS", "Verdana", sans-serif !important;
}

/* Color-blind friendly slight adjustments */
body.acc-color-blind {
  filter: saturate(0.95) contrast(1.05);
}

/* Disable flashing */
body.acc-disable-flash * {
  animation: none !important;
  transition: none !important;
}

/* Larger click targets - increase padding on interactive elements */
body.acc-large-targets a,
body.acc-large-targets button,
body.acc-large-targets .dd-item,
body.acc-large-targets .icon-btn {
  padding: 12px !important;
  min-height: 40px;
}

/* Keyboard navigation (makes elements focusable with clear focus)
   We won't modify DOM structure, but we enable stronger focus styles already above. */
body.acc-keyboard-nav { scroll-behavior: smooth; }

/* Small helper for labels/values shown */
#accUiZoomLabel, #accSiteFontLabel { font-size: 13px; color: #cfcfcf; }








/* ============================
   CodePad Settings v3 (namespaced .cpv3-*)
   APPEND to styles.css
   ============================ */

/* root */
.cpv3-root.hidden { display:none; }
.cpv3-root { position:fixed; inset:0; z-index:16000; font-family:inherit; }

/* backdrop - solid requested */
.cpv3-backdrop { position:absolute; inset:0; background:#071026; opacity:0.88; }

/* window */
.cpv3-window {
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:min(1040px, calc(100% - 40px)); height:min(760px, calc(100% - 60px));
  background:linear-gradient(180deg,#061023,#081022);
  border-radius:12px; overflow:hidden; display:flex; flex-direction:column;
  box-shadow:0 40px 90px rgba(2,6,23,0.9); border:1px solid rgba(255,255,255,0.03);
  color:var(--text);
}

/* titlebar */
.cpv3-titlebar { height:52px; display:flex; align-items:center; justify-content:space-between; padding:8px 12px; cursor:grab; background:linear-gradient(180deg, rgba(255,255,255,0.02), transparent); border-bottom:1px solid rgba(255,255,255,0.02); }
.cpv3-left { display:flex; align-items:center; gap:12px; }
.cpv3-icon { font-size:18px; color:var(--accent); width:38px; height:38px; display:flex; align-items:center; justify-content:center; border-radius:8px; }
.cpv3-titles .cpv3-title { font-weight:800; font-size:15px; }
.cpv3-titles .cpv3-sub { font-size:12px; color:var(--muted); }

/* title controls */
.cpv3-controls { display:flex; gap:6px; }
.cpv3-btn.ctrl { background:transparent; border:0; color:var(--muted); padding:8px; border-radius:8px; cursor:pointer; }
.cpv3-btn.ctrl:hover { background:rgba(255,255,255,0.02); color:var(--text); }

/* body layout */
.cpv3-body { display:flex; flex:1; min-height:0; }

/* sidebar */
.cpv3-sidebar { width:260px; padding:12px; background:rgba(255,255,255,0.01); border-right:1px solid rgba(255,255,255,0.02); display:flex; flex-direction:column; gap:12px; }
.cpv3-search { padding:8px; border-radius:10px; border:1px solid rgba(255,255,255,0.03); background:transparent; color:var(--text); width:100%; }
.cpv3-nav { display:flex; flex-direction:column; gap:6px; margin-top:6px; overflow:auto; max-height:calc(100vh - 240px); }
.cpv3-nav-item { display:flex; gap:10px; align-items:center; padding:10px; border-radius:8px; background:transparent; color:var(--muted); border:0; cursor:pointer; font-weight:700; text-align:left; }
.cpv3-nav-item.active, .cpv3-nav-item:hover { background:rgba(255,255,255,0.02); color:var(--text); }
.cpv3-sidebar-foot { display:flex; gap:8px; margin-top:auto; }

/* main */
.cpv3-main { flex:1; padding:18px; overflow:auto; min-height:0; }
.cpv3-page { display:none; }
.cpv3-page.active { display:block; }

/* row layout */
.cpv3-row { display:flex; align-items:center; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
.cpv3-row label { font-weight:700; color:var(--muted); min-width:160px; }

/* tiles */
.cpv3-tiles { display:flex; gap:12px; align-items:flex-start; flex-wrap:wrap; }
.cpv3-tile { border-radius:8px; overflow:hidden; border:1px solid rgba(255,255,255,0.03); background:transparent; cursor:pointer; padding:0; }
.cpv3-tile .preview { height:64px; width:120px; display:flex; align-items:center; justify-content:center; font-weight:700; }
.cpv3-tile .preview.dark { background:linear-gradient(180deg,#081023,#04101b); color:#e6eef6; }
.cpv3-tile .preview.light { background:linear-gradient(180deg,#fff,#f2f6fb); color:#111; }
.cpv3-tile .preview.hc { background:#000; color:#fff; }
.cpv3-tile.active { box-shadow:0 12px 30px rgba(11,92,255,0.12); transform:translateY(-4px); border-color:var(--accent); }

/* tiny helpers */
.cpv3-btn { padding:8px 10px; border-radius:8px; border:1px solid rgba(255,255,255,0.03); background:transparent; color:var(--text); cursor:pointer; }
.cpv3-btn.ghost { background:transparent; }
.cpv3-btn.tiny { padding:6px 8px; font-size:13px; }

/* switches */
.cpv3-switch { position:relative; display:inline-block; width:44px; height:24px; }
.cpv3-switch input { display:none; }
.cpv3-switch span { position:absolute; inset:0; display:block; background:#283444; border-radius:999px; }
.cpv3-switch span::after { content:''; position:absolute; left:4px; top:4px; width:16px; height:16px; background:#fff; border-radius:50%; transition:transform .18s; }
.cpv3-switch input:checked + span { background:linear-gradient(180deg,var(--accent), #084bd1); }
.cpv3-switch input:checked + span::after { transform:translateX(20px); }

/* inline label */
.inline { margin-left:12px; font-weight:600; color:var(--muted); }

/* import modal */
.cpv3-import-modal { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; z-index:17000; }
.cpv3-import-card { background:var(--panel); padding:18px; border-radius:12px; border:1px solid rgba(255,255,255,0.03); box-shadow:0 22px 80px rgba(2,6,23,0.8); }
.cpv3-import-modal.hidden { display:none; }

/* toast */
.cpv3-toast-root { position:fixed; right:18px; bottom:18px; z-index:18000; display:flex; flex-direction:column; gap:8px; }
.cpv3-toast { background:var(--panel); color:var(--text); padding:8px 12px; border-radius:10px; box-shadow:0 12px 36px rgba(2,6,23,0.6); border:1px solid rgba(255,255,255,0.03); }

/* responsive */
@media (max-width:980px) {
  .cpv3-window { width:calc(100% - 20px); height:calc(100% - 24px); left:50%; top:50%; transform:translate(-50%,-50%); border-radius:8px; }
  .cpv3-sidebar { display:none; width:0; }
}

/* scrollbar in main */
.cpv3-main::-webkit-scrollbar { width:10px; }
.cpv3-main::-webkit-scrollbar-thumb { background:linear-gradient(180deg,#3b82f6,#7c3aed); border-radius:10px; }

/* accessibility classes that UI toggles */
.acc-high-contrast { filter: contrast(1.25) saturate(1.1); }
.acc-reduce-motion * { transition: none !important; animation: none !important; }
.acc-large-targets .btn, .acc-large-targets .cpv3-btn { padding:14px 18px; border-radius:10px; }










.calc-window {
  position: absolute;
  top: 90px;
  left: 220px;
  width: 980px;
  height: 540px;
  background: var(--panel);
  border: 1px solid var(--divider);
  border-radius: 10px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 42px rgba(0,0,0,0.45);
}

.calc-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--divider);
  border-radius: 10px 10px 0 0;
  cursor: move;
  user-select: none;
}

.calc-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.calc-titlebar button {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 6px;
}

.calc-titlebar button:hover {
  background: rgba(255,255,255,0.08);
}

.calc-iframe {
  flex: 1;
  border: none;
  background: #fff;
  border-radius: 0 0 10px 10px;
}

/* Resizer */
.calc-resizer {
  width: 14px;
  height: 14px;
  position: absolute;
  right: 0;
  bottom: 0;
  cursor: se-resize;
  background: transparent;
}











.comment-btn {
  margin-left: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.comment-btn:hover {
  background: rgba(255,255,255,0.08);
}

:root.light .comment-btn:hover {
  background: rgba(0,0,0,0.08);
}

.comment-btn i {
  font-size: 18px;
}









/* ============================================================
   CP URL BAR (Chrome-like) — Using center-search layout
   ============================================================ */

.cp-urlbar {
  position: absolute;

  /* same centering logic as .center-search */
  left: calc((var(--left-limit, 0px) + var(--right-limit, 100vw)) / 2);
  transform: translateX(-50%);

  display: flex;
  align-items: center;

  /* NO spacing between prefix and input */
  gap: 0;

  padding: 4px 10px;
  border-radius: 8px;
  background: #141416;
  border: 1px solid rgba(255,255,255,0.05);

  /* auto width */
  width: calc(var(--right-limit, 100vw) - var(--left-limit, 0px) - 40px);
  max-width: 600px;
  min-width: 140px;

  transition: width .25s ease, left .25s ease;
  z-index: 30;
}

/* ============================================================
   Identity Bubble (Chrome)
   ============================================================ */

.cp-identity {
  display: flex;
  align-items: center;
  gap: 6px;

  padding: 3px 8px;
  border-radius: 6px;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.05);

  cursor: pointer;
  user-select: none;

  margin-right: 8px;  /* small actual space before prefix */
}

.cp-identity .cp-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  border-radius: 4px;
}

.cp-identity .cp-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #fff;
}

/* ============================================================
   Prefix + Input (left aligned, no space gap)
   ============================================================ */

.cp-prefix {
  color: #ccc;
  font-size: 13px;
  user-select: none;

  /* remove any spacing */
  margin: 0;
  padding: 0;
}

/* typing is LEFT ALIGNED + no space before first character */
#cpUrlInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;

  width: 100%;
  text-align: left;
  color: #e5e5e5;
  font-size: 13px;

  /* no padding to keep cp:// glued to input */
  padding: 0;
  margin: 0;
}

/* ============================================================
   Suggestions Dropdown
   ============================================================ */

.cp-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;

  background: #1a1b1d;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.6);

  padding: 6px;
  z-index: 50;

  max-height: calc(44px * 6);
  overflow-y: auto;
}

.cp-suggest .cp-item {
  padding: 8px 10px;
  border-radius: 6px;

  display: flex;
  justify-content: space-between;

  font-size: 13px;
  color: #e9e9e9;
  cursor: pointer;
}

.cp-suggest .cp-item:hover {
  background: rgba(255,255,255,0.08);
}

.cp-suggest .cp-item .hint {
  font-size: 12px;
  color: #9fa2a7;
}

/* ============================================================
   Identity Popup (Chrome-style)
   ============================================================ */

#cpIconCard {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;

  width: 280px;
  background: #1b1c1e;

  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 20px 55px rgba(0,0,0,0.6);

  padding: 14px 16px;
  z-index: 60;
  display: none;

  animation: cpCardShow .15s ease-out;
}

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

.cp-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.cp-card-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 6px;
}

.cp-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.cp-card-body {
  font-size: 13px;
  color: #c2c4c8;
  margin-bottom: 10px;
  line-height: 1.45;
}

.cp-card-art {
  width: 100%;
  border-radius: 8px;
  display: block;
  opacity: 0.95;
}

.hidden {
  display: none !important;
}

















