/* Crown Fortune — standalone visual identity (no site chrome) */

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #030201;
}

.cf-root {
  --cf-bg-deep: #030201;
  --cf-bg: #0c0906;
  --cf-platinum: #e6ebf0;
  --cf-platinum-bright: #ffffff;
  --cf-platinum-dim: #828b96;
  --cf-wine: #6e1f3a;
  --cf-wine-bright: #a83a5e;
  --cf-emerald: #1f9e6e;
  --cf-text: #f2ecec;
  --cf-text-dim: #a89a9a;

  margin: 0;
  min-height: 100dvh;
  background: radial-gradient(ellipse at 50% 0%, #1a140c 0%, #0c0906 45%, #030201 100%);
  color: var(--cf-text);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.cf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) 18px 8px;
}
.cf-brand {
  font-family: 'Bodoni Moda', serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .1em;
  color: var(--cf-text);
  text-shadow: 0 0 16px rgba(230,235,240,.4);
}
.cf-header-buttons { display: flex; gap: 8px; }
.cf-icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(20,14,4,.5); border: 1px solid rgba(230,235,240,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--cf-platinum); cursor: pointer;
}
.cf-icon-btn:active { background: rgba(230,235,240,.15); }

/* ---------- Home ---------- */
.cf-home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 24px 40px;
  gap: 22px;
}

.cf-crown-btn {
  background: none; border: none; cursor: pointer;
  padding: 10px;
  transition: transform .12s ease;
}
.cf-crown-btn:active { transform: scale(.95); }
.cf-crown-img { display: block; width: 190px; height: auto; filter: drop-shadow(0 0 26px rgba(246,196,69,.4)); }
.cf-crown-btn.cf-glow .cf-crown-img { animation: cf-pulse .9s ease; }
@keyframes cf-pulse {
  0% { filter: drop-shadow(0 0 26px rgba(246,196,69,.4)); }
  40% { filter: drop-shadow(0 0 52px rgba(246,196,69,.9)) drop-shadow(0 0 22px rgba(168,58,94,.5)); }
  100% { filter: drop-shadow(0 0 26px rgba(246,196,69,.4)); }
}

.cf-prompt {
  font-size: 15px;
  color: var(--cf-text-dim);
  max-width: 280px;
  line-height: 1.5;
}

.cf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 320px;
}
.cf-chip {
  font-size: 12.5px; font-weight: 700; letter-spacing: .03em;
  padding: 7px 16px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(230,235,240,.25);
  color: var(--cf-text-dim); cursor: pointer;
}
.cf-chip.cf-chip-active {
  background: linear-gradient(180deg, var(--cf-platinum-bright), var(--cf-platinum));
  color: #201a1a; border-color: transparent;
}

/* ---------- Reveal card (overlay) ---------- */
.cf-reveal-overlay {
  position: fixed; inset: 0; z-index: 30;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(2,1,0,.72);
}
.cf-reveal-overlay.cf-visible { display: flex; }

.cf-reveal-card {
  width: 100%; max-width: 360px;
  background: linear-gradient(160deg, #1a140c, #0a0704);
  border: 1px solid rgba(230,235,240,.3);
  border-radius: 18px;
  padding: 32px 26px 26px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 40px rgba(230,235,240,.08);
  animation: cf-card-in .35s ease;
}
@keyframes cf-card-in {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cf-reveal-category {
  font-size: 11px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase;
  color: var(--cf-wine-bright);
  margin-bottom: 14px;
}
.cf-reveal-text {
  font-family: 'Bodoni Moda', serif;
  font-size: 21px;
  font-style: italic;
  line-height: 1.5;
  color: var(--cf-text);
  margin-bottom: 26px;
}
.cf-reveal-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 6px; }

.cf-btn {
  font-family: 'Manrope', sans-serif; font-weight: 700;
  background: linear-gradient(180deg, var(--cf-platinum-bright), var(--cf-platinum));
  color: #201a1a; border: none; border-radius: 999px;
  padding: 12px 24px; font-size: 14px; letter-spacing: .02em; cursor: pointer;
  box-shadow: 0 0 16px rgba(230,235,240,.3), 0 5px 0 #4a5058;
}
.cf-btn:active { transform: translateY(3px); box-shadow: 0 0 10px rgba(230,235,240,.25), 0 2px 0 #4a5058; }
.cf-btn.cf-btn-ghost {
  background: rgba(255,255,255,.06); color: var(--cf-text);
  box-shadow: none; border: 1px solid rgba(230,235,240,.25);
}
.cf-btn.cf-btn-ghost:active { background: rgba(230,235,240,.15); transform: none; box-shadow: none; }
.cf-close-link {
  display: inline-block; margin-top: 12px; font-size: 12.5px; color: var(--cf-text-dim);
  text-decoration: underline; cursor: pointer; background: none; border: none;
}

/* ---------- Full screens (history / settings) ---------- */
.cf-screen {
  position: fixed; inset: 0; z-index: 20;
  display: none; flex-direction: column;
  background: var(--cf-bg-deep);
  padding: max(16px, env(safe-area-inset-top)) 20px 24px;
}
.cf-screen.cf-visible { display: flex; }
.cf-screen-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.cf-screen-title {
  font-family: 'Bodoni Moda', serif; font-weight: 800; font-size: 22px; letter-spacing: .04em;
}

.cf-history-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.cf-history-row {
  background: rgba(255,255,255,.04); border: 1px solid rgba(230,235,240,.15);
  border-radius: 12px; padding: 14px 16px;
}
.cf-history-meta { display: flex; justify-content: space-between; margin-bottom: 6px; }
.cf-history-cat { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--cf-wine-bright); }
.cf-history-date { font-size: 11px; color: var(--cf-text-dim); }
.cf-history-text { font-family: 'Bodoni Moda', serif; font-style: italic; font-size: 15px; line-height: 1.5; }
.cf-history-empty { text-align: center; color: var(--cf-text-dim); font-size: 14px; margin-top: 60px; display: none; }

.cf-settings-list { display: flex; flex-direction: column; gap: 18px; max-width: 320px; }
.cf-settings-row { display: flex; align-items: center; justify-content: space-between; font-size: 15px; }
.cf-toggle { width: 46px; height: 25px; border-radius: 14px; background: rgba(0,0,0,.4); border: 1px solid rgba(230,235,240,.3); position: relative; cursor: pointer; }
.cf-toggle .cf-knob { position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #4a4a4a; transition: left .15s ease, background .15s ease; }
.cf-toggle.cf-on .cf-knob { left: 23px; background: linear-gradient(145deg, #fff, var(--cf-platinum)); box-shadow: 0 0 8px rgba(230,235,240,.6); }

/* ---------- Toast ---------- */
.cf-toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(10px);
  background: rgba(20,14,4,.95); border: 1px solid rgba(230,235,240,.3);
  color: var(--cf-text); font-size: 13px; padding: 10px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}
.cf-toast.cf-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 380px) {
  .cf-crown-img { width: 155px; }
  .cf-reveal-text { font-size: 19px; }
}
