/* ============================================================
   STEP 1.5: at-a-glance, 3D coverflow carousel, star toggle,
   win-probability overlay, panel status block.
   Append AFTER styles-additions.css (the step-1 file).
   ============================================================ */

/* ---------- Section labels (homepage) ---------- */

.h-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin: 24px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.h-section-label-count {
  opacity: 0.5;
  font-weight: 400;
}

/* ---------- At-a-glance stats row ---------- */

.ag-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.ag-card {
  background: rgba(0, 0, 0, 0.04);
  padding: 10px 12px;
  border-radius: 8px;
}

.ag-lbl {
  font-size: 11px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.ag-val {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.1;
}

.ag-trend {
  font-size: 11px;
  opacity: 0.6;
  margin-top: 3px;
}

@media (max-width: 540px) {
  .ag-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 3D coverflow carousel (watched accounts) ---------- */

.watched-empty {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  font-style: italic;
  padding: 16px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  text-align: center;
}

.c3d-wrap {
  position: relative;
  width: 100%;
  padding: 8px 0 0;
}

.c3d-container {
  position: relative;
  width: 100%;
  height: 220px;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  overflow: visible;
  outline: none;
}

.c3d-stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.c3d-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  height: 190px;
  margin-left: -110px;
  margin-top: -95px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.4s ease;
  transform-origin: center center;
  cursor: pointer;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-select: none;
}

.c3d-inner {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  padding: 14px 16px;
  box-sizing: border-box;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.c3d-inner.has-status { border-color: transparent; }

.c3d-star {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  z-index: 2;
}

.c3d-star svg {
  width: 18px;
  height: 18px;
  display: block;
  transition: transform 0.1s ease;
}

.c3d-star:hover svg { transform: scale(1.15); }

.c3d-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  padding-right: 26px;
  word-break: break-word;
}

.c3d-sub {
  font-size: 12px;
  opacity: 0.75;
  margin-top: 3px;
}

.c3d-streams {
  display: flex;
  gap: 4px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.c3d-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.c3d-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.c3d-statuspill {
  font-size: 9px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-top: auto;
  display: inline-block;
  align-self: flex-start;
}

.c3d-prob {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -1px;
  -webkit-text-stroke: 1.2px currentColor;
  color: transparent;
  opacity: 0.22;
  pointer-events: none;
  user-select: none;
  font-family: inherit;
}

.c3d-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.c3d-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: background 0.15s ease, opacity 0.15s ease;
  padding: 0;
  font-family: inherit;
}

.c3d-arrow:hover { background: rgba(0, 0, 0, 0.05); }
.c3d-arrow:disabled { opacity: 0.25; cursor: default; background: transparent; }
.c3d-arrow svg { width: 14px; height: 14px; }

.c3d-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.c3d-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.c3d-dot.is-active {
  background: rgba(0, 0, 0, 0.7);
  width: 18px;
  border-radius: 3px;
}

.c3d-position {
  font-size: 11px;
  opacity: 0.55;
  margin-left: 4px;
  min-width: 56px;
}

/* ---------- Account card star + winprob (homepage list) ---------- */

.account-card { position: relative; overflow: hidden; }

.account-card .card-row1 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.account-card .card-star {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.account-card .card-star:hover { transform: scale(1.15); }

.account-card .card-streams { padding-left: 28px; }

.account-card .card-stats {
  margin-left: 28px;
  max-width: 65%;
}

.account-card .card-action { padding-left: 28px; }

.account-card .card-winprob {
  position: absolute;
  right: 18px;
  bottom: 14px;
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -2px;
  -webkit-text-stroke: 1.5px currentColor;
  color: transparent;
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
  font-family: inherit;
}

/* ---------- Panel status block (top of opened panel) ---------- */

.psb {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.psb-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
}

.psb-flag {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.psb-prompt {
  font-size: 16px;
  font-weight: 500;
  flex: 1;
}

.psb-pill {
  font-size: 10px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.psb-detail {
  font-size: 13px;
  margin-bottom: 12px;
  opacity: 0.85;
  position: relative;
  z-index: 2;
}

.psb-prob {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 64px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -2px;
  -webkit-text-stroke: 1.5px currentColor;
  color: transparent;
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.psb-prob-pct { font-size: 38px; }

.psb-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  position: relative;
  z-index: 2;
}

.psb-btn {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  transition: opacity 0.15s ease;
}

.psb-btn:hover { opacity: 0.85; }

/* ---------- Dark mode safety ---------- */

@media (prefers-color-scheme: dark) {
  .ag-card { background: rgba(255, 255, 255, 0.06); }
  .c3d-inner { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); }
  .watched-empty { background: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.5); }
  .c3d-arrow { border-color: rgba(255, 255, 255, 0.2); }
  .c3d-arrow:hover { background: rgba(255, 255, 255, 0.05); }
  .c3d-dot { background: rgba(255, 255, 255, 0.25); }
  .c3d-dot.is-active { background: rgba(255, 255, 255, 0.7); }
  .psb-btn { border-color: rgba(255, 255, 255, 0.2); }
}
