/* crypto-fortune-cookie.css — Fintech Wave Fortune Cookie Page */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;900&family=Noto+Serif+SC:wght@300;400;700&family=Orbitron:wght@400;700;900&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --crimson:     #8b1a2e;
  --crimson-lit: #c0253f;
  --gold:        #f5c842;
  --gold-dim:    #a8862a;
  --lantern:     #ff6b35;
  --ink:         #0d0608;
  --parchment:   #f0e6c8;
  --jade:        #00d4e8;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background: var(--ink);
  font-family: 'Noto Serif SC', serif;
  overflow-x: hidden;
  position: relative;
}

/* ── Background image ──────────────────────────────────────── */
.bg-layer {
  position: fixed;
  inset: 0;
  background-image: url('/images/crypto-fortune-cookies-backround.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 0;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8, 3, 6, 0.55) 0%,
    rgba(8, 3, 6, 0.70) 40%,
    rgba(8, 3, 6, 0.90) 80%,
    rgba(8, 3, 6, 0.98) 100%
  );
  z-index: 1;
}

/* ── Rain effect ───────────────────────────────────────────── */
.rain-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.18;
}

/* ── Page layout ───────────────────────────────────────────── */
.page-wrap {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 60px;
}

/* ── Top bar ───────────────────────────────────────────────── */
.top-bar {
  width: 100%;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 0;
  margin-bottom: 12px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--jade);
  object-fit: cover;
}

.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--jade);
  letter-spacing: 0.06em;
  text-shadow: 0 0 12px rgba(0,212,232,0.4);
}

.network-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(13,6,8,0.75);
  border: 1px solid rgba(139,26,46,0.5);
  border-radius: 6px;
  padding: 8px 16px;
}

.network-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(245,200,66,0.8);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

.network-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem;
  color: rgba(240,230,200,0.5);
  letter-spacing: 0.12em;
}

.network-text span { color: var(--gold); }

/* ── Decorative divider ────────────────────────────────────── */
.ornament {
  width: 100%;
  max-width: 600px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 32px;
}

.ornament-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--crimson), transparent);
}

.ornament-sym {
  font-size: 1.1rem;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(245,200,66,0.6);
}

/* ── Eyebrow / title block ─────────────────────────────────── */
.title-block {
  text-align: center;
  margin-bottom: 40px;
}

.eyebrow {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.main-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  color: var(--parchment);
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-shadow:
    0 0 60px rgba(139,26,46,0.6),
    0 2px 8px rgba(0,0,0,0.8);
}

.main-title .accent { color: var(--gold); text-shadow: 0 0 30px rgba(245,200,66,0.6); }

.subtitle {
  margin-top: 14px;
  font-size: 1rem;
  color: rgba(240,230,200,0.55);
  font-weight: 300;
  letter-spacing: 0.06em;
}

/* ── Payment card ──────────────────────────────────────────── */
.payment-card {
  width: 100%;
  max-width: 540px;
  background: rgba(10, 3, 5, 0.82);
  border: 1px solid rgba(139,26,46,0.6);
  border-radius: 12px;
  box-shadow:
    0 0 60px rgba(139,26,46,0.25),
    inset 0 0 40px rgba(139,26,46,0.05);
  padding: 40px 44px;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Red accent top border */
.payment-card::before {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--crimson-lit), transparent);
  border-radius: 2px;
}
.payment-card { position: relative; }

.cookie-icon {
  font-size: 3.2rem;
  margin-bottom: 20px;
  display: block;
  filter: drop-shadow(0 0 16px rgba(245,200,66,0.5));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

.cta-text {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--parchment);
  line-height: 1.4;
  margin-bottom: 10px;
}

.price-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,200,66,0.1);
  border: 1px solid rgba(245,200,66,0.35);
  border-radius: 6px;
  padding: 8px 20px;
  margin: 16px 0 28px;
}

.price-tag .price-amount {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 15px rgba(245,200,66,0.5);
}

.price-tag .price-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  color: rgba(245,200,66,0.6);
  letter-spacing: 0.12em;
}

/* MetaMask status */
.mm-status {
  font-size: 0.78rem;
  color: rgba(240,230,200,0.45);
  margin-bottom: 22px;
  min-height: 20px;
  letter-spacing: 0.04em;
}

.mm-status.waiting  { color: var(--gold); }
.mm-status.error    { color: #ff4d4d; }
.mm-status.success  { color: #4dff91; }

/* Pay button */
.pay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-lit) 100%);
  border: none;
  border-radius: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--parchment);
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 4px 30px rgba(139,26,46,0.5);
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.pay-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--crimson-lit) 0%, #d9304f 100%);
  box-shadow: 0 6px 40px rgba(192,37,63,0.7);
  transform: translateY(-1px);
}

.pay-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.pay-btn svg { flex-shrink: 0; }

.no-wallet-note {
  font-size: 0.7rem;
  color: rgba(240,230,200,0.3);
  letter-spacing: 0.04em;
}

.no-wallet-note a {
  color: rgba(0,212,232,0.6);
  text-decoration: none;
}

/* ── Fortune reveal panel ──────────────────────────────────── */
.fortune-panel {
  display: none;
  width: 100%;
  max-width: 600px;
  margin-top: 40px;
  text-align: center;
  animation: fortuneReveal 1.2s ease forwards;
}

@keyframes fortuneReveal {
  0%   { opacity: 0; transform: scale(0.9) translateY(20px); }
  60%  { transform: scale(1.02) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.fortune-panel.visible { display: block; }

.cookie-crack-wrap {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: crack 0.5s ease;
}
@keyframes crack {
  0%   { transform: rotate(-5deg) scale(0.8); }
  40%  { transform: rotate(5deg) scale(1.2); }
  100% { transform: rotate(0) scale(1); }
}

.fortune-scroll {
  background: rgba(240,230,200,0.06);
  border: 1px solid rgba(245,200,66,0.3);
  border-radius: 10px;
  padding: 36px 44px;
  position: relative;
  box-shadow:
    0 0 40px rgba(245,200,66,0.1),
    inset 0 0 30px rgba(245,200,66,0.03);
}

.fortune-scroll::before,
.fortune-scroll::after {
  content: '✦';
  position: absolute;
  top: 16px;
  font-size: 0.75rem;
  color: rgba(245,200,66,0.4);
}
.fortune-scroll::before { left: 18px; }
.fortune-scroll::after  { right: 18px; }

.fortune-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.fortune-text {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  font-weight: 600;
  color: var(--parchment);
  line-height: 1.6;
  letter-spacing: 0.02em;
  text-shadow: 0 0 40px rgba(245,200,66,0.2);
}

.lucky-numbers {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lucky-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(245,200,66,0.4);
  background: rgba(245,200,66,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem;
  color: var(--gold);
}

.fortune-footer-note {
  margin-top: 18px;
  font-size: 0.7rem;
  color: rgba(240,230,200,0.3);
  letter-spacing: 0.08em;
}

/* ── Lantern glow deco ─────────────────────────────────────── */
.lantern-glow-left,
.lantern-glow-right {
  position: fixed;
  top: 30%;
  width: 300px;
  height: 500px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.12;
}

.lantern-glow-left {
  left: -80px;
  background: radial-gradient(ellipse, rgba(255,107,53,0.6) 0%, transparent 65%);
}

.lantern-glow-right {
  right: -80px;
  background: radial-gradient(ellipse, rgba(139,26,46,0.7) 0%, transparent 65%);
}

/* ── Footer ────────────────────────────────────────────────── */
.page-footer {
  position: relative;
  z-index: 3;
  width: 100%;
  background: rgba(8,3,6,0.9);
  border-top: 1px solid rgba(139,26,46,0.3);
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.footer-copy {
  font-size: 0.62rem;
  color: rgba(106,85,80,0.6);
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--jade);
  text-decoration: none;
  opacity: 0.6;
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
}

.footer-links a:hover { opacity: 1; }

/* ── Spinner ───────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(240,230,200,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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