/* ==========================================================================
   OST Faucet Hub — gamified earn zone (devnet only)
   ========================================================================== */
.fh-section {
  margin: 32px auto 16px;
  max-width: 1180px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(20,30,55,0.85), rgba(10,15,35,0.85));
  border: 1px solid rgba(120,180,255,0.18);
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
  color: #eaf2ff;
}
.fh-section h3 { margin: 0 0 4px; font-size: 1.6rem; letter-spacing: 0.3px; }
.fh-section .fh-sub { margin: 0 0 18px; opacity: 0.78; font-size: 0.95rem; }

.fh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.fh-card {
  position: relative;
  border-radius: 18px;
  padding: 18px 16px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(120,180,255,0.18);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  overflow: hidden;
}
.fh-card:hover { transform: translateY(-3px); border-color: rgba(120,180,255,0.45); background: rgba(255,255,255,0.06); }
.fh-card .fh-card-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 10px; opacity: 0.92; }
.fh-card .fh-card-meta  { font-size: 0.78rem; opacity: 0.7; margin-top: 8px; }
.fh-card .fh-emoji      { font-size: 2.2rem; line-height: 1; margin: 4px 0 8px; display: inline-block; }

.fh-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; padding: 10px 12px; gap: 8px;
  background: linear-gradient(135deg, #4f8cff, #2253c4);
  color: #fff; border: 0; border-radius: 12px; cursor: pointer;
  font-weight: 700; font-size: 0.92rem;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.fh-btn:hover:not(:disabled) { filter: brightness(1.1); }
.fh-btn:active:not(:disabled) { transform: scale(0.98); }
.fh-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.4); }
.fh-btn.fh-btn-alt  { background: linear-gradient(135deg, #f5a623, #c47800); }
.fh-btn.fh-btn-warn { background: linear-gradient(135deg, #d63a4b, #851a26); }

.fh-bank {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 14px; padding: 12px 16px;
  background: rgba(255,215,90,0.10);
  border: 1px solid rgba(255,215,90,0.35);
  border-radius: 14px;
  font-size: 0.95rem;
}
.fh-bank strong { font-size: 1.25rem; color: #ffd860; }

/* 3x3 guess grid */
.fh-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 10px; }
.fh-cell {
  aspect-ratio: 1; background: rgba(120,180,255,0.10); color: #fff;
  border: 1px solid rgba(120,180,255,0.25); border-radius: 10px;
  font-size: 1.4rem; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
}
.fh-cell:hover:not(:disabled) { background: rgba(120,180,255,0.25); transform: translateY(-2px); }
.fh-cell:disabled { cursor: not-allowed; opacity: 0.5; }
.fh-cell.fh-cell-win  { background: linear-gradient(135deg, #6ce6a4, #29a36b); border-color: #6ce6a4; }
.fh-cell.fh-cell-lose { background: linear-gradient(135deg, #d63a4b, #851a26); border-color: #d63a4b; }
.fh-cell.fh-cell-reveal { background: linear-gradient(135deg, #ffd860, #c47800); color:#000; border-color:#ffd860; }

/* Spin wheel small preview */
.fh-wheel-wrap { display: flex; align-items: center; justify-content: center; padding: 6px 0 12px; position: relative; }
.fh-wheel {
  width: 130px; height: 130px; border-radius: 50%;
  background: conic-gradient(#ff7eb6 0 60deg, #ffd860 60deg 120deg, #4f8cff 120deg 180deg, #6ce6a4 180deg 240deg, #d63a4b 240deg 300deg, #b27dff 300deg 360deg);
  border: 4px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.fh-wheel-pin {
  position: absolute; top: -2px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-top: 18px solid #ffd860;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

/* Modal */
.fh-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
  z-index: 10070; padding: 12px;
}
.fh-modal.fh-modal-open { display: flex; }
.fh-modal-card {
  background: linear-gradient(135deg, #0d1530, #060a1c);
  border: 1px solid rgba(120,180,255,0.3);
  border-radius: 22px; padding: 24px;
  max-width: 600px; width: min(600px, 96vw);
  text-align: center; color: #fff; position: relative;
  box-shadow: 0 30px 100px rgba(0,0,0,0.7);
}
.fh-modal-card h3 { margin: 0 0 10px; font-size: 1.5rem; }
.fh-modal-close {
  position: absolute; top: 10px; right: 12px;
  background: rgba(255,255,255,0.08); color: #fff;
  border: 0; border-radius: 50%; width: 36px; height: 36px;
  font-size: 1.2rem; cursor: pointer;
}
.fh-bigwheel-wrap {
  position: relative; width: 360px; height: 360px;
  margin: 14px auto; max-width: 86vw; max-height: 86vw;
}
.fh-bigwheel {
  width: 100%; height: 100%; border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.16);
  box-shadow: 0 18px 50px rgba(0,0,0,0.6);
  background: #111; position: relative; overflow: hidden;
  transform: rotate(0deg);
  transition: transform 10s cubic-bezier(0.18, 0.9, 0.22, 1);
}
.fh-bigwheel-label {
  position: absolute; top: 50%; left: 50%; transform-origin: 0 0;
  font-weight: 900; font-size: 18px; color: #0a0a0a;
  text-shadow: 0 1px 2px rgba(255,255,255,0.5);
  pointer-events: none;
}
.fh-bigwheel-pin {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 14px solid transparent; border-right: 14px solid transparent;
  border-top: 28px solid #ffd860;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.7));
  z-index: 2;
}

/* Jumper game */
.fh-game-wrap {
  position: relative; margin: 6px 0 10px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, #0a1330 0%, #1a2a55 100%);
  border: 1px solid rgba(120,180,255,0.2);
}
.fh-game-canvas { display: block; width: 100%; height: 160px; touch-action: manipulation; }
.fh-game-score {
  position: absolute; top: 6px; right: 10px;
  background: rgba(0,0,0,0.45); color: #ffd860;
  font-weight: 700; font-size: 0.85rem; padding: 2px 8px; border-radius: 6px;
}
.fh-game-tip { position: absolute; bottom: 6px; left: 10px; font-size: 0.72rem; opacity: 0.7; }

/* Ad timer */
.fh-ad-timer { font-size: 0.85rem; opacity: 0.85; margin-top: 6px; }
.fh-ad-bar { height: 6px; background: rgba(255,255,255,0.10); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.fh-ad-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #ffd860, #f5a623); transition: width 0.5s linear; }

/* Vault drop bank */
.fh-bank {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 14px; padding: 12px 16px;
  background: rgba(255,215,90,0.10);
  border: 1px solid rgba(255,215,90,0.35);
  border-radius: 14px;
  font-size: 0.95rem;
  flex-wrap: wrap; gap: 10px;
}
.fh-bank strong { font-size: 1.25rem; color: #ffd860; }
.fh-vault-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: #9ec3ff; text-decoration: none;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(78,140,255,0.12); border: 1px solid rgba(78,140,255,0.3);
}
.fh-vault-link:hover { background: rgba(78,140,255,0.22); }
.fh-vault-drop {
  position: fixed; left: 50%; top: 30%;
  font-size: 2.4rem; pointer-events: none; z-index: 10075;
  animation: fh-drop 1.3s cubic-bezier(0.32, 0.85, 0.4, 1) forwards;
}
@keyframes fh-drop {
  0%   { opacity: 0; transform: translate(-50%, -120px) scale(0.6) rotate(-12deg); }
  20%  { opacity: 1; transform: translate(-50%, -40px) scale(1.1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, 240px) scale(0.7) rotate(8deg); }
}
.fh-streak-num { font-size: 2.2rem; font-weight: 800; color: #ff9d3a; line-height: 1; margin: 4px 0 6px; }
.fh-streak-fire { display: inline-block; animation: fh-flicker 1.6s ease-in-out infinite; }
@keyframes fh-flicker { 0%,100%{transform:scale(1);} 50%{transform:scale(1.18) rotate(-4deg);} }

.fh-chip {
  display: inline-block; padding: 2px 10px; margin-top: 6px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px; font-size: 0.78rem; font-variant-numeric: tabular-nums;
}

.fh-pop {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.6);
  padding: 18px 26px; border-radius: 18px;
  background: linear-gradient(135deg, #4f8cff, #2253c4);
  color: #fff; font-weight: 800; font-size: 1.4rem;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  z-index: 10080; opacity: 0; pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
.fh-pop.fh-pop-show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Jumper modal — bigger play area */
.fh-jumper-modal .fh-modal-card { max-width: 1000px; width: min(1000px, 96vw); padding: 18px; }
.fh-jumper-stage { position: relative; border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, #050a1f 0%, #0f1c44 60%, #1c2c66 100%);
  border: 1px solid rgba(120,180,255,0.25); }
.fh-jumper-canvas { display: block; width: 100%; height: 360px; touch-action: manipulation; cursor: pointer; }
.fh-jumper-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: rgba(5,10,30,0.55); color: #fff; text-align: center;
  transition: opacity 0.25s ease; padding: 20px;
}
.fh-jumper-overlay.fh-hidden { opacity: 0; pointer-events: none; }
.fh-jumper-overlay h4 { margin: 0; font-size: 1.6rem; }
.fh-jumper-controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 0.92rem; opacity: 0.92; }
.fh-jumper-key {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.22);
  font-weight: 700;
}
.fh-jumper-score-big {
  position: absolute; top: 10px; right: 14px;
  background: rgba(0,0,0,0.55); color: #ffd860;
  font-weight: 800; font-size: 1.05rem; padding: 6px 14px; border-radius: 8px;
  z-index: 2;
}
@media (max-width: 720px) { .fh-jumper-canvas { height: 260px; } }

/* Public-ad carousel */
.fh-ad-modal .fh-modal-card { max-width: 720px; }
.fh-ad-stage {
  margin: 10px 0; border-radius: 14px; overflow: hidden;
  background: #0a0f24; border: 1px solid rgba(120,180,255,0.25);
  min-height: 320px; display: flex; flex-direction: column;
}
.fh-ad-slide {
  flex: 1; padding: 22px; display: flex; flex-direction: column; gap: 12px;
  align-items: center; justify-content: center; text-align: center;
}
.fh-ad-logo { font-size: 3.4rem; line-height: 1; }
.fh-ad-photo {
  max-width: 320px; max-height: 200px; width: auto; height: auto;
  object-fit: contain; border-radius: 12px;
  background: rgba(255,255,255,0.08); padding: 16px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
}
.fh-ad-photo-fallback { max-width: 128px; max-height: 128px; padding: 22px; }
.fh-ad-title { font-size: 1.4rem; font-weight: 800; margin: 0; }
.fh-ad-tag { opacity: 0.78; margin: 0 0 8px; max-width: 460px; }
.fh-ad-cta {
  display: inline-block; padding: 10px 22px; border-radius: 10px;
  background: linear-gradient(135deg, #ffd860, #f5a623); color: #0a0a0a;
  font-weight: 800; text-decoration: none;
}

/* Code Academy */
.fh-code-modal .fh-modal-card { max-width: 820px; text-align: left; }
.fh-code-progress { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.fh-code-pill {
  padding: 6px 12px; border-radius: 999px; font-size: 0.78rem;
  background: rgba(120,180,255,0.10); border: 1px solid rgba(120,180,255,0.3);
}
.fh-code-pill.fh-code-pill-active { background: linear-gradient(135deg,#4f8cff,#2253c4); border-color:#4f8cff; }
.fh-code-typing {
  background: #050a1f; padding: 16px; border-radius: 10px;
  font-family: 'Fira Code', Consolas, monospace; font-size: 1.05rem;
  line-height: 1.6; color: #cdd6f4; min-height: 90px;
}
.fh-code-typing span.ok { color: #6ce6a4; }
.fh-code-typing span.bad { color: #d63a4b; text-decoration: underline; }
.fh-code-typing span.cur { background: rgba(255,216,96,0.4); }
.fh-code-input {
  width: 100%; margin-top: 10px; padding: 12px;
  background: #0a0f24; color: #fff; border: 1px solid rgba(120,180,255,0.3);
  border-radius: 10px; font-family: 'Fira Code', Consolas, monospace; font-size: 1rem;
}
.fh-code-stats { display: flex; gap: 16px; margin-top: 10px; font-size: 0.9rem; opacity: 0.9; }
.fh-code-quiz-q { background: #0a0f24; padding: 14px; border-radius: 10px; margin: 10px 0;
  font-family: 'Fira Code', Consolas, monospace; white-space: pre-wrap; }
.fh-code-quiz-opts { display: grid; gap: 8px; }
.fh-code-opt {
  padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(120,180,255,0.3);
  background: rgba(120,180,255,0.06); color: #fff; cursor: pointer; text-align: left;
  font-family: 'Fira Code', Consolas, monospace; font-size: 0.92rem;
}
.fh-code-opt:hover { background: rgba(120,180,255,0.18); }
.fh-code-opt.ok  { background: linear-gradient(135deg,#6ce6a4,#29a36b); border-color:#6ce6a4; color:#000; }
.fh-code-opt.bad { background: linear-gradient(135deg,#d63a4b,#851a26); border-color:#d63a4b; }

@media (max-width: 720px) {
  .fh-section { padding: 18px 14px; border-radius: 18px; }
  .fh-grid { grid-template-columns: 1fr; }
  .fh-wheel { width: 100px; height: 100px; }
  .fh-bigwheel-wrap { width: 280px; height: 280px; }
  .fh-game-canvas { height: 140px; }
}
