/* ==========================================================================
   LingoAlpha Screener — Responsive Dark/Light Purple Glassmorphism Design
   ========================================================================== */

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

:root {
  --bg-dark: #0b0517;
  --bg-card: #150a27;
  --bg-card-hover: #1c0e35;
  --bg-input: #190a2e;
  --bg-surface: #110820;
  --border-color: rgba(216, 180, 254, 0.12);
  --border-accent: rgba(192, 132, 252, 0.35);

  --text-main: #f5f3ff;
  --text-muted: #d8b4fe;
  --text-dim: #9333ea;
  --text-placeholder: rgba(216, 180, 254, 0.4);

  --accent-purple: #c084fc;
  --accent-lavender: #e9d5ff;
  --accent-violet: #8b5cf6;
  --accent-gold: #fbbf24;

  --green-gain: #34d399;
  --green-bg: rgba(52, 211, 153, 0.14);
  --red-loss: #f43f5e;
  --red-bg: rgba(244, 63, 94, 0.14);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --brand-glow: 0 4px 20px rgba(192, 132, 252, 0.2);
  --card-glow: 0 4px 24px rgba(139, 92, 246, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

[data-theme="light"] {
  --bg-dark: #f8f5ff;
  --bg-card: #ffffff;
  --bg-card-hover: #f3ecff;
  --bg-input: #f0e8ff;
  --bg-surface: #faf8ff;
  --border-color: rgba(124, 58, 237, 0.14);
  --border-accent: rgba(124, 58, 237, 0.35);

  --text-main: #180833;
  --text-muted: #6d28d9;
  --text-dim: #7c3aed;
  --text-placeholder: rgba(109, 40, 217, 0.4);

  --accent-purple: #7c3aed;
  --accent-lavender: #5b21b6;
  --accent-violet: #6d28d9;

  --brand-glow: 0 4px 20px rgba(124, 58, 237, 0.15);
  --card-glow: 0 4px 24px rgba(109, 40, 217, 0.08);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 3rem;
}

/* Container */
.screener-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

/* Header & Brand */
.site-header {
  background: rgba(15, 7, 30, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.brand-name span {
  color: var(--accent-purple);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--border-accent);
}

/* Top Navigation Bar */
.page-nav-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
}

.page-nav-bar::-webkit-scrollbar {
  display: none;
}

.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-item.active .nav-link {
  color: var(--accent-purple);
  border-bottom-color: var(--accent-purple);
}

.nav-tag {
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-tag.live {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.nav-tag.soon {
  background: rgba(147, 51, 234, 0.2);
  color: #c084fc;
}

/* Hero Section */
.screener-hero {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, rgba(30, 14, 55, 0.8), rgba(17, 8, 32, 0.95));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-glow);
}

.screener-hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.35rem;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 650px;
}

/* View Switcher Tabs */
.view-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.view-pills {
  display: inline-flex;
  background: var(--bg-card);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 0.25rem;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.view-btn:hover {
  color: var(--text-main);
}

.view-btn.active {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
}

/* Universe Selector Dropdown */
.universe-selector-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.universe-select-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.universe-select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.universe-select:focus {
  border-color: var(--accent-purple);
}

/* Guest Free Runs Pill */
.trial-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* --- Category Pills & Search Filter --- */
.category-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.category-pills-list {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.category-pills-list::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  padding: 0.45rem 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.cat-pill:hover {
  border-color: var(--border-accent);
  color: var(--text-main);
}

.cat-pill.active {
  background: var(--border-accent);
  color: var(--text-main);
  border-color: var(--accent-purple);
}

.screen-search-box {
  position: relative;
  min-width: 240px;
  flex-grow: 1;
  max-width: 340px;
}

.screen-search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.55rem 0.85rem 0.55rem 2.2rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
}

.screen-search-input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(192, 132, 252, 0.2);
}

.screen-search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Pre-Built Screen Cards Grid --- */
.screen-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.15rem;
  margin-bottom: 2.5rem;
}

.screen-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
}

.screen-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: var(--brand-glow);
}

.card-top {
  margin-bottom: 0.85rem;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.card-icon-pill {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(192, 132, 252, 0.15));
  border: 1px solid var(--border-accent);
  color: var(--accent-lavender);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.card-category-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-purple);
  background: rgba(192, 132, 252, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.card-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.card-conditions-pill {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-lavender);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-run-screen {
  flex: 1;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  border: none;
  color: #ffffff;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.btn-run-screen:hover {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
  transform: translateY(-1px);
}

.btn-customize-screen {
  background: var(--bg-input);
  border: 1px solid var(--border-accent);
  color: var(--text-main);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.btn-customize-screen:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
}

/* --- View B: Custom Condition Builder --- */
.custom-builder-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.builder-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.conditions-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.condition-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.condition-operand-select,
.condition-operator-select,
.condition-val-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
}

.condition-operand-select:focus,
.condition-operator-select:focus,
.condition-val-input:focus {
  border-color: var(--accent-purple);
}

.condition-val-input {
  width: 110px;
}

.btn-remove-cond {
  background: transparent;
  border: none;
  color: var(--red-loss);
  cursor: pointer;
  padding: 0.4rem;
  font-size: 0.95rem;
  margin-left: auto;
  border-radius: 6px;
}

.btn-remove-cond:hover {
  background: var(--red-bg);
}

.logic-connector-pill {
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.2rem;
  margin: 0 auto;
}

.logic-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 14px;
  cursor: pointer;
}

.logic-btn.active {
  background: var(--accent-purple);
  color: #ffffff;
}

.builder-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn-add-condition {
  background: var(--bg-input);
  border: 1px dashed var(--border-accent);
  color: var(--accent-lavender);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-add-condition:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
}

/* --- Results Table Section --- */
.results-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2rem;
}

.results-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.results-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.results-count-badge {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

.results-batch-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-action-alphatest {
  background: linear-gradient(135deg, #7c3aed, #c084fc);
  border: none;
  color: #ffffff;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-action-alphatest:hover {
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
  transform: translateY(-1px);
}

.btn-action-export {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-action-export:hover {
  border-color: var(--accent-purple);
}

/* Table */
.results-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.screener-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.86rem;
}

.screener-table th {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.screener-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.screener-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.stock-symbol-cell {
  display: flex;
  flex-direction: column;
}

.stock-sym {
  font-weight: 800;
  color: var(--text-main);
  font-size: 0.92rem;
}

.stock-name-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.price-pos {
  color: var(--green-gain);
  font-weight: 700;
}

.price-neg {
  color: var(--red-loss);
  font-weight: 700;
}

.row-actions-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.row-action-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.row-action-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-purple);
}

/* Loading Spinner */
.spinner-wrap {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(192, 132, 252, 0.2);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 0.75rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* In-Row Parameter Badge */
.param-badge-btn {
  background: rgba(192, 132, 252, 0.15);
  border: 1px solid var(--border-accent);
  color: var(--accent-lavender);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all var(--transition-fast);
}

.param-badge-btn:hover {
  background: rgba(192, 132, 252, 0.28);
  border-color: var(--accent-purple);
  transform: translateY(-1px);
}

/* Logic Connector Between Rows */
.logic-connector-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0;
  position: relative;
}

.logic-connector-row::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color);
  z-index: 0;
}

.logic-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.2rem;
  gap: 0.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.logic-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.logic-btn.active {
  background: var(--accent-purple);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(192, 132, 252, 0.4);
}

/* Save Scan Button & Modal */
.btn-save-scan {
  background: var(--bg-input);
  border: 1px solid var(--border-accent);
  color: var(--text-main);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.btn-save-scan:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
}

.save-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 5, 23, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.save-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--brand-glow);
  position: relative;
}

.save-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

/* Mobile Bottom-Sheet Drawer — Strictly Scoped to Mobile (<= 768px) */
@media (max-width: 768px) {
  .screener-container {
    padding: 0.85rem 0.65rem 4rem;
  }
  .screen-cards-grid {
    grid-template-columns: 1fr;
  }
  .condition-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .condition-operand-select,
  .condition-operator-select,
  .condition-val-input {
    width: 100%;
    min-height: 44px; /* Touch target */
    font-size: 0.92rem;
  }
  .view-pills {
    width: 100%;
  }
  .view-btn {
    flex: 1;
    justify-content: center;
    min-height: 44px;
  }
  .btn-run-screen {
    min-height: 46px;
  }

  /* Mobile Bottom Sheet Overlay */
  .mobile-bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 5, 23, 0.75);
    backdrop-filter: blur(6px);
    z-index: 2100;
    display: flex;
    align-items: flex-end;
  }

  .mobile-bottom-sheet {
    background: var(--bg-card);
    border-top: 1px solid var(--border-accent);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 1.25rem 1rem 2rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.25s ease-out;
  }

  .bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(216, 180, 254, 0.3);
    border-radius: 2px;
    margin: 0 auto 1rem;
  }

  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

/* Desktop styles explicitly ensure bottom sheet overlay is hidden */
@media (min-width: 769px) {
  .mobile-bottom-sheet-overlay {
    display: none !important;
  }
}

