﻿/* -------------------------------------------------------
   Minerals Quiz — Dark Museum / Exhibit theme (no images)
   Replace your styles.css with this.
-------------------------------------------------------- */

:root{
  --ink:#eaf1ff;
  --muted:#a9b7cf;

  /* mineral palette */
  --amethyst:#8b6dff;
  --rose:#ff5fa2;
  --aqua:#2dd4bf;
  --citrine:#ffd166;
  --jade:#39d98a;

  /* dark museum base */
  --bg0:#070a12;   /* near-black */
  --bg1:#0b1020;   /* deep slate */
  --bg2:#0f1630;   /* slightly lighter */

  --card: rgba(14, 20, 44, 0.62); /* glassy panel */
  --outline: rgba(234,241,255,0.12);
  --outline2: rgba(234,241,255,0.18);

  --ok:#36e18a;
  --bad:#ff5b7d;

  --shadow: 0 28px 80px rgba(0,0,0,0.55);
  --shadow2: 0 14px 32px rgba(0,0,0,0.38);

  --r-lg: 28px;
  --r-md: 20px;

  --focus: 0 0 0 5px rgba(139,109,255,0.25);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--ink);

  /* dark stage + spotlights + subtle color spills */
  background:
    radial-gradient(1000px 700px at 20% 15%, rgba(139,109,255,0.20), transparent 60%),
    radial-gradient(900px 650px at 85% 18%, rgba(45,212,191,0.16), transparent 62%),
    radial-gradient(900px 650px at 60% 85%, rgba(255,95,162,0.12), transparent 62%),
    radial-gradient(1200px 900px at 50% 40%, rgba(255,255,255,0.06), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 35%, var(--bg2));
}



body::after{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;

  /* Dino as full-scene backdrop */
  background-image: url("images/bg.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

  /* make it atmospheric, not dominant */
  opacity: 0.8;

}

/* Exhibit wall texture: faint strata + speckles */
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:0.35;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(234,241,255,0.03) 0px,
      rgba(234,241,255,0.03) 2px,
      transparent 2px,
      transparent 26px
    ),
    radial-gradient(circle at 10px 12px, rgba(234,241,255,0.05) 1px, transparent 2px) 0 0 / 48px 48px,
    radial-gradient(circle at 30px 34px, rgba(234,241,255,0.04) 1px, transparent 2px) 0 0 / 60px 60px;
  mix-blend-mode: screen;
}

/* ------------------------------------------------------- */

.bg{
  min-height:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:32px 16px;
  position:relative;
  overflow:hidden;
}

.app{
  width:min(980px, 100%);
  position:relative;
  z-index:2;
}

/* ------------------------------------------------------- */
/* Crystal ornaments: darker, more “gallery light” */
.crystals{
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
}

.crystal{
  position:absolute;
  width:260px;
  height:260px;
  opacity:0.65;
  filter: drop-shadow(0 30px 70px rgba(0,0,0,0.55));
  animation: drift 13s ease-in-out infinite;
  clip-path: polygon(50% 0%, 78% 18%, 100% 52%, 76% 92%, 50% 100%, 24% 92%, 0% 52%, 22% 18%);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.22), transparent 45%),
    linear-gradient(135deg, rgba(139,109,255,0.18), rgba(255,95,162,0.10));
  border: 1px solid rgba(234,241,255,0.18);
}

.crystal::after{
  content:"";
  position:absolute;
  inset:12%;
  clip-path: inherit;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.14), transparent 55%),
    linear-gradient(200deg, rgba(45,212,191,0.12), rgba(255,209,102,0.08));
  opacity:0.9;
}

.c1{ left:-120px; top:50px; transform: rotate(10deg) scale(1.0); animation-duration: 14s; }
.c2{ right:-130px; top:70px; transform: rotate(-12deg) scale(0.95); background: linear-gradient(135deg, rgba(255,255,255,0.22), transparent 45%), linear-gradient(135deg, rgba(45,212,191,0.14), rgba(139,109,255,0.10)); }
.c3{ left:10%; bottom:-170px; transform: rotate(-18deg) scale(1.05); background: linear-gradient(135deg, rgba(255,255,255,0.22), transparent 45%), linear-gradient(135deg, rgba(255,95,162,0.12), rgba(255,209,102,0.08)); animation-duration: 15s; }
.c4{ right:16%; bottom:-170px; transform: rotate(18deg) scale(1.0); background: linear-gradient(135deg, rgba(255,255,255,0.22), transparent 45%), linear-gradient(135deg, rgba(255,209,102,0.12), rgba(45,212,191,0.08)); animation-duration: 12s; }
.c5{ left:58%; top:-150px; width:190px; height:190px; transform: rotate(-8deg); opacity:0.35; animation-duration: 16s; }
.c6{ left:36%; top:18%; width:150px; height:150px; transform: rotate(20deg); opacity:0.25; animation-duration: 11s; }

@keyframes drift{
  0%,100%{ transform: translateY(0px) translateX(0px) rotate(var(--rot, 0deg)); }
  50%{ transform: translateY(-18px) translateX(12px) rotate(var(--rot, 0deg)); }
}

/* ------------------------------------------------------- */
/* Top bar */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo{
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border-radius: 18px;
  color:white;
  font-size:24px;

  /* faceted gem */
  background:
    linear-gradient(135deg, rgba(255,255,255,0.22), transparent 45%),
    linear-gradient(135deg, var(--amethyst), var(--rose));
  box-shadow: var(--shadow2);
  border: 1px solid rgba(234,241,255,0.22);
  position:relative;
}

.logo::after{
  content:"";
  position:absolute;
  top:10px;
  right:12px;
  width:14px;
  height:14px;
  border-radius:50%;
  background: rgba(255,255,255,0.45);
}

.brand-title{
  font-weight:1000;
  letter-spacing:.2px;
  font-size:18px;
}
.brand-sub{
  font-size:13px;
  color:var(--muted);
  margin-top:2px;
  font-weight:900;
}

.stats{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.pill{
  display:flex;
  align-items:center;
  gap:8px;
  background: rgba(10, 14, 28, 0.55);
  border: 1px solid rgba(234,241,255,0.14);
  padding:10px 12px;
  border-radius:999px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}

.pill-label{
  font-size:12px;
  color:var(--muted);
  font-weight:1000;
}
.pill-value{
  font-weight:1000;
  font-size:14px;
}

/* ------------------------------------------------------- */
/* Card — glass display case */
.card{
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(14px);
  position:relative;
  overflow:hidden;
}

/* “display case rim” glow */
.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(139,109,255,0.35), rgba(45,212,191,0.20), rgba(255,95,162,0.18));
  opacity:0.32;
  filter: blur(10px);
  pointer-events:none;
}

/* inner border like glass edge */
.card::after{
  content:"";
  position:absolute;
  inset:10px;
  border-radius: calc(var(--r-lg) - 10px);
  border: 1px solid rgba(234,241,255,0.14);
  pointer-events:none;
}

/* ------------------------------------------------------- */

.screen{
  padding: 20px 18px 14px;
  position:relative;
}
.hidden{ display:none !important; }

.headline{
  font-size: clamp(28px, 3.6vw, 44px);
  line-height:1.05;
  margin: 10px 0 10px;
  font-weight: 1000;
  letter-spacing: -0.8px;
}

.lead{
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.tiny{
  margin: 12px 0 0;
  color: rgba(169,183,207,0.95);
  font-size: 12px;
}

kbd{
  font-family: inherit;
  font-weight: 1000;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(255,209,102,0.12);
  border: 1px solid rgba(255,209,102,0.28);
  color: #fff1c6;
}

/* toggles */
.settings{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin: 10px 0 16px;
}

.toggle{
  display:flex;
  align-items:center;
  gap:10px;
  background: rgba(10, 14, 28, 0.45);
  border: 1px solid rgba(234,241,255,0.14);
  padding: 10px 12px;
  border-radius: 999px;
  cursor:pointer;
  user-select:none;
  box-shadow: 0 10px 18px rgba(0,0,0,0.28);
}
.toggle input{ display:none; }

.toggle-ui{
  width:44px;
  height:26px;
  border-radius:999px;
  background: rgba(234,241,255,0.10);
  position:relative;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.35);
}
.toggle-ui::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:20px;
  height:20px;
  border-radius:50%;
  background: rgba(234,241,255,0.88);
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
  transition: transform .18s ease;
}
.toggle input:checked + .toggle-ui{
  background: linear-gradient(135deg, rgba(45,212,191,0.75), rgba(139,109,255,0.75));
}
.toggle input:checked + .toggle-ui::after{
  transform: translateX(18px);
}
.toggle-text{
  font-weight: 1000;
  font-size: 13px;
  color: rgba(234,241,255,0.92);
}

/* ------------------------------------------------------- */
/* Progress bar — glowing vein */
.progress{
  height: 12px;
  border-radius:999px;
  background: rgba(234,241,255,0.08);
  overflow:hidden;
  margin-bottom: 16px;
  border: 1px solid rgba(234,241,255,0.10);
}

.progress-bar{
  height:100%;
  width:0%;
  border-radius:999px;
  background:
    linear-gradient(90deg, var(--citrine), var(--rose), var(--amethyst), var(--aqua));
  transition: width .25s ease;
  position:relative;
  box-shadow: 0 0 18px rgba(139,109,255,0.18);
}
.progress-bar::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 14px 50%, rgba(255,255,255,0.25) 2px, transparent 4px) 0 0 / 30px 100%;
  opacity:0.45;
}

/* ------------------------------------------------------- */
/* Question block */
.question-wrap{
  display:flex;
  gap:14px;
  align-items:flex-start;
  margin-bottom: 14px;
}

.question-emoji{
  width:60px;
  height:60px;
  border-radius: 22px;
  display:grid;
  place-items:center;
  font-size:30px;

  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), transparent 45%),
    linear-gradient(135deg, rgba(139,109,255,0.20), rgba(45,212,191,0.10));
  border: 1px solid rgba(234,241,255,0.16);
  box-shadow: 0 18px 36px rgba(0,0,0,0.35);
  transform: rotate(-1.5deg);
}

.question-label{
  font-size:12px;
  color: rgba(169,183,207,0.92);
  font-weight:1000;
  letter-spacing:.35px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.question-text{
  font-size: 20px;
  font-weight: 1000;
  letter-spacing: -0.35px;
}

/* ------------------------------------------------------- */
/* Answers — dark faceted tiles */
.answers{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 14px 0 16px;
}

.answer{
  width:100%;
  text-align:left;
  border: 1px solid rgba(234,241,255,0.14);
  background: rgba(10, 14, 28, 0.48);
  border-radius: 20px;
  padding: 14px 14px;
  display:flex;
  align-items:center;
  gap:12px;
  cursor:pointer;
  font-weight:1000;
  color: rgba(234,241,255,0.92);
  box-shadow: 0 16px 36px rgba(0,0,0,0.35);
  transition: transform .10s ease, box-shadow .14s ease, border-color .14s ease;
  position:relative;
  overflow:hidden;
}

/* facet sheen */
.answer::before{
  content:"";
  position:absolute;
  inset:-40% -30%;
  transform: rotate(18deg);
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  opacity:0.55;
}

/* subtle color edges */
.answer::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(135deg, rgba(139,109,255,0.10), transparent 40%),
    linear-gradient(225deg, rgba(45,212,191,0.08), transparent 45%);
  pointer-events:none;
}

.answer:hover{
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.42);
  border-color: rgba(139,109,255,0.35);
}
.answer:active{
  transform: translateY(0px) scale(0.99);
}
.answer:focus-visible{
  outline:none;
  box-shadow: var(--focus), 0 20px 48px rgba(0,0,0,0.42);
}
.answer:disabled{
  cursor:not-allowed;
  opacity:0.92;
}

.answer-key{
  width:34px;
  height:34px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  font-size: 13px;
  color:white;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.20), transparent 45%),
    linear-gradient(135deg, var(--amethyst), var(--rose));
  box-shadow: 0 0 22px rgba(139,109,255,0.18);
  border: 1px solid rgba(234,241,255,0.20);
  flex: 0 0 auto;
  position:relative;
  z-index:1;
}

.answer-text{
  font-size: 16px;
  position:relative;
  z-index:1;
}

.answer.is-correct{
  border-color: rgba(54,225,138,0.40);
  box-shadow: 0 22px 54px rgba(54,225,138,0.18);
  background:
    linear-gradient(180deg, rgba(54,225,138,0.14), rgba(10,14,28,0.48));
}
.answer.is-correct .answer-key{
  background:
    linear-gradient(135deg, rgba(255,255,255,0.20), transparent 45%),
    linear-gradient(135deg, var(--ok), var(--jade));
}

.answer.is-wrong{
  border-color: rgba(255,91,125,0.45);
  box-shadow: 0 22px 54px rgba(255,91,125,0.16);
  background:
    linear-gradient(180deg, rgba(255,91,125,0.12), rgba(10,14,28,0.48));
}
.answer.is-wrong .answer-key{
  background:
    linear-gradient(135deg, rgba(255,255,255,0.20), transparent 45%),
    linear-gradient(135deg, var(--bad), #ffb3c1);
}

/* ------------------------------------------------------- */
/* Footer & buttons */
.footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top: 6px;
}

.feedback{
  flex: 1 1 240px;
  min-height: 26px;
  font-weight: 1000;
  color: rgba(169,183,207,0.95);
  text-align:center;
}

.btn{
  appearance:none;
  border:none;
  border-radius: 18px;
  padding: 12px 18px;
  font-weight: 1000;
  cursor:pointer;
  transition: transform .10s ease, box-shadow .14s ease, opacity .14s ease;
  position:relative;
}

.btn:hover{ transform: translateY(-2px); }
.btn:active{ transform: translateY(0px) scale(0.99); }
.btn:focus-visible{ outline:none; box-shadow: var(--focus); }

.btn-primary{
  color:white;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), transparent 45%),
    linear-gradient(135deg, var(--amethyst), var(--rose));
  border: 1px solid rgba(234,241,255,0.18);
  box-shadow: 0 18px 44px rgba(0,0,0,0.40);
}
.btn-primary:hover{
  box-shadow: 0 22px 56px rgba(0,0,0,0.48);
}
.btn-primary:disabled{
  opacity:0.55;
  cursor:not-allowed;
  transform:none;
  box-shadow: 0 16px 36px rgba(0,0,0,0.35);
}

.btn-ghost{
  color: rgba(234,241,255,0.90);
  background: rgba(10, 14, 28, 0.40);
  border: 1px solid rgba(234,241,255,0.14);
  box-shadow: 0 16px 36px rgba(0,0,0,0.30);
}
.btn-ghost:hover{
  box-shadow: 0 20px 46px rgba(0,0,0,0.40);
}

/* ------------------------------------------------------- */
/* Result screen */
.result-emoji{
  width:86px;
  height:86px;
  border-radius: 28px;
  display:grid;
  place-items:center;
  font-size:40px;
  margin: 8px auto 10px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), transparent 45%),
    linear-gradient(135deg, rgba(45,212,191,0.18), rgba(139,109,255,0.14));
  border: 1px solid rgba(234,241,255,0.16);
  box-shadow: 0 22px 56px rgba(0,0,0,0.45);
}

.result-box{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin: 14px 0 14px;
}
.result-stat{
  border-radius: 20px;
  background: rgba(10, 14, 28, 0.40);
  border: 1px solid rgba(234,241,255,0.14);
  padding: 12px 12px;
  text-align:center;
  box-shadow: 0 16px 36px rgba(0,0,0,0.30);
}
.result-stat-label{
  font-size: 12px;
  color: rgba(169,183,207,0.95);
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .35px;
}
.result-stat-value{
  font-size: 24px;
  font-weight: 1000;
  margin-top: 6px;
}

.result-actions{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  justify-content:center;
  margin-top: 8px;
}

details.tiny{
  margin-top: 14px;
  background: rgba(10, 14, 28, 0.36);
  border: 1px solid rgba(234,241,255,0.14);
  padding: 10px 12px;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.28);
}
details summary{
  cursor:pointer;
  font-weight: 1000;
  color: rgba(234,241,255,0.92);
}

.missed{
  margin-top: 10px;
  display:grid;
  gap: 10px;
}
.missed-item{
  border-radius: 18px;
  background: rgba(10, 14, 28, 0.40);
  border: 1px solid rgba(234,241,255,0.14);
  padding: 10px 12px;
}
.missed-q{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight: 1000;
}
.missed-emoji{ font-size: 18px; }
.missed-qtext{ font-size: 14px; color: rgba(234,241,255,0.92); }
.missed-a{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top: 6px;
  color: rgba(169,183,207,0.95);
  font-weight: 900;
  font-size: 13px;
}
.tag{
  display:inline-flex;
  align-items:center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 1000;
  border: 1px solid rgba(234,241,255,0.14);
}
.tag.good{
  background: rgba(54,225,138,0.10);
  color: #bfffe0;
  border-color: rgba(54,225,138,0.22);
}
.tag.bad{
  background: rgba(255,91,125,0.10);
  color: #ffd1da;
  border-color: rgba(255,91,125,0.22);
}
.val{ flex:1; color: rgba(234,241,255,0.90); }

/* ------------------------------------------------------- */

.credits{
  margin-top: 12px;
  text-align:center;
  color: rgba(169,183,207,0.95);
  font-size: 12px;
  font-weight: 900;
}

/* Responsive */
@media (min-width: 720px){
  .answers{ grid-template-columns: 1fr 1fr; }
  .card{ padding: 22px; }
  .screen{ padding: 22px 22px 16px; }
}
@media (max-width: 420px){
  .question-text{ font-size: 18px; }
  .answer-text{ font-size: 15px; }
  .result-box{ grid-template-columns: 1fr; }
}
/* HPM professional cleanup: emoji placeholders are intentionally hidden. */
.question-emoji,.result-emoji,.learn-emoji,.missed-emoji{display:none!important}
