/* ══════════════════════════════════════════════════════
   WORKS — Cartes preview (project-cmd)
   ══════════════════════════════════════════════════════ */

.roulette__card.works-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #080808;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  font-family: var(--ff-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #888;
  transition:
    opacity 0.55s var(--ease-out-expo, ease),
    border-color 0.35s ease;
}

.roulette__card.works-card.is-active {
  border-color: rgba(255, 255, 255, 0.16);
}

.works-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.works-card__link:focus-visible {
  outline: 2px solid #6ed888;
  outline-offset: 2px;
}

/* ── Top bar ── */
.works-card__top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0c0c;
}

.works-card__mark {
  font-family: var(--ff-heading, 'ClashDisplay', sans-serif);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #fff;
}

.works-card__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #555;
}

.works-card__meta em {
  font-style: normal;
  color: #ccc;
  margin-left: 3px;
}

.works-card__live {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #6ed888;
}

.works-card__live-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #6ed888;
  box-shadow: 0 0 5px #6ed888;
  animation: worksCardBlink 2s ease-in-out infinite;
}

@keyframes worksCardBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ── Viewport ── */
.works-card__viewport {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #050505;
}

.works-card__viewport-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #555;
  background: #0c0c0c;
}

.works-card__type {
  color: #888;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 58%;
}

.works-card__screen {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 10px;
  background:
    radial-gradient(circle at 50% 50%, rgba(110, 216, 136, 0.03), transparent 62%),
    #050505;
  overflow: hidden;
}

.works-card__arena {
  position: absolute;
  inset: 10px;
  z-index: 1;
  overflow: hidden;
}

.works-card__logo {
  position: absolute;
  top: 0;
  left: 0;
  max-width: var(--logo-max, 55%);
  max-height: 46%;
  width: auto;
  height: auto;
  object-fit: contain;
  will-change: transform;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
  pointer-events: none;
  transition: filter 0.4s ease;
}

.works-card__logo-fallback {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--ff-heading, 'ClashDisplay', sans-serif);
  font-weight: 700;
  font-size: clamp(36px, 8vw, 56px);
  color: rgba(255, 255, 255, 0.16);
  line-height: 1;
  pointer-events: none;
}

.works-card__link:hover .works-card__logo,
.works-card__link:focus-visible .works-card__logo {
  filter: drop-shadow(0 12px 28px rgba(110, 216, 136, 0.22));
}

@media (prefers-reduced-motion: reduce) {
  .works-card__logo,
  .works-card__logo-fallback {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
  }
}

.works-card__hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.works-card__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.35;
}

.works-card__bracket {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: rgba(255, 255, 255, 0.12);
  border-style: solid;
}

.works-card__bracket--tl { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.works-card__bracket--tr { top: 8px; right: 8px; border-width: 1px 1px 0 0; }
.works-card__bracket--bl { bottom: 8px; left: 8px; border-width: 0 0 1px 1px; }
.works-card__bracket--br { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }

/* ── Bottom panel ── */
.works-card__panel {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #080808;
}

.works-card__panel-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #555;
  background: #0c0c0c;
}

.works-card__ok {
  color: #6ed888;
}

.works-card__panel-body {
  padding: 14px 12px 16px;
}

.works-card__ctx-label {
  display: block;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 8px;
}

.works-card__title {
  margin: 0 0 12px;
  font-family: var(--ff-heading, 'ClashDisplay', sans-serif);
  font-weight: 700;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}

.works-card__dirs {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.works-card__dir {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  font-size: 9px;
  letter-spacing: 0.06em;
  color: #666;
  border-left: 2px solid transparent;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.works-card__dir.is-active {
  color: #fff;
  background: rgba(110, 216, 136, 0.06);
  border-left-color: #6ed888;
}

.works-card__dir-count {
  font-size: 8px;
  color: #6ed888;
}

.works-card__open {
  display: block;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666;
  transition: color 0.25s ease;
}

.works-card__open em {
  font-style: normal;
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.3s var(--ease-out-expo, ease);
}

.works-card__link:hover .works-card__open,
.works-card__link:focus-visible .works-card__open {
  color: #6ed888;
}

.works-card__link:hover .works-card__open em,
.works-card__link:focus-visible .works-card__open em {
  transform: translateX(3px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .roulette__preview .works-card {
    display: none;
  }
}
