/* Otray — Bright Global Playground Web App Directory */

:root {
  --bg: #f4f7ff;
  --surface: #ffffff;
  --surface-hover: #ffffff;
  --surface-elevated: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-1: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;
  --ink: #ffffff;
  --white: #0ea5e9;
  --focus: #0ea5e9;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-display: "Fredoka", "Plus Jakarta Sans", -apple-system, sans-serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text-1);
  font-family: var(--font-sans);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 60px;
  background: rgba(9, 9, 11, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1320px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-1);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.top-nav-btn:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.05);
}

.top-nav-btn.active {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.06);
}

.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.header-center {
  flex: 1;
  max-width: 440px;
  min-width: 180px;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.search-wrap:focus-within {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.search-icon {
  position: absolute;
  left: 11px;
  color: var(--text-3);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 100%;
  padding: 0 46px 0 34px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-1);
}

.search-input::placeholder {
  color: var(--text-3);
}

.search-kbd {
  position: absolute;
  right: 9px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-3);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Shared Buttons */
.btn-github,
.btn-solid,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn-github,
.btn-solid {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--white);
  font-weight: 600;
}

.btn-github:hover,
.btn-solid:hover {
  background: #e4e4e7;
  border-color: #e4e4e7;
}

.btn-ghost {
  background: var(--surface);
  color: var(--text-1);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.btn-sm {
  height: 31px;
  padding: 0 11px;
  font-size: 12.5px;
}

.full-btn {
  width: 100%;
  height: 40px;
}

.btn-avatar {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  object-fit: cover;
}

/* Main Container */
.main-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* Editorial Hero */
.catalog-hero {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.hero-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text-1);
}

.hero-sub {
  margin: 0 0 20px;
  max-width: 600px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
}

/* Filter Strip */
.filter-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.filter-track {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-track::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  height: 31px;
  padding: 0 13px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  color: var(--text-1);
  border-color: var(--border-strong);
}

.filter-chip.active {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
  font-weight: 600;
}

.catalog-meta {
  flex-shrink: 0;
  font-size: 12.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* Directory Card Grid (Typography-First, Zero Empty Covers) */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.app-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.app-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-avatar-wrap {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  overflow: hidden;
  background: #18181c;
  border: 1px solid rgba(255, 255, 255, 0.09);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.app-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-monogram {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-2);
}

.app-card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-cat-pill {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 2px 8px;
  line-height: 1.5;
}

.app-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.app-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.app-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40.5px;
}

.app-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.app-meta-host {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-run-cue {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.app-run-cue svg {
  transition: transform 0.15s ease;
}

.app-card:hover .app-run-cue {
  color: var(--text-1);
}

.app-card:hover .app-run-cue svg {
  transform: translate(1px, -1px);
}

/* Empty State */
.empty-state {
  padding: 64px 20px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.empty-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}

.empty-sub {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--text-2);
}

/* Theater Stage Overlay */
.theater-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.theater-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 54px;
  padding: 0 20px;
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.theater-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.theater-identity {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.theater-app-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theater-app-author {
  font-size: 12.5px;
  color: var(--text-3);
  white-space: nowrap;
}

.theater-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theater-workspace {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.stage-box {
  position: relative;
  width: 100%;
  height: min(74vh, 780px);
  min-height: 460px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stage-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

.stage-loader,
.stage-fallback {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #09090b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

.loader-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.loader-label {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
}

.stage-fallback h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.stage-fallback p {
  margin: 0 0 6px;
  max-width: 420px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.theater-meta-bar {
  margin-top: 18px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.theater-creator-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.theater-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.theater-creator-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.theater-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 3px;
}

.meta-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
}

.meta-text {
  font-size: 12.5px;
  color: var(--text-2);
}

.meta-link {
  font-size: 12.5px;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.meta-link:hover {
  color: var(--text-1);
}

.theater-tagline {
  margin: 0 0 6px;
  font-size: 14.5px;
  color: var(--text-1);
  line-height: 1.5;
}

.theater-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
}

.theater-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rail-header {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.rail-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.rail-thumb-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  background: #18181c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.rail-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-info {
  min-width: 0;
  flex: 1;
}

.rail-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.dialog-panel {
  width: 100%;
  max-width: 460px;
  background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.dialog-panel-wide {
  max-width: 580px;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.dialog-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dialog-header h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.gh-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px 3px 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-2);
}

.gh-user-pill img {
  width: 18px;
  height: 18px;
  border-radius: 999px;
}

.gh-logout-link {
  padding: 0 0 0 6px;
  background: none;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--text-3);
  font-size: 11.5px;
  cursor: pointer;
}

.gh-logout-link:hover {
  color: var(--text-1);
}

.icon-close-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-2);
  cursor: pointer;
}

.icon-close-btn:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.06);
}

.dialog-body {
  padding: 20px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

.dialog-input {
  flex: 1;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-1);
  outline: none;
}

.dialog-input:focus {
  border-color: var(--border-strong);
}

.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.cli-code-box {
  flex: 1;
  min-width: 0;
  padding: 8px 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  overflow-x: auto;
  white-space: nowrap;
}

.connect-lead {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
}

.connect-lead code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

.connect-divider {
  position: relative;
  text-align: center;
  margin: 18px 0 14px;
}

.connect-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}

.connect-divider span {
  position: relative;
  padding: 0 10px;
  background: #111114;
  font-size: 11.5px;
  color: var(--text-3);
}

.connect-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
}

.setup-code-wrap {
  margin-top: 16px;
}

/* GitHub 1-Click Repo Picker */
.picker-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.picker-filter-group {
  display: inline-flex;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-shrink: 0;
}

.picker-pill {
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.picker-pill.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-1);
}

.repo-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 2px;
}

.repo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.repo-row-main {
  min-width: 0;
  flex: 1;
}

.repo-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-1);
}

.repo-row-desc {
  margin: 3px 0 6px;
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-3);
}

.repo-url-tag {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feedback-toast {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-1);
}

.feedback-toast.error {
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.feedback-toast.success {
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.otray-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 10px);
  z-index: 100;
  padding: 9px 16px;
  background: #fafafa;
  color: #09090b;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.otray-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Responsive */
@media (max-width: 1080px) {
  .apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .theater-workspace {
    grid-template-columns: 1fr;
  }
  .theater-rail {
    order: 2;
  }
}

@media (max-width: 680px) {
  .header-inner {
    padding: 0 14px;
    gap: 10px;
  }
  .top-nav {
    display: none;
  }
  .search-kbd {
    display: none;
  }
  .main-shell {
    padding: 0 14px 64px;
  }
  .catalog-hero {
    padding: 24px 0 20px;
  }
  .apps-grid {
    grid-template-columns: 1fr;
  }
  .btn-github span {
    display: none;
  }
  .btn-github {
    padding: 0 10px;
  }
}

.catalog-hero {
  padding: 28px 0 20px;
}

.ad-slot-card {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.ad-slot-card:has(.ad-slot-body:empty) {
  display: none;
}

.ad-slot-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #71717a;
  margin-bottom: 8px;
}

.site-footer {
  margin-top: 48px;
  padding: 20px 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: #71717a;
}

.site-footer a {
  color: #a1a1aa;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fafafa;
}


/* === Bright Global Playground Theme (v54) === */
body.otray-body {
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.11), transparent 36%),
    radial-gradient(circle at 88% 4%, rgba(249, 115, 22, 0.10), transparent 34%),
    var(--bg);
}

.header {
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1.5px solid var(--border);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.top-nav-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
  color: #475569;
}

.top-nav-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.top-nav-btn.active {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #bae6fd;
}

.nav-count {
  background: #ffffff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.search-input {
  height: 40px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  color: #0f172a;
  font-weight: 500;
}

.search-input:focus {
  background: #ffffff;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

.search-input::placeholder {
  color: #64748b;
}

.search-kbd {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #64748b;
}

.catalog-hero {
  margin-top: 20px;
  padding: 26px 28px;
  border-radius: 22px;
  border: 1.5px solid #dbeafe;
  background: linear-gradient(135deg, #e0f2fe 0%, #fff7ed 52%, #f3e8ff 100%);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.08);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 8px;
}

.hero-sub {
  margin: 0;
  font-size: 15.5px;
  font-weight: 500;
  color: #334155;
  max-width: 680px;
}

.filter-strip {
  margin-top: 18px;
  margin-bottom: 20px;
}

.filter-chip {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.03);
}

.filter-chip:hover {
  border-color: #0ea5e9;
  color: #0284c7;
  transform: translateY(-1px);
}

.filter-chip.active {
  background: #0ea5e9;
  color: #ffffff;
  border-color: #0ea5e9;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.28);
}

.catalog-meta {
  font-weight: 600;
  color: #475569;
}

/* Joyful Tactile Cards */
.apps-grid {
  gap: 18px;
}

.app-card {
  padding: 0;
  gap: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.app-card:hover {
  background: #ffffff;
  border-color: #38bdf8;
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.14);
}

.app-card-banner {
  padding: 16px 16px 14px;
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
  position: relative;
}

.app-card[data-theme="games"] .app-card-banner {
  background: linear-gradient(135deg, #ff6b4a 0%, #ff9f43 100%);
}

.app-card[data-theme="creative"] .app-card-banner {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

.app-card[data-theme="music"] .app-card-banner {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
}

.app-card[data-theme="utilities"] .app-card-banner {
  background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
}

.app-card[data-theme="developer"] .app-card-banner {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.app-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #ffffff;
  border: 2.5px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
}

.app-monogram {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.app-cat-pill {
  background: rgba(255, 255, 255, 0.92);
  border: none;
  color: #0f172a;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
}

.app-stars {
  background: rgba(15, 23, 42, 0.22);
  color: #ffffff;
  border-radius: 999px;
  padding: 3px 9px;
  font-weight: 600;
}

.app-card-body {
  padding: 14px 16px 10px;
}

.app-title {
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 600;
  color: #0f172a;
}

.app-desc {
  color: #475569;
  font-size: 13.5px;
}

.app-card-foot {
  padding: 10px 16px 14px;
  border-top: 1px solid #f1f5f9;
}

.app-meta-host {
  color: #64748b;
  font-weight: 500;
}

.app-run-cue {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 700;
  font-size: 12.5px;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.app-card[data-theme="games"] .app-run-cue {
  background: #ffedd5;
  color: #ea580c;
}

.app-card[data-theme="creative"] .app-run-cue {
  background: #f3e8ff;
  color: #9333ea;
}

.app-card[data-theme="music"] .app-run-cue {
  background: #d1fae5;
  color: #059669;
}

.app-card:hover .app-run-cue {
  background: #0ea5e9;
  color: #ffffff;
  transform: scale(1.04);
}

.app-card[data-theme="games"]:hover .app-run-cue {
  background: #f97316;
  color: #ffffff;
}

.app-card[data-theme="creative"]:hover .app-run-cue {
  background: #9333ea;
  color: #ffffff;
}

.app-card[data-theme="music"]:hover .app-run-cue {
  background: #10b981;
  color: #ffffff;
}

/* Theater Stage Light Surface */
.theater-overlay {
  background: #f1f5f9;
}

.theater-topbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1.5px solid #e2e8f0;
}

.theater-app-title,
.theater-creator-name,
.rail-header,
.dialog-header h2 {
  color: #0f172a;
}

.theater-app-author,
.theater-tagline,
.theater-desc,
.meta-text {
  color: #475569;
}

.btn-ghost {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
  font-weight: 600;
}

.btn-ghost:hover {
  background: #f8fafc;
  border-color: #0ea5e9;
  color: #0284c7;
}

.btn-solid {
  background: #0ea5e9;
  color: #ffffff;
  border: 1.5px solid #0ea5e9;
}

.btn-solid:hover {
  background: #0284c7;
  border-color: #0284c7;
}

.theater-meta-bar,
.rail-item,
.dialog-panel,
.ad-slot-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  color: #0f172a;
}

.dialog-input {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #0f172a;
}

.site-footer {
  border-top: 1.5px solid #e2e8f0;
  color: #64748b;
}

.site-footer a {
  color: #475569;
  font-weight: 600;
}

.site-footer a:hover {
  color: #0ea5e9;
}


/* === Clean Bright White + 16:9 Thumbnail Grid (v58) === */
body.otray-body {
  background: #f8fafc;
}

.header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: none;
}

.top-nav-btn.active {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.nav-count {
  background: #e2e8f0;
  color: #0f172a;
  border: none;
}

.catalog-hero {
  margin-top: 16px;
  padding: 20px 24px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
  margin-bottom: 6px;
}

.hero-sub {
  font-size: 14.5px;
  color: #475569;
}

.filter-chip {
  height: 34px;
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  box-shadow: none;
}

.filter-chip:hover {
  border-color: #94a3b8;
  color: #0f172a;
  transform: none;
}

.filter-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: none;
}

/* Clean 16:9 Thumbnail Cards */
.apps-grid {
  gap: 18px;
}

.app-card {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.app-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.app-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
  overflow: hidden;
  border-bottom: 1px solid #e2e8f0;
}

.app-thumb-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.app-card:hover .app-thumb-img {
  transform: scale(1.03);
}

.app-thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.app-thumb-fallback .app-monogram {
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: -0.02em;
}

.app-thumb-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-size: 11px;
  font-weight: 600;
}

.app-card-body {
  padding: 13px 15px 8px;
}

.app-title {
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
}

.app-desc {
  font-size: 13px;
  color: #475569;
  min-height: 39px;
}

.app-card-foot {
  padding: 9px 15px 12px;
  border-top: 1px solid #f1f5f9;
}

.app-meta-host {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
}

.app-meta-host svg {
  flex-shrink: 0;
  color: #f59e0b;
}

.app-run-cue,
.app-card[data-theme] .app-run-cue {
  padding: 4px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
}

.app-card:hover .app-run-cue,
.app-card[data-theme]:hover .app-run-cue {
  background: #2563eb;
  color: #ffffff;
  transform: none;
}


/* === Compact 1-Line Hero Bar (v59) === */
.catalog-hero {
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 11px 16px;
  border-radius: 12px;
}

.hero-content {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.hero-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.hero-sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: #475569;
  max-width: none;
}

.filter-strip {
  margin-top: 0;
  margin-bottom: 14px;
}


/* === Hero Dismiss + 1-Click Card Save (v60) === */
.catalog-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-dismiss-btn {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 15px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.hero-dismiss-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.filter-strip {
  padding-top: 14px;
}

.app-thumb-save {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #475569;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.app-thumb-save:hover {
  transform: scale(1.08);
  color: #0f172a;
  background: #ffffff;
}

.app-thumb-save.saved {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}


/* === Sleek Borderless Category Chips (YouTube-clean, v61) === */
.filter-track {
  gap: 8px;
}

.filter-chip {
  height: 32px;
  padding: 0 13px;
  border-radius: 8px;
  border: none;
  background: #edf1f7;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.filter-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.filter-chip.active {
  background: #0f172a;
  color: #ffffff;
}


/* === Theater Bottom-Right Share/Save + Clean Share Dialog (v62) === */
.stage-box {
  position: relative;
}

.stage-fs-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 6;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.68);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.78;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.stage-fs-btn:hover {
  opacity: 1;
  transform: scale(1.05);
}

.theater-meta-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.theater-stage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.stage-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: none;
  background: #eef2f6;
  color: #0f172a;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.stage-action-pill:hover {
  background: #e2e8f0;
}

.meta-link {
  color: #64748b;
  text-decoration: none;
}

.meta-link:hover {
  color: #0f172a;
  text-decoration: underline;
}

/* Clean Share Dialog */
.share-panel {
  max-width: 420px;
  border-radius: 18px;
  padding: 18px 20px 20px;
}

.share-targets {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.share-target-pill {
  flex: 1;
  height: 38px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.share-target-pill:hover {
  background: #e2e8f0;
}

.share-link-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 5px 5px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

.share-link-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #0f172a;
  font-size: 13px;
  outline: none;
}

.share-copy-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 16px;
  border-radius: 8px;
  border: none;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.share-copy-btn:hover {
  background: #1e293b;
}


/* === Share Modal Brand Icons (v64) === */
.share-target-pill {
  flex-direction: column;
  height: auto;
  padding: 10px 8px;
  gap: 6px;
  font-size: 12px;
  border: none;
  cursor: pointer;
  background: transparent;
}

.share-target-pill:hover {
  background: #f1f5f9;
}

.share-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
}

.share-icon-x {
  background: #0f172a;
}

.share-icon-dc {
  background: #5865f2;
}

.share-icon-rd {
  background: #ff4500;
}


/* === YouTube-Style Brand Header + Stage App Title Below Player (v66) === */
.theater-brand-btn {
  border: none;
  background: transparent;
  padding: 4px 6px;
  border-radius: 10px;
  cursor: pointer;
}

.theater-brand-btn:hover {
  background: #f1f5f9;
}

.theater-stage-title {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #0f172a;
}
