/* Terminal Lux unified theme (single visual layer) */

html body.open-collection-ui,
html body.open-collection-ui.theme-dark,
html body.open-collection-ui.theme-light,
html[data-theme="dark"] body.open-collection-ui,
html[data-theme="light"] body.open-collection-ui,
body.theme-dark.open-collection-ui,
body.theme-light.open-collection-ui {
  --bg: #04070d !important;
  --bg-2: #070f1b !important;
  --glass: rgba(8, 18, 32, 0.9) !important;
  --glass-strong: rgba(9, 20, 36, 0.94) !important;
  --glass-border: rgba(95, 142, 206, 0.32) !important;
  --glass-hover: rgba(14, 27, 46, 0.94) !important;
  --text: #ebf4ff !important;
  --text-2: rgba(188, 207, 233, 0.8) !important;
  --text-3: rgba(162, 185, 214, 0.68) !important;
  --blue: #3ea0ff !important;
  --blue-soft: rgba(62, 160, 255, 0.16) !important;
  --star-color: #ffb347 !important;
  --separator: rgba(95, 142, 206, 0.24) !important;
  --input-bg: rgba(10, 23, 40, 0.86) !important;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.42) !important;
  background:
    radial-gradient(120% 88% at -14% 10%, rgba(20, 80, 150, 0.26), transparent 54%),
    radial-gradient(110% 85% at 108% 16%, rgba(76, 28, 130, 0.2), transparent 52%),
    linear-gradient(180deg, #050b14 0%, #03060c 100%) !important;
  color: var(--text) !important;
}

html body.open-collection-ui .ambient {
  display: none !important;
}

html body.open-collection-ui .page-shell,
html body.open-collection-ui .miniapp-shell {
  position: relative !important;
  z-index: 1 !important;
}

html body.open-collection-ui .panel,
html body.open-collection-ui .miniapp-head,
html body.open-collection-ui .miniapp-view-wrap {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Header */
html body.open-collection-ui .oc-topbar,
html body.open-collection-ui header.oc-topbar {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  min-height: 58px !important;
  padding: 10px 18px !important;
  border-radius: 0 !important;
  border: 1px solid rgba(99, 147, 213, 0.34) !important;
  border-left: none !important;
  border-right: none !important;
  background: linear-gradient(92deg, rgba(6, 14, 27, 0.94) 0%, rgba(8, 17, 32, 0.92) 62%, rgba(24, 15, 42, 0.9) 100%) !important;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(170, 208, 255, 0.1) !important;
  backdrop-filter: saturate(145%) blur(16px) !important;
  -webkit-backdrop-filter: saturate(145%) blur(16px) !important;
  z-index: 220 !important;
}

html body.open-collection-ui .oc-topbar::before,
html body.open-collection-ui .oc-topbar::after,
html body.open-collection-ui header.oc-topbar::before,
html body.open-collection-ui header.oc-topbar::after {
  content: none !important;
  display: none !important;
}

html body.open-collection-ui .oc-topbar-title {
  color: rgba(238, 246, 255, 0.98) !important;
  font-size: 33px !important;
  line-height: 1 !important;
  font-weight: 650 !important;
  letter-spacing: -0.12px !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.34) !important;
}

html body.open-collection-ui .oc-topbar-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

html body.open-collection-ui .oc-topbar .oc-icon-button {
  width: 42px !important;
  height: 42px !important;
  border-radius: 11px !important;
  border: 1px solid rgba(122, 173, 236, 0.42) !important;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.9), rgba(8, 17, 31, 0.88)) !important;
  color: rgba(224, 240, 255, 0.96) !important;
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(190, 221, 255, 0.16) !important;
}

html body.open-collection-ui .oc-topbar .oc-icon-button svg {
  color: rgba(226, 242, 255, 0.98) !important;
}

html body.open-collection-ui .theme-toggle,
html body.open-collection-ui .oc-topbar .oc-icon-button:last-child {
  display: none !important;
}

/* Hero */
html body.open-collection-ui .miniapp-head {
  margin-top: 0 !important;
  padding: 16px 18px 8px !important;
}

html body.open-collection-ui .hero-eyebrow,
html body.open-collection-ui .miniapp-head-top {
  color: rgba(73, 169, 255, 0.97) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  margin: 0 0 6px !important;
}

html body.open-collection-ui .miniapp-head h1,
html body.open-collection-ui .miniapp-title-group h1 {
  margin: 0 0 8px !important;
  font-size: 64px !important;
  line-height: 0.95 !important;
  font-weight: 760 !important;
  letter-spacing: -0.02em !important;
  color: #f2f8ff !important;
}

html body.open-collection-ui .miniapp-head .title-accent {
  color: var(--blue) !important;
}

html body.open-collection-ui .miniapp-head .brand-note,
html body.open-collection-ui .miniapp-head p:not(.hero-eyebrow):not(.miniapp-head-top),
html body.open-collection-ui .miniapp-hero-grid p {
  margin: 0 !important;
  color: var(--text-2) !important;
  font-size: 16px !important;
  line-height: 1.28 !important;
  max-width: 320px !important;
}

html body.open-collection-ui .mini-head-actions,
html body.open-collection-ui .mini-head-controls .mini-head-actions {
  display: none !important;
}

html body.open-collection-ui .mini-head-controls {
  display: block !important;
  margin-top: 12px !important;
}

html body.open-collection-ui .mini-search-wrap {
  display: block !important;
}

html body.open-collection-ui .mini-search-wrap input,
html body.open-collection-ui input[type="search"] {
  width: 100% !important;
  height: 46px !important;
  padding: 0 14px 0 44px !important;
  border-radius: 11px !important;
  border: 1px solid rgba(96, 143, 208, 0.38) !important;
  background: linear-gradient(180deg, rgba(11, 24, 42, 0.9), rgba(9, 20, 36, 0.88)) !important;
  color: #ebf4ff !important;
  box-shadow: inset 0 1px 0 rgba(176, 213, 255, 0.09) !important;
  font-size: 15px !important;
}

/* Sections */
html body.open-collection-ui .mini-route-head,
html body.open-collection-ui .post-route-head {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 10px 18px 8px !important;
  margin: 0 !important;
}

html body.open-collection-ui .mini-route-head::before,
html body.open-collection-ui .mini-route-head::after,
html body.open-collection-ui .latest-section::before,
html body.open-collection-ui .latest-section::after,
html body.open-collection-ui .latest-feed::before,
html body.open-collection-ui .latest-feed::after,
html body.open-collection-ui .latest-feed-grid::before,
html body.open-collection-ui .latest-feed-grid::after {
  content: none !important;
  display: none !important;
}

html body.open-collection-ui .mini-route-head h2,
html body.open-collection-ui .mini-route-head h3,
html body.open-collection-ui .post-route-head h2,
html body.open-collection-ui .post-route-head h3 {
  margin: 0 !important;
  font-size: 44px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  color: #eef6ff !important;
}

html body.open-collection-ui .latest-section,
html body.open-collection-ui .folders-section {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Home grids */
html body.open-collection-ui .latest-feed.feed-grid,
html body.open-collection-ui .latest-feed.uniform-cards-grid,
html body.open-collection-ui .latest-feed-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 0 18px 8px !important;
  margin: 0 !important;
  background: transparent !important;
}

html body.open-collection-ui .folder-feed-grid,
html body.open-collection-ui .feed-grid.folder-feed-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  padding: 0 18px 16px !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Cards */
html body.open-collection-ui .feed-card,
html body.open-collection-ui .folder-card,
html body.open-collection-ui .latest-feed-card,
html body.open-collection-ui .continue-card,
html body.open-collection-ui .continue-reading-card {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  background: linear-gradient(180deg, rgba(9, 20, 36, 0.96), rgba(7, 16, 31, 0.96)) !important;
  border: 1px solid rgba(98, 145, 208, 0.32) !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(173, 208, 249, 0.08) !important;
  backdrop-filter: blur(8px) saturate(118%) !important;
  -webkit-backdrop-filter: blur(8px) saturate(118%) !important;
}

html body.open-collection-ui .feed-card .feed-card-body,
html body.open-collection-ui .post-card .feed-card-body,
html body.open-collection-ui .folder-card .feed-card-body {
  gap: 8px !important;
}

html body.open-collection-ui .feed-card .feed-card-body h3,
html body.open-collection-ui .post-card .feed-card-body h3,
html body.open-collection-ui .folder-card .feed-card-body h3 {
  color: #ebf4ff !important;
  font-size: 16px !important;
  font-weight: 680 !important;
  line-height: 1.24 !important;
}

html body.open-collection-ui .feed-card .feed-card-body p,
html body.open-collection-ui .post-card .feed-card-body p,
html body.open-collection-ui .folder-card .feed-card-body p,
html body.open-collection-ui .folder-meta,
html body.open-collection-ui .folder-post-count,
html body.open-collection-ui .post-card-meta,
html body.open-collection-ui .post-card-meta * {
  color: var(--text-3) !important;
}

html body.open-collection-ui .folder-card-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  background: rgba(14, 32, 55, 0.84) !important;
  border: 1px solid rgba(99, 148, 212, 0.38) !important;
}

/* Folder and article surfaces */
html body.open-collection-ui .plist-inner,
html body.open-collection-ui .rule,
html body.open-collection-ui .post-comments-panel,
html body.open-collection-ui .post-comments,
html body.open-collection-ui .comment-item,
html body.open-collection-ui .post-showcase,
html body.open-collection-ui .post-media,
html body.open-collection-ui .art-description,
html body.open-collection-ui .post-description {
  background: linear-gradient(180deg, rgba(9, 20, 36, 0.96), rgba(7, 16, 31, 0.96)) !important;
  border: 1px solid rgba(98, 145, 208, 0.32) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(173, 208, 249, 0.08) !important;
}

/* Buttons */
html body.open-collection-ui .feed-button,
html body.open-collection-ui .folder-open-button,
html body.open-collection-ui .bm-btn,
html body.open-collection-ui [data-comment-submit],
html body.open-collection-ui .comment-actions-row button {
  background: linear-gradient(180deg, #49a8ff 0%, #308ffd 100%) !important;
  border: 1px solid rgba(166, 217, 255, 0.46) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(31, 106, 188, 0.34), inset 0 1px 0 rgba(227, 244, 255, 0.24) !important;
}

html body.open-collection-ui .tag-chip,
html body.open-collection-ui .chip,
html body.open-collection-ui .search-filter-chip,
html body.open-collection-ui .filter-chip,
html body.open-collection-ui .art-pill,
html body.open-collection-ui .action-btn {
  background: rgba(14, 30, 50, 0.84) !important;
  border: 1px solid rgba(92, 140, 204, 0.3) !important;
  color: var(--text-2) !important;
}

html body.open-collection-ui .tag-chip.is-active,
html body.open-collection-ui .chip.on,
html body.open-collection-ui .search-filter-chip.is-active,
html body.open-collection-ui .filter-chip.is-active,
html body.open-collection-ui .art-pill.on {
  background: var(--blue) !important;
  border-color: rgba(172, 220, 255, 0.68) !important;
  color: #ffffff !important;
}

/* Star colors */
html body.open-collection-ui .rating-star,
html body.open-collection-ui .star-btn {
  color: rgba(188, 207, 234, 0.46) !important;
}

html body.open-collection-ui .rating-star.active,
html body.open-collection-ui .rating-star.filled,
html body.open-collection-ui .rating-star.lit,
html body.open-collection-ui .star-btn.active,
html body.open-collection-ui .star-btn.filled,
html body.open-collection-ui .star-btn.lit {
  color: var(--star-color) !important;
}

/* Reading bar / floating */
html body.open-collection-ui .art-bottom-bar,
html body.open-collection-ui .bookmark-bar,
html body.open-collection-ui #floatingReaderHost .reading-float.bm-bar,
html body.open-collection-ui .reading-float.bm-bar {
  background: rgba(8, 18, 32, 0.9) !important;
  border: 1px solid rgba(98, 145, 208, 0.34) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45) !important;
}

/* Recommendations section compact and aligned */
html body.open-collection-ui .post-recommendations .mini-route-head {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Keep spacing tight */
html body.open-collection-ui .latest-section,
html body.open-collection-ui .latest-feed,
html body.open-collection-ui .folders-section,
html body.open-collection-ui .folder-feed-grid {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
