.workspace-view:has(.projects-replica) { padding: 78px 42px 42px; background: #f5f6f8; color: #1f2937; }
.workspace-view:has(.projects-replica) .workspace-view-header { max-width: none; margin-bottom: 22px; align-items: center; }
.workspace-view:has(.projects-replica) .workspace-kicker { color: #7b8491; letter-spacing: 1.2px; }
.workspace-view:has(.projects-replica) .workspace-view-header h1 { margin: 5px 0 3px; color: #161b22; font-size: 26px; letter-spacing: 0; }
.workspace-view:has(.projects-replica) .workspace-view-header p { color: #88919d; }
.workspace-view:has(.projects-replica) #newDesignButton { display: none; }
.workspace-view:has(.projects-replica) .workspace-body { max-width: none; }

.projects-replica { min-height: calc(100vh - 190px); }
.project-library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.project-library-filters, .project-library-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.project-segment { display: inline-flex; height: 36px; padding: 3px; border: 1px solid #e0e3e8; border-radius: 8px; background: #ebedf1; }
.project-segment button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: #66707d; font: inherit; font-size: 12px; cursor: pointer; }
.project-segment button.active { background: #fff; color: #181d24; box-shadow: 0 1px 4px #1520331a; font-weight: 700; }
.project-search { display: flex; align-items: center; width: min(280px, 24vw); height: 36px; padding: 0 10px; border: 1px solid #dfe2e7; border-radius: 8px; background: #fff; color: #8b939e; }
.project-search:focus-within { border-color: #8ca5cf; box-shadow: 0 0 0 3px #3b82f610; }
.project-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #222832; font: inherit; font-size: 12px; }
.project-search input::placeholder { color: #a0a7b1; }
.project-library-filters select { height: 36px; padding: 0 30px 0 10px; border: 1px solid #dfe2e7; border-radius: 8px; outline: 0; background: #fff; color: #515a67; font: inherit; font-size: 12px; cursor: pointer; }
.project-icon-button, .project-primary-button { display: inline-flex; align-items: center; justify-content: center; height: 36px; border-radius: 8px; cursor: pointer; }
.project-icon-button { width: 36px; border: 1px solid #dfe2e7; background: #fff; color: #56606d; font-size: 16px; }
.project-icon-button:hover { border-color: #bdc4ce; background: #fafbfc; color: #1f2937; }
.project-primary-button { gap: 6px; padding: 0 14px; border: 1px solid #111827; background: #111827; color: #fff; font: inherit; font-size: 13px; font-weight: 800; }
.project-primary-button:hover { background: #202a3a; }

.project-design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 260px)); gap: 16px 14px; }
.project-design-card { position: relative; width: 100%; overflow: visible; border: 1px solid #e0e3e8; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px #1720330a; animation: project-card-enter .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--reveal-delay); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.project-design-card:hover { transform: translateY(-2px); border-color: #bdc7d5; box-shadow: 0 9px 24px #18243812; }
@keyframes project-card-enter { from { opacity: 0; transform: translateY(12px) scale(.986); } to { opacity: 1; transform: translateY(0) scale(1); } }
.project-card-media { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 9px 9px 0 0; background: #e9ecf1; cursor: pointer; }
.project-card-media video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .22s ease; }
.project-design-card:hover .project-card-media video { transform: scale(1.025); }
.project-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .22s ease; }
.project-design-card:hover .project-card-media img { transform: scale(1.025); }
.project-card-placeholder { display: grid; place-content: center; justify-items: center; width: 100%; height: 100%; background: linear-gradient(145deg,#e9edf3,#dbe2eb); color: #5a6674; }
.project-card-placeholder span { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 9px; border-radius: 8px; background: #172033; color: #fff; font-weight: 800; }
.project-card-placeholder small { font-size: 12px; }
.project-type-badge { position: absolute; left: 12px; top: 12px; z-index: 2; display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border: 1px solid #ffffff17; border-radius: 7px; background: #111827c7; color: #fff; font-size: 11px; font-weight: 800; backdrop-filter: blur(9px); }
.project-play { position: absolute; right: 10px; bottom: 10px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #111827bd; color: #fff; font-size: 10px; backdrop-filter: blur(9px); }
.project-card-menu { position: absolute; right: 10px; top: 10px; z-index: 5; opacity: .74; }
.project-card-menu:hover, .project-card-menu:focus-within { opacity: 1; }
.project-more { width: 28px; height: 28px; padding: 0; border: 1px solid #ffffff2b; border-radius: 8px; background: #111827b8; color: #fff; font-size: 12px; letter-spacing: 0; cursor: pointer; backdrop-filter: blur(8px); }
.project-menu-popover { position: absolute; right: 0; top: 34px; display: grid; gap: 2px; min-width: 124px; padding: 6px; border: 1px solid #dfe2e7; border-radius: 10px; background: #fff; box-shadow: 0 14px 34px #17203329; opacity: 0; pointer-events: none; transform: translateY(-4px); transition: .16s ease; }
.project-card-menu:hover .project-menu-popover, .project-card-menu:focus-within .project-menu-popover { opacity: 1; pointer-events: auto; transform: translateY(0); }
.project-menu-popover button { min-height: 30px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: #596372; text-align: left; font: inherit; font-size: 12px; cursor: pointer; }
.project-menu-popover button:hover { background: #f0f2f5; color: #1f2937; }
.project-menu-popover button.danger { color: #bd4d47; }
.project-menu-popover button.danger:hover { background: #fff1f0; }
.project-card-body { display: grid; gap: 6px; min-width: 0; padding: 12px; }
.project-card-title { width: 100%; margin: -1px -4px; padding: 1px 4px; overflow: hidden; border: 0; border-radius: 4px; background: transparent; color: #1f2937; text-align: left; text-overflow: ellipsis; white-space: nowrap; font: inherit; font-size: 14px; font-weight: 600; cursor: text; }
.project-card-title:hover { background: #3b82f612; }
.project-card-body p { margin: 0; color: #8a93a3; font-size: 11px; }
.project-loaded { margin: 32px 0 0; color: #929aa6; text-align: center; font-size: 12px; }
.project-empty-state { display: grid; place-items: center; align-content: center; gap: 8px; min-height: 390px; color: #8b939e; }
.project-empty-mark { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 7px; border: 1px solid #dfe3e8; border-radius: 14px; background: #fff; color: #77808c; font-size: 24px; box-shadow: 0 7px 20px #1922350a; }
.project-empty-state strong { color: #2d3440; font-size: 17px; }
.project-empty-state p { margin: 0 0 10px; font-size: 12px; }

@media (max-width: 1050px) {
  .project-library-toolbar { align-items: stretch; flex-direction: column; }
  .project-library-actions { justify-content: flex-end; }
  .project-search { width: min(360px, 44vw); }
}

@media (max-width: 650px) {
  .workspace-view:has(.projects-replica) { padding: 68px 14px 28px; }
  .project-library-filters { align-items: stretch; }
  .project-segment, .project-search { width: 100%; }
  .project-segment button { flex: 1; }
  .project-library-filters select { flex: 1; }
  .project-design-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .project-primary-button { padding: 0 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-design-card { animation: none; }
}
