/* Hawks Word Scramble — Arcade Edition v1.0.0 */
/* {H}awks · https://the-hawks.net        */


/* ── HAWKS ARCADE LOGO (v1.5) ─────────────────── */
.ha-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 4px;
}
.ha-logo-img {
  width: 180px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(245,200,40,0.4));
  animation: ha-logo-float 3s ease-in-out infinite;
}
@keyframes ha-logo-float {
  0%,100%{ transform: translateY(0) scale(1); }
  50%    { transform: translateY(-6px) scale(1.02); }
}

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;600;700&display=swap');

:root {
  --ws-bg:        #08090F;
  --ws-surface:   #0E1018;
  --ws-panel:     #161C2C;
  --ws-border:    #1E2A48;
  --ws-gold:      #F5C828;
  --ws-blue:      #7CDBF9;
  --ws-green:     #78E050;
  --ws-red:       #CC1400;
  --ws-purple:    #E87800;
  --ws-text:      #dde4f8;
  --ws-dim:       #4a5270;

  /* Tile colours — cycling through 6 neon shades */
  --tile-0: #F5C828;
  --tile-1: #7CDBF9;
  --tile-2: #78E050;
  --tile-3: #E87800;
  --tile-4: #E87800;
  --tile-5: #FFEC5F;

  --ws-font:   'Orbitron', monospace;
  --ws-body:   'Rajdhani', sans-serif;
  --tile-size: 46px;

  /* Timer ring circumference for r=18: 2π×18 ≈ 113.1 */
  --timer-circ: 113.1;
}

/* ── RESET ─────────────────────────────────────── */
.hws-wrap *, .hws-wrap *::before, .hws-wrap *::after { box-sizing: border-box; }
.hws-wrap button { font-family: var(--ws-font); cursor: pointer; line-height: 1; border: none; }

/* ── CONTAINER ─────────────────────────────────── */
.hws-wrap {
  font-family: var(--ws-body);
  background: var(--ws-bg);
  color: var(--ws-text);
  max-width: 520px;
  margin: 0 auto;
  border-radius: 16px;
  border: 1px solid var(--ws-border);
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(124,219,249,0.06),
    0 0 80px rgba(124,219,249,0.05);
}

.hws-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 28px;
  gap: 14px;
  min-height: 520px;
}

/* ── START SCREEN ──────────────────────────────── */
.hws-start {
  background: radial-gradient(ellipse at 50% -5%, #0f1e35 0%, var(--ws-bg) 65%);
  justify-content: flex-start;
  gap: 12px;
}

.hws-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding-top: 6px;
}

.hws-logo-eagle {
  font-size: 46px;
  filter: drop-shadow(0 0 18px rgba(124,219,249,0.6));
  animation: hws-float 3s ease-in-out infinite;
}

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

.hws-logo-titles { display: flex; flex-direction: column; align-items: center; line-height: 1; }

.hws-logo-hawks {
  font-family: var(--ws-font);
  font-size: 32px;
  font-weight: 900;
  color: var(--ws-gold);
  letter-spacing: 6px;
  text-shadow: 0 0 22px rgba(245,200,40,0.55);
}

.hws-logo-game {
  font-family: var(--ws-font);
  font-size: 13px;
  font-weight: 700;
  color: var(--ws-blue);
  letter-spacing: 5px;
  text-shadow: 0 0 14px rgba(124,219,249,0.5);
}

.hws-logo-sub {
  font-family: var(--ws-font);
  font-size: 9px;
  letter-spacing: 5px;
  color: var(--ws-dim);
  margin-top: 2px;
}

.hws-section-label {
  font-family: var(--ws-font);
  font-size: 9px;
  letter-spacing: 4px;
  color: var(--ws-dim);
  align-self: flex-start;
  padding-left: 2px;
}

/* Category grid */
.hws-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  width: 100%;
}

.hws-cat-btn {
  background: var(--ws-panel);
  border: 1px solid var(--ws-border) !important;
  border-radius: 8px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ws-text);
  font-size: 9px;
  font-family: var(--ws-font);
  letter-spacing: 1px;
  font-weight: 700;
  transition: all 0.14s;
}

.hws-cat-btn > span:first-child { font-size: 20px; }

.hws-cat-btn:hover,
.hws-cat-btn.hws-selected {
  border-color: var(--ws-blue) !important;
  background: rgba(124,219,249,0.1);
  color: var(--ws-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(124,219,249,0.15);
}

/* Difficulty row */
.hws-diff-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.hws-diff-btn {
  flex: 1;
  background: var(--ws-panel);
  border: 1px solid var(--ws-border) !important;
  border-radius: 8px;
  padding: 11px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.14s;
  color: var(--ws-text);
}

.hws-diff-name {
  font-family: var(--ws-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
}

.hws-diff-sub {
  font-size: 10px;
  color: var(--ws-dim);
  font-family: var(--ws-body);
}

.hws-diff-easy   .hws-diff-name { color: var(--ws-green); }
.hws-diff-medium .hws-diff-name { color: var(--ws-gold); }
.hws-diff-hard   .hws-diff-name { color: var(--ws-red); }

.hws-diff-btn:hover,
.hws-diff-btn.hws-selected {
  transform: translateY(-2px);
}

.hws-diff-easy:hover,   .hws-diff-easy.hws-selected   { border-color: var(--ws-green)  !important; background: rgba(120,224,80,0.08); box-shadow: 0 4px 14px rgba(120,224,80,0.15); }
.hws-diff-medium:hover, .hws-diff-medium.hws-selected { border-color: var(--ws-gold)   !important; background: rgba(245,200,40,0.08); box-shadow: 0 4px 14px rgba(245,200,40,0.15); }
.hws-diff-hard:hover,   .hws-diff-hard.hws-selected   { border-color: var(--ws-red)    !important; background: rgba(204,20,0,0.08);  box-shadow: 0 4px 14px rgba(204,20,0,0.15); }

/* Play button */
.hws-play-btn {
  width: 100%;
  padding: 15px;
  background: var(--ws-gold);
  color: #000;
  border-radius: 10px;
  font-family: var(--ws-font);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 4px;
  transition: all 0.15s;
  margin-top: 4px;
  border: none !important;
}

.hws-play-btn:hover {
  background: #FFD040;
  box-shadow: 0 0 30px rgba(245,200,40,0.45);
  transform: translateY(-2px);
}

.hws-play-btn:active { transform: scale(0.98); }

/* ── LOADING ───────────────────────────────────── */
.hws-loading { justify-content: center; gap: 20px; }

.hws-load-eagle {
  font-size: 52px;
  animation: hws-spin-glow 0.8s ease-in-out infinite alternate;
}

@keyframes hws-spin-glow {
  from { filter: drop-shadow(0 0 8px rgba(124,219,249,0.3));  transform: scale(0.92); }
  to   { filter: drop-shadow(0 0 28px rgba(124,219,249,0.9)); transform: scale(1.08); }
}

.hws-load-text {
  font-family: var(--ws-font);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--ws-blue);
}

/* ── GAME SCREEN ───────────────────────────────── */
.hws-game {
  padding: 14px 16px 20px;
  gap: 10px;
  justify-content: flex-start;
}

/* Header */
.hws-game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.hws-icon-btn {
  background: var(--ws-panel);
  border: 1px solid var(--ws-border) !important;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 16px;
  color: var(--ws-text);
  transition: all 0.14s;
  flex-shrink: 0;
}

.hws-icon-btn:hover { background: var(--ws-border); }

.hws-header-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
}

.hws-cat-badge {
  font-family: var(--ws-font);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--ws-blue);
  background: rgba(124,219,249,0.1);
  border: 1px solid rgba(124,219,249,0.25);
  padding: 3px 10px;
  border-radius: 4px;
}

.hws-score-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hws-score-label {
  font-family: var(--ws-font);
  font-size: 8px;
  letter-spacing: 3px;
  color: var(--ws-dim);
}

.hws-score-val {
  font-family: var(--ws-font);
  font-size: 20px;
  font-weight: 700;
  color: var(--ws-gold);
  text-shadow: 0 0 16px rgba(245,200,40,0.4);
  min-width: 40px;
  text-align: center;
}

/* Timer ring */
.hws-timer-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.hws-timer-ring {
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
}

.hws-timer-track {
  fill: none;
  stroke: var(--ws-border);
  stroke-width: 3;
}

.hws-timer-fill {
  fill: none;
  stroke: var(--ws-green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: var(--timer-circ);
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.hws-timer-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ws-font);
  font-size: 12px;
  font-weight: 700;
  color: var(--ws-text);
}

/* Hint box */
.hws-hint-box {
  width: 100%;
  background: var(--ws-panel);
  border: 1px solid var(--ws-border);
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hws-hint-lbl {
  font-family: var(--ws-font);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--ws-dim);
  flex-shrink: 0;
}

.hws-hint-txt {
  font-family: var(--ws-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ws-text);
}

/* ── ANSWER SLOTS ──────────────────────────────── */
.hws-answer-area {
  width: 100%;
  display: flex;
  justify-content: center;
  min-height: 62px;
  align-items: center;
}

.hws-answer-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

.hws-slot {
  width: var(--tile-size);
  height: var(--tile-size);
  border-radius: 8px;
  border: 2px dashed var(--ws-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
  position: relative;
  background: var(--ws-surface);
}

.hws-slot.hws-slot-filled {
  border-style: solid;
  border-color: rgba(255,255,255,0.15);
  background: transparent;
}

/* ── SCRAMBLE TILES ────────────────────────────── */
.hws-tiles-area {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  min-height: 62px;
  align-items: center;
  padding: 4px 0;
  width: 100%;
}

/* Base tile */
.hws-tile {
  width: var(--tile-size);
  height: var(--tile-size);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ws-font);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
  user-select: none;
  -webkit-user-select: none;
  color: #000;
  flex-shrink: 0;
}

/* Neon tile colours assigned by index mod 6 */
.hws-tile[data-ci="0"] { background: var(--tile-0); box-shadow: 0 3px 12px rgba(245,200,40,0.4); }
.hws-tile[data-ci="1"] { background: var(--tile-1); box-shadow: 0 3px 12px rgba(124,219,249,0.4); }
.hws-tile[data-ci="2"] { background: var(--tile-2); box-shadow: 0 3px 12px rgba(120,224,80,0.4); }
.hws-tile[data-ci="3"] { background: var(--tile-3); box-shadow: 0 3px 12px rgba(196,113,237,0.4); }
.hws-tile[data-ci="4"] { background: var(--tile-4); box-shadow: 0 3px 12px rgba(232,120,0,0.4); }
.hws-tile[data-ci="5"] { background: var(--tile-5); box-shadow: 0 3px 12px rgba(255,236,95,0.4); }

.hws-tile:hover:not(.hws-tile-used) {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 24px rgba(255,255,255,0.2);
}

.hws-tile:active:not(.hws-tile-used) { transform: scale(0.93); }

.hws-tile.hws-tile-used {
  opacity: 0;
  pointer-events: none;
}

.hws-tile.hws-tile-placed {
  /* tile rendered inside answer slot — same look */
}

/* Hint-revealed letter in answer slot */
.hws-slot-hinted {
  background: rgba(196,113,237,0.15) !important;
  border: 2px solid var(--ws-purple) !important;
  color: var(--ws-purple) !important;
  font-family: var(--ws-font);
  font-size: 18px;
  font-weight: 900;
}

/* Shake on wrong */
.hws-answer-slots.hws-wrong {
  animation: hws-shake 0.35s ease;
}

@keyframes hws-shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  60%     { transform: translateX(6px); }
}

/* Drop-in animation for placed tiles */
@keyframes hws-tile-in {
  from { transform: scale(0.5) translateY(-10px); opacity: 0.3; }
  to   { transform: scale(1) translateY(0);       opacity: 1; }
}

.hws-tile-anim-in {
  animation: hws-tile-in 0.22s cubic-bezier(0.34,1.56,0.64,1);
}

/* ── ACTION BUTTONS ────────────────────────────── */
.hws-actions {
  display: flex;
  gap: 7px;
  width: 100%;
}

.hws-action-btn {
  flex: 1;
  background: var(--ws-panel);
  border: 1px solid var(--ws-border) !important;
  border-radius: 8px;
  padding: 10px 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ws-text);
  transition: all 0.14s;
  font-size: 18px;
}

.hws-action-btn:hover {
  background: rgba(245,200,40,0.08);
  border-color: rgba(245,200,40,0.35) !important;
  transform: translateY(-2px);
}

.hws-action-lbl {
  font-family: var(--ws-font);
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--ws-dim);
}

.hws-btn-submit {
  background: var(--ws-gold) !important;
  border-color: var(--ws-gold) !important;
  color: #000 !important;
}

.hws-btn-submit .hws-action-lbl { color: rgba(0,0,0,0.6) !important; }

.hws-btn-submit:hover {
  background: #FFD040 !important;
  box-shadow: 0 0 20px rgba(245,200,40,0.4) !important;
}

/* ── MODALS ────────────────────────────────────── */
.hws-modal {
  position: absolute;
  inset: 0;
  background: rgba(8,11,18,0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  animation: hws-modal-in 0.25s ease;
}

@keyframes hws-modal-in {
  from { opacity:0; transform:scale(0.92); }
  to   { opacity:1; transform:scale(1); }
}

.hws-modal-box {
  background: var(--ws-panel);
  border: 2px solid var(--ws-gold);
  border-radius: 16px;
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 90%;
  max-width: 300px;
  box-shadow: 0 0 40px rgba(245,200,40,0.2), 0 24px 60px rgba(0,0,0,0.6);
}

.hws-modal-lose { border-color: var(--ws-red); box-shadow: 0 0 40px rgba(204,20,0,0.2), 0 24px 60px rgba(0,0,0,0.6); }

.hws-modal-eagle { font-size: 48px; animation: hws-float 2s ease-in-out infinite; }
.hws-modal-skull { font-size: 48px; }

.hws-modal-title {
  font-family: var(--ws-font);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--ws-gold);
  text-shadow: 0 0 20px rgba(245,200,40,0.5);
}

.hws-modal-lose .hws-modal-title { color: var(--ws-red); text-shadow: none; }

.hws-modal-sub { font-size: 13px; color: var(--ws-dim); }

.hws-modal-word {
  font-family: var(--ws-font);
  font-size: 20px;
  font-weight: 700;
  color: var(--ws-blue);
  letter-spacing: 5px;
  text-align: center;
}

.hws-modal-stats { display: flex; gap: 24px; }

.hws-mstat { display: flex; flex-direction: column; align-items: center; gap: 3px; }

.hws-mstat-val {
  font-family: var(--ws-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--ws-blue);
}

.hws-mstat-lbl {
  font-family: var(--ws-font);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--ws-dim);
}

.hws-modal-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-family: var(--ws-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  transition: all 0.14s;
  border: 2px solid transparent !important;
}

.hws-btn-gold {
  background: var(--ws-gold);
  color: #000;
}

.hws-btn-gold:hover {
  background: #FFD040;
  box-shadow: 0 0 20px rgba(245,200,40,0.5);
  transform: translateY(-1px);
}

.hws-btn-ghost {
  background: transparent;
  border-color: var(--ws-border) !important;
  color: var(--ws-dim);
}

.hws-btn-ghost:hover {
  border-color: var(--ws-blue) !important;
  color: var(--ws-blue);
}

/* ── CONFETTI ──────────────────────────────────── */
.hws-confetti {
  position: fixed;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9999;
  animation: hws-fall linear forwards;
}

@keyframes hws-fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 460px) {
  :root { --tile-size: 40px; }
  .hws-cat-grid   { grid-template-columns: repeat(4,1fr); gap: 5px; }
  .hws-cat-btn    { font-size: 8px; padding: 8px 3px; }
  .hws-tile       { font-size: 16px; }
  .hws-logo-hawks { font-size: 26px; }
  .hws-logo-game  { font-size: 11px; }
  .hws-actions    { gap: 5px; }
}

@media (max-width: 360px) {
  :root { --tile-size: 36px; }
  .hws-tile { font-size: 14px; }
}
