/* OpenArt-matched creator UI (desktop + mobile) */

:root {
  --oa-bg: #000000;
  --oa-panel: #0d0d0d;
  --oa-panel-2: #161616;
  --oa-elev: #1a1a1a;
  --oa-border: rgba(255, 255, 255, 0.08);
  --oa-text: #ffffff;
  --oa-muted: #9a9a9a;
  --oa-pink: #ff2d8f;
  --oa-pink-2: #ff4db8;
  --oa-green: #22c55e;
  --oa-sidebar: 232px;
  --oa-studio-w: 380px;
  --oa-radius: 14px;
  --oa-radius-lg: 20px;
  --sidebar-w: var(--oa-sidebar);
  --bg: var(--oa-bg);
  --panel: var(--oa-panel-2);
  --primary: var(--oa-pink);
  --primary-2: var(--oa-pink-2);
}

html, body {
  background: var(--oa-bg) !important;
  color: var(--oa-text);
}

.app-shell {
  background: var(--oa-bg);
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}

/* —— Sidebar (OpenArt) —— */
.sidebar {
  width: var(--sidebar-w);
  background: #050505 !important;
  border-right: 1px solid var(--oa-border) !important;
  padding: 0;
}

.sidebar-top {
  padding: 18px 16px 10px !important;
  border-bottom: none !important;
}

.brand {
  gap: 10px;
  padding: 0 !important;
  min-height: auto !important;
}

.brand-text small { display: none; }
.brand-text strong {
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.workspace-selector {
  margin-top: 12px !important;
  padding: 8px 10px !important;
  border-radius: 999px !important;
  background: var(--oa-elev) !important;
  border: 1px solid var(--oa-border) !important;
  font-size: 12px !important;
}

.sidebar-nav {
  padding: 8px 10px 20px !important;
  overflow: auto;
}

.nav-section {
  margin: 18px 8px 8px !important;
  font-size: 11px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b6b6b !important;
  font-weight: 600;
}

.nav-link {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  color: #d4d4d4 !important;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.nav-link .nav-ico {
  width: 20px;
  height: 20px;
  opacity: 0.9;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #fff !important;
}

.nav-link.is-active {
  background: rgba(255, 45, 143, 0.08) !important;
  border-color: rgba(255, 45, 143, 0.55) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(255, 45, 143, 0.15), 0 0 24px rgba(255, 45, 143, 0.12);
}

.sidebar-footer {
  border-top: 1px solid var(--oa-border) !important;
  padding: 12px !important;
}
@media (min-width: 901px) {
  .sidebar-footer .btn { border-radius: 999px !important; }
}

/* Soften old home hero media so OpenArt title leads */
.home-hero-media,
.home-hero-video { display: none !important; }
.home-hero .eyebrow { display: none; }


.app-shell.sidebar-collapsed { --sidebar-w: 72px; }

/* —— Top bars —— */
.desktop-topbar {
  height: 56px !important;
  padding: 0 20px !important;
  background: rgba(0, 0, 0, 0.72) !important;
  border-bottom: 1px solid var(--oa-border) !important;
  backdrop-filter: blur(20px);
  justify-content: flex-end !important;
}

.desktop-topbar .topbar-left { margin-right: auto; }

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

.oa-top-link {
  color: var(--oa-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 8px;
}
.oa-top-link:hover { color: #fff; }

.btn-login-ghost {
  background: transparent;
  border: 1px solid var(--oa-border);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 13px;
}

.btn-start-free,
.btn.btn-primary {
  background: linear-gradient(135deg, var(--oa-pink), #ff5aad) !important;
  border: none !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 24px rgba(255, 45, 143, 0.35);
}

.btn-upgrade-green {
  background: var(--oa-green) !important;
  color: #04140a !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 7px 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.credit-pill {
  background: rgba(34, 197, 94, 0.12) !important;
  border: 1px solid rgba(34, 197, 94, 0.35) !important;
  color: #86efac !important;
  border-radius: 999px !important;
  font-weight: 700;
}

.avatar-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: #3b2a1a !important;
  border: 1px solid var(--oa-border) !important;
  font-weight: 700;
}

.content {
  padding: 24px 28px 48px !important;
  max-width: none !important;
  background: var(--oa-bg);
}

/* —— Home (OpenArt) —— */
.oa-home {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 48px;
}

.oa-home-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 28px;
  line-height: 1.15;
}

.oa-mode-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 auto 36px;
  padding: 8px;
  width: fit-content;
  max-width: 100%;
  background: var(--oa-panel-2);
  border: 1px solid var(--oa-border);
  border-radius: 999px;
}

.oa-mode-bar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #ddd;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.oa-mode-bar a:hover,
.oa-mode-bar a.is-active {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.oa-mode-bar .nav-ico { width: 18px; height: 18px; }
.oa-badge-new {
  font-size: 10px;
  font-weight: 800;
  background: var(--oa-green);
  color: #04140a;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 4px;
}

.oa-promo-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}

.oa-promo-card {
  position: relative;
  border-radius: var(--oa-radius-lg);
  overflow: hidden;
  min-height: 140px;
  background: var(--oa-elev);
  border: 1px solid var(--oa-border);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  background-size: cover;
  background-position: center;
}
.oa-promo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,0.85));
}
.oa-promo-card > * { position: relative; z-index: 1; }
.oa-promo-card strong { font-size: 14px; }
.oa-promo-card span { font-size: 12px; color: #bbb; }

.oa-feed-title {
  font-size: 1.15rem;
  margin: 0 0 14px;
  font-weight: 700;
}

.oa-masonry {
  columns: 4 220px;
  column-gap: 12px;
}
.oa-masonry article {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--oa-elev);
  border: 1px solid var(--oa-border);
}
.oa-masonry img {
  width: 100%;
  display: block;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #111;
}
.oa-masonry figcaption {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
}

/* —— Studio OpenArt layout —— */
.studio-v2.studio-layout {
  display: grid !important;
  grid-template-columns: minmax(300px, var(--oa-studio-w)) minmax(0, 1fr) !important;
  gap: 0 !important;
  min-height: calc(100vh - 120px);
  border: 1px solid var(--oa-border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--oa-panel);
}

.studio-v2 .studio-panel {
  background: #0a0a0a;
  border-right: 1px solid var(--oa-border);
  padding: 16px;
  overflow: auto;
  max-height: calc(100vh - 120px);
}

.studio-v2 .canvas-panel {
  background: #000;
  padding: 16px;
  overflow: auto;
  max-height: calc(100vh - 120px);
}

.studio-v2 .tool-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.studio-v2 .tool-tab {
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid var(--oa-border);
  background: var(--oa-elev);
  color: #ccc;
  font-weight: 600;
  text-align: center;
}
.studio-v2 .tool-tab.is-active {
  border-color: rgba(255, 45, 143, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 45, 143, 0.25), 0 0 28px rgba(255, 45, 143, 0.15);
  color: #fff;
  background: rgba(255, 45, 143, 0.08);
}

.studio-v2 .studio-actions {
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  background: linear-gradient(180deg, transparent, #0a0a0a 30%);
}
.studio-v2 .studio-actions .btn-primary {
  width: 100%;
  min-height: 48px;
  font-size: 15px;
}

.studio-v2 .dropzone {
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 16px;
  background: #111;
  padding: 28px 16px;
  text-align: center;
}

/* Floating mode dock (desktop studio) */
.oa-mode-dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 55;
  display: none;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid var(--oa-border);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
body.is-studio .oa-mode-dock { display: flex; }
.oa-mode-dock a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #bbb;
}
.oa-mode-dock a:hover,
.oa-mode-dock a.is-active {
  background: rgba(255, 45, 143, 0.15);
  color: #fff;
}

/* —— Mobile —— */
.mobile-topbar {
  height: 56px !important;
  padding: 0 10px !important;
  background: #000 !important;
  border-bottom: 1px solid var(--oa-border) !important;
}
.mobile-topbar .mobile-logo strong { font-size: 1rem; }
.mobile-topbar .topbar-actions { gap: 6px; }

.mobile-nav {
  height: calc(64px + env(safe-area-inset-bottom)) !important;
  background: rgba(0, 0, 0, 0.96) !important;
  border-top: 1px solid var(--oa-border) !important;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav a {
  color: #888 !important;
  font-size: 10px !important;
  gap: 2px !important;
}
.mobile-nav a.is-active { color: var(--oa-pink) !important; background: transparent !important; }
.mobile-nav .nav-create { transform: translateY(-14px); }
.create-orb {
  width: 56px !important;
  height: 56px !important;
  background: radial-gradient(circle at 30% 30%, #ff7ec8, var(--oa-pink)) !important;
  box-shadow: 0 10px 30px rgba(255, 45, 143, 0.55) !important;
}

/* Create radial sheet (OpenArt mobile) */
#createSheet.bottom-sheet {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  max-height: none !important;
}
#createSheet .bottom-sheet__head,
#createSheet .bottom-sheet__handle { display: none !important; }
#createSheet .bottom-sheet__body {
  padding: 0 !important;
  overflow: visible !important;
}
.oa-create-arc {
  position: relative;
  width: min(360px, 92vw);
  height: 220px;
  margin: 0 auto 24px;
}
.oa-create-arc__center {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: #222;
  color: #fff;
  font-size: 22px;
  z-index: 2;
}
.oa-create-arc a {
  position: absolute;
  width: 64px;
  display: grid;
  place-items: center;
  gap: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}
.oa-create-arc a .oa-arc-ico {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--oa-elev);
  border: 1px solid var(--oa-border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.oa-create-arc a:nth-child(1) { left: 8%; bottom: 36px; }
.oa-create-arc a:nth-child(2) { left: 22%; bottom: 110px; }
.oa-create-arc a:nth-child(3) { left: 42%; bottom: 150px; }
.oa-create-arc a:nth-child(4) { left: auto; right: 42%; bottom: 150px; margin-left: -32px; left: 58%; }
.oa-create-arc a:nth-child(5) { right: 22%; bottom: 110px; left: auto; }
.oa-create-arc a:nth-child(6) { right: 8%; bottom: 36px; left: auto; }

/* Tools 2-col cards */
.tools-2col,
.tool-catalog.tools-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
.tool-touch-card,
.create-hub-card {
  border-radius: 16px !important;
  overflow: hidden;
  background: var(--oa-elev) !important;
  border: 1px solid var(--oa-border) !important;
  min-height: 120px;
  padding: 12px !important;
}

/* Assets empty */
.asset-empty {
  text-align: center;
  padding: 64px 20px;
}
.asset-empty-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  border-radius: 22px;
  background: linear-gradient(145deg, #ff4db8, #c2185b);
  display: grid;
  place-items: center;
  font-size: 36px;
  box-shadow: 0 16px 40px rgba(255, 45, 143, 0.35);
}
.asset-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--oa-border);
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}
.asset-tab {
  padding: 12px 14px;
  white-space: nowrap;
  color: #888;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid transparent;
}
.asset-tab.is-active {
  color: #fff;
  border-bottom-color: var(--oa-pink);
}

.site-footer { display: none; }

@media (max-width: 1100px) {
  .oa-promo-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oa-masonry { columns: 3 180px; }
}

@media (max-width: 900px) {
  .oa-home { padding-top: 16px; }
  .oa-home-title { font-size: 1.55rem; margin-bottom: 18px; }
  .oa-mode-bar {
    width: 100%;
    border-radius: 16px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .oa-promo-row { grid-template-columns: 1fr 1fr; }
  .oa-masonry { columns: 2 140px; }
  .studio-v2.studio-layout {
    grid-template-columns: 1fr !important;
    border: 0;
    border-radius: 0;
  }
  .studio-v2 .studio-panel,
  .studio-v2 .canvas-panel {
    max-height: none;
  }
  body.is-studio .oa-mode-dock { display: none; }
  .content {
    padding: 14px 12px calc(var(--mobile-nav-h, 72px) + 24px) !important;
  }
}

@media (min-width: 901px) {
  #createSheet.bottom-sheet {
    background: color-mix(in srgb, var(--card, #151522) 96%, #000) !important;
    border: 1px solid var(--border) !important;
  }
  #createSheet .bottom-sheet__head { display: flex !important; }
  .oa-create-arc {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: auto;
    gap: 10px;
    width: 100%;
  }
  .oa-create-arc a {
    position: static !important;
    width: auto;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--oa-border);
    background: var(--oa-elev);
  }
  .oa-create-arc__center { display: none; }
}
