/* ===== Cinderella – shared brand theme (red · orange · yellow, navy from the logo) ===== */
@import url('https://fonts.googleapis.com/css2?family=Baloo+Bhaijaan+2:wght@500;700;800&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  /* brand */
  --red: #e8392b;
  --red-2: #f2553a;
  --orange: #f7862a;
  --amber: #fbab2f;
  --yellow: #f9bd33;
  --cream: #fff8ef;
  --cream-2: #ffeedd;
  --navy: #14224e;
  --navy-2: #22367a;
  --brand-grad: linear-gradient(135deg, #e8392b 0%, #f26a2c 45%, #f9a92f 100%);
  --brand-grad-soft: linear-gradient(135deg, #ffe3d9, #ffe9cf 55%, #fff1cc);

  --ok: #149a6a;
  --warn: #c77700;
  --bad: #d3263a;

  --text: #1c2144;
  --text-2: #5a5572;
  --text-3: #938ca3;
  --line: rgba(20, 34, 78, .1);
  --card: rgba(255, 255, 255, .86);
  --card-2: rgba(255, 255, 255, .96);
  --field: #fff;

  --radius: 24px;
  --shadow: 0 28px 60px -28px rgba(150, 40, 10, .45), 0 2px 6px rgba(150, 40, 10, .06), inset 0 1px 0 rgba(255, 255, 255, .9);
  --font: 'Tajawal', system-ui, sans-serif;
  --font-display: 'Baloo Bhaijaan 2', 'Tajawal', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 600px at 100% 0%, rgba(249, 169, 47, .28), transparent 60%),
    radial-gradient(800px 600px at 0% 100%, rgba(232, 57, 43, .16), transparent 60%),
    var(--cream);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

canvas.magic {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--red); }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- 3D logo anchor (the WebGL badge is drawn on top of this box) ---- */
.logo-anchor { position: relative; display: grid; place-items: center; }
.logo-anchor img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(120, 30, 0, .35)); transition: opacity .4s; }
.logo-anchor.is-3d img { opacity: 0; }

/* ---- card panel ---- */
.glass {
  position: relative;
  background: var(--card);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.tilt {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 0%;
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .25s ease-out;
}
.tilt::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(500px circle at var(--mx) var(--my), rgba(255, 190, 120, .16), transparent 45%);
}

/* ---- buttons (3D, pressable) ---- */
.btn {
  --b1: #f4583b; --b2: #e2331f; --edge: #a21d10;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; cursor: pointer;
  padding: 14px 22px;
  border-radius: 16px;
  font-weight: 800; font-size: 16px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(180deg, var(--b1), var(--b2));
  box-shadow: 0 6px 0 var(--edge), 0 14px 26px -10px rgba(162, 29, 16, .6), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .12s ease, box-shadow .12s ease, filter .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--edge), 0 6px 14px -6px rgba(162, 29, 16, .6), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn:disabled { filter: grayscale(.5) opacity(.7); cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: 3px solid var(--navy-2); outline-offset: 3px; }
.btn-brand { --edge: #b8401b; background: linear-gradient(135deg, #ef4430, #f47a2b 55%, #f9a92f); }
.btn-ghost {
  --edge: transparent;
  color: var(--text);
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 4px 0 rgba(20, 34, 78, .08);
  font-weight: 700;
}
.btn-ghost:active { transform: translateY(2px); box-shadow: 0 0 0 1px var(--line); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 12px; }
.btn-danger { --b1: #ee5566; --b2: #cc2336; --edge: #7e1320; }

/* shimmering sheen on the main call to action */
.btn-brand::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .5) 45%, transparent 60%);
  background-size: 250% 100%;
  animation: sheen 3.5s ease-in-out infinite;
  pointer-events: none;
}

/* ---- form fields ---- */
.field { display: grid; gap: 8px; }
.field > span { font-weight: 700; font-size: 14px; color: var(--text-2); }
.field > span b { color: var(--red); }
.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid rgba(20, 34, 78, .12);
  background: var(--field);
  box-shadow: inset 0 2px 4px rgba(20, 34, 78, .05);
  outline: none;
  font-size: 17px;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: #b5aebf; }
.input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(247, 134, 42, .18); }
.input.invalid { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(211, 38, 58, .12); }
.field-error { color: var(--bad); font-size: 13px; font-weight: 700; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  background: rgba(20, 34, 78, .06); color: var(--navy-2);
  white-space: nowrap;
}
.chip.ok { background: rgba(20, 154, 106, .12); color: var(--ok); }
.chip.warn { background: rgba(249, 169, 47, .2); color: #9a5a00; }
.chip.bad { background: rgba(211, 38, 58, .1); color: var(--bad); }
.chip.gold { background: linear-gradient(135deg, rgba(232, 57, 43, .14), rgba(249, 169, 47, .22)); color: #b3321a; }

.toast {
  position: fixed; inset-inline: 16px; bottom: 20px; z-index: 100;
  margin: 0 auto; max-width: 440px;
  padding: 14px 18px; border-radius: 16px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 20px 40px -12px rgba(20, 34, 78, .6);
  font-weight: 700;
  text-align: center;
  animation: rise .35s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.bad { background: #b81f30; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(20, 34, 78, .2); border-top-color: currentColor;
  animation: spin .8s linear infinite;
}

@keyframes sheen { 0%, 60% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes pop { 0% { opacity: 0; transform: perspective(900px) rotateX(16deg) translateY(30px) scale(.95); } 100% { opacity: 1; transform: none; } }
@keyframes floaty { 50% { transform: translateY(-5px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
