/* ===== palette shared with the main site ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:    #c084fc;
  --accent2:   #34d9c3;
  --accent3:   #e879f9;
  --bg-dark:   #06040e;
  --bg-card:   rgba(10, 7, 20, 0.80);
  --text-main: #ede8ff;
  --text-dim:  #7260a8;
  --good:      #34d9c3;
  --bad:       #e8617a;
  --font-main: 'Orbitron', monospace;
  --font-body: 'Rajdhani', sans-serif;
}

html, body { width: 100%; min-height: 100%; overflow-x: hidden; }

body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 16px;
}

/* ===== blotter canvas (same effect as index) ===== */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.72;
}

/* ===== layout ===== */
.container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
}

.card {
  position: relative;
  background: rgba(10, 7, 20, 0.56);
  border: 1px solid rgba(192, 132, 252, 0.18);
  border-radius: 20px;
  text-align: center;
  backdrop-filter: blur(14px);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

.card::before, .card::after {
  content: '';
  position: absolute;
  width: 48px; height: 48px;
  border-color: rgba(192, 132, 252, 0.3);
  border-style: solid;
  z-index: 2;
  pointer-events: none;
}
.card::before { top: 12px; left: 12px; border-width: 1px 0 0 1px; border-radius: 5px 0 0 0; }
.card::after  { bottom: 12px; right: 12px; border-width: 0 1px 1px 0; border-radius: 0 0 5px 0; }

.card-inner { position: relative; z-index: 1; padding: 34px 28px 28px; }

/* ===== title ===== */
.title {
  font-family: var(--font-main);
  font-size: clamp(18px, 4.5vw, 24px);
  font-weight: 900;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3), var(--accent));
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.35));
}
@keyframes shimmer { to { background-position: 250% center; } }

.subtitle {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.4px;
  margin-top: 8px;
}

/* ===== divider ===== */
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; }
.divider-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(192,132,252,0.3), transparent); }
.divider-icon { color: var(--accent); font-size: 11px; opacity: 0.65; animation: rotate 7s linear infinite; display: inline-block; }
@keyframes rotate { to { transform: rotate(360deg); } }

/* ===== letter tiles ===== */
.tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-bottom: 22px;
  min-height: 52px;
}
.tile {
  width: 46px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  background: rgba(192, 132, 252, 0.07);
  border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 11px;
  box-shadow: inset 0 0 10px rgba(192,132,252,0.05);
  animation: tileIn 0.3s ease backwards;
}
@keyframes tileIn { from { opacity: 0; transform: translateY(6px) scale(0.9); } }

/* ===== scoreboard ===== */
.scoreboard {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-bottom: 20px;
}
.stat { display: flex; flex-direction: column; gap: 3px; }
.stat-num {
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent2);
}
.stat-label {
  font-family: var(--font-main);
  font-size: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ===== input ===== */
.guess-row { display: flex; gap: 8px; margin-bottom: 8px; }
.guess-input {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: lowercase;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.guess-input:focus {
  border-color: rgba(192,132,252,0.7);
  box-shadow: 0 0 16px rgba(192,132,252,0.2);
}
.guess-input::placeholder { color: var(--text-dim); letter-spacing: 1px; text-transform: none; }

.btn {
  font-family: var(--font-main);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0 16px;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(192,132,252,0.12);
  border: 1px solid rgba(192,132,252,0.45);
  color: var(--accent);
  transition: all 0.2s ease;
}
.btn:hover { background: rgba(192,132,252,0.22); border-color: var(--accent); }
.btn:active { transform: translateY(1px); }

/* ===== action row ===== */
.actions { display: flex; gap: 8px; margin-bottom: 16px; }
.actions .btn { flex: 1; padding: 10px 0; }

/* ===== feedback line ===== */
.feedback {
  min-height: 20px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  transition: opacity 0.2s;
}
.feedback.good { color: var(--good); }
.feedback.bad  { color: var(--bad); }
.feedback.dim  { color: var(--text-dim); }

/* ===== found list ===== */
.found-wrap { text-align: left; }
.found-head {
  font-family: var(--font-main);
  font-size: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.found-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
}
.found-word {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(52,217,195,0.08);
  border: 1px solid rgba(52,217,195,0.25);
  color: var(--accent2);
  animation: tileIn 0.25s ease backwards;
}
.found-list::-webkit-scrollbar { width: 6px; }
.found-list::-webkit-scrollbar-thumb { background: rgba(192,132,252,0.3); border-radius: 6px; }

/* ===== footer / back link ===== */
.back {
  display: inline-block;
  margin-top: 22px;
  font-family: var(--font-main);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  opacity: 0.6;
  transition: color 0.2s, opacity 0.2s;
}
.back:hover { color: var(--accent); opacity: 1; }

/* ===== loading ===== */
.loading { color: var(--text-dim); font-size: 14px; letter-spacing: 1px; padding: 20px 0; }

[hidden] { display: none !important; }
