/* ── FREE BOX PAGE ── */
.fb-page {
  min-height: 100vh;
  padding-top: 80px;
  padding-bottom: 80px;
}

.fb-hero {
  padding: 48px 0 32px;
  text-align: center;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.fb-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--fg);
}

.fb-hero p {
  color: var(--fg-muted);
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 12px;
}

.fb-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.88rem;
  color: var(--fg-muted);
}

.fb-meta-name {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--fg);
}

.fb-body { padding: 40px 0 0; }

.fb-value-range {
  text-align: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  outline: 1px solid var(--accent-dim);
  outline-offset: -2px;
  border-radius: 100px;
  padding: 12px 22px;
  display: inline-block;
  margin: 0 auto 36px;
  font-size: 0.95rem;
  color: var(--fg);
}

.fb-body .fb-value-range {
  display: block;
  max-width: 640px;
  margin: 0 auto 36px;
}

.fb-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.fb-item-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.fb-item-card:hover {
  border-color: rgba(255,107,53,0.35);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(255,107,53,0.08);
}

.fb-item-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.fb-probability {
  position: absolute;
  top: 28px;
  right: 28px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.fb-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fb-item-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
}

.fb-item-value {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--accent);
  font-weight: 600;
}

.fb-cta-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 60px;
}

.fb-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 32px;
  background: var(--accent);
  color: #0a0a0f;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 0 30px var(--accent-glow);
}

.fb-open-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(255,107,53,0.55);
}

.fb-open-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.fb-empty {
  text-align: center;
  padding: 60px 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.fb-empty p {
  color: var(--fg-muted);
  font-size: 1.05rem;
}

/* ── OPEN OVERLAY ── */
.fb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
}

.fb-overlay.active { display: flex; }

.fb-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--accent-dim);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: fb-spin 0.9s linear infinite;
}

@keyframes fb-spin {
  to { transform: rotate(360deg); }
}

.fb-opening-label {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  animation: fb-blink 0.7s ease-in-out infinite;
}

@keyframes fb-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── RESULT MODAL ── */
.fb-result-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(10,10,15,0.88);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.fb-result-modal.active { display: flex; }

.fb-result-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 0 60px var(--accent-glow);
  max-width: 440px;
  width: 100%;
  padding: 36px 28px;
  text-align: center;
  animation: fb-modal-pop 0.45s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

@keyframes fb-modal-pop {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.fb-result-img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  margin: 0 auto 20px;
  display: block;
}

.fb-result-card h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--fg);
}

.fb-result-value {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
}

.fb-result-from {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 24px;
}

.fb-result-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.fb-result-ship,
.fb-result-convert {
  flex: 1;
  padding: 12px 10px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.fb-result-ship {
  background: var(--accent);
  color: #0a0a0f;
}

.fb-result-ship:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px var(--accent-glow);
}

.fb-result-convert {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
}

.fb-result-convert:hover { background: var(--surface); }

.fb-result-close {
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: 0.88rem;
  cursor: pointer;
  padding: 8px;
  opacity: 0.7;
}

.fb-result-close:hover { opacity: 1; }

/* Toast */
.fb-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-2);
  border: 1px solid var(--accent);
  color: var(--fg);
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 0 30px var(--accent-glow);
  z-index: 500;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}

.fb-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .fb-hero { padding: 36px 0 24px; }
  .fb-items { grid-template-columns: repeat(2, 1fr); }
  .fb-open-btn { padding: 16px 28px; font-size: 1.05rem; }
}

@media (max-width: 480px) {
  .fb-items { grid-template-columns: 1fr; }
  .fb-open-btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
  }
  .fb-value-range { font-size: 0.88rem; padding: 10px 18px; }
  .fb-result-actions { flex-direction: column; }
  .fb-meta { flex-direction: column; gap: 4px; }
}
