/* ─── SCRATCHCARD VISUALIZER ─────────────────────────────────── */

.sc-body {
  background: radial-gradient(ellipse at center, #12131f 0%, #07080f 100%);
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  cursor: grab;
  user-select: none;
}

.sc-body.sc-dragging {
  cursor: grabbing;
}

/* ─── TOP BAR ────────────────────────────────────────────────── */
.sc-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: linear-gradient(to bottom, rgba(13,13,13,0.9) 0%, transparent 100%);
  pointer-events: none;
}

.sc-topbar > * {
  pointer-events: auto;
}

.sc-back-link {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.26px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.sc-back-link:hover {
  color: #fff;
}

.sc-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sc-info-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 15px;
  color: rgba(255,255,255,0.9);
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
}

.sc-info-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}

.sc-hint {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.2px;
}

/* ─── LOADING SCREEN ─────────────────────────────────────────── */
.sc-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: radial-gradient(ellipse at center, #12131f 0%, #07080f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.sc-loader.sc-loader--done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sc-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
  padding: 40px;
}

.sc-loader-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.sc-loader-title {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(48px, 8vw, 88px);
  line-height: 1.05;
  color: #fff;
  font-variation-settings: 'opsz' 144, 'SOFT' 0;
  letter-spacing: -0.03em;
}

.sc-loader-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: clamp(200px, 40vw, 340px);
}

.sc-loader-bar-track {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.sc-loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c8a96e, #e8c88a);
  border-radius: 2px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(200,169,110,0.6);
}

.sc-loader-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.35);
}

/* ─── CANVAS ─────────────────────────────────────────────────── */
.sc-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: visible;
}

/* ─── CARD ───────────────────────────────────────────────────── */
.sc-card {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: center center;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  transition: box-shadow 0.2s;
  will-change: transform, opacity;
}

.sc-card:hover {
  box-shadow: 0 12px 48px rgba(0,0,0,0.8), 0 0 0 2px rgba(255,255,255,0.15);
  z-index: 999 !important;
}

.sc-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  border-radius: 8px;
}

/* ─── EXPANDED OVERLAY ───────────────────────────────────────── */
.sc-expanded {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sc-expanded.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sc-expanded-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.sc-expanded-card {
  position: relative;
  z-index: 1;
  max-width: min(900px, 92vw);
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.8);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sc-expanded.is-open .sc-expanded-card {
  transform: scale(1);
}

.sc-expanded-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.sc-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.sc-close:hover {
  background: rgba(0,0,0,0.8);
}
