*{
  box-sizing:border-box;
  margin:0;
  padding:0;
  font-family:"Space Grotesk",sans-serif;
}

html,
body{
  width:100%;
  min-height:100%;
  overflow-x:hidden;
  background:radial-gradient(circle at top,#4b145f 0%,#190724 52%,#050108 100%);
  color:white;
}

body{
  min-height:100vh;
}

button,
a,
input{
  font-family:inherit;
}

.game-shell{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.top-bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:14px 20px;
  background:rgba(0,0,0,.38);
  border-bottom:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(14px);
  position:sticky;
  top:0;
  z-index:100;
}

.top-left{
  display:flex;
  align-items:center;
  gap:24px;
  flex:1;
}

.title-wrap h1{
  font-size:clamp(1.35rem,3vw,2.45rem);
  letter-spacing:.12em;
}

.subtitle{
  opacity:.72;
  margin-top:5px;
}

.top-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.top-btn{
  min-height:48px;
  border:none;
  border-radius:999px;
  padding:12px 20px;
  background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,.08));
  color:white;
  text-decoration:none;
  font-size:1rem;
  font-weight:900;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 24px rgba(0,0,0,.28);
}

.hud{
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr;
  gap:12px;
  padding:14px 20px 0;
}

.hud-card,
.status-box,
.rules-card,
.score-card,
.found-panel,
.answer-panel{
  padding:14px;
  border-radius:20px;
  background:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.045));
  border:1px solid rgba(255,255,255,.09);
}

.hud-label,
.panel-title{
  font-size:.82rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  opacity:.72;
  margin-bottom:8px;
  font-weight:1000;
}

.hud-value{
  font-size:1.18rem;
  font-weight:1000;
}

.giant-letter{
  font-size:2rem !important;
  line-height:1;
  color:#fff36d;
}

.game-area{
  flex:1;
  display:grid;
  grid-template-columns:minmax(320px,760px) minmax(270px,360px);
  justify-content:center;
  align-items:start;
  gap:20px;
  padding:20px;
}

.play-panel,
.side-panel{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.answer-panel{
  display:flex;
  flex-direction:column;
  gap:14px;
  background:
    radial-gradient(circle at top,rgba(255,243,109,.13),transparent 36%),
    linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.045));
}

.status-box{
  line-height:1.5;
  font-weight:900;
}

.input-row{
  display:grid;
  grid-template-columns:1fr 150px;
  gap:10px;
}

.answer-input{
  min-height:66px;
  border:none;
  border-radius:20px;
  padding:0 18px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.12);
  color:white;
  font-size:1.35rem;
  font-weight:1000;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.answer-input::placeholder{
  color:rgba(255,255,255,.48);
}

.submit-btn,
.action-btn{
  min-height:66px;
  border:none;
  border-radius:20px;
  background:linear-gradient(180deg,#fff36d,#ff9f1c);
  color:#1b0838;
  font-size:1.08rem;
  font-weight:1000;
  cursor:pointer;
  box-shadow:
    0 0 0 3px rgba(255,255,255,.14),
    0 14px 24px rgba(0,0,0,.3);
}

.found-panel{
  min-height:360px;
}

.answers-list{
  display:flex;
  flex-wrap:wrap;
  align-content:flex-start;
  gap:8px;
  min-height:300px;
  max-height:430px;
  overflow:auto;
}

.answer-chip{
  padding:9px 12px;
  border-radius:999px;
  background:rgba(126,255,200,.16);
  border:1px solid rgba(126,255,200,.28);
  font-weight:900;
  font-size:.95rem;
}

.rules-list{
  padding-left:20px;
  line-height:1.7;
  opacity:.9;
  font-weight:800;
}

.stat-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 0;
  border-bottom:1px solid rgba(255,255,255,.08);
  font-weight:900;
}

.stat-row:last-child{
  border-bottom:none;
}

.instructions-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.78);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:999;
}

.hidden{
  display:none;
}

.instructions-modal{
  width:min(94vw,820px);
  max-height:86vh;
  overflow:auto;
  border-radius:28px;
  background:
    radial-gradient(circle at top,rgba(255,243,109,.18),transparent 40%),
    #190724;
  border:1px solid rgba(255,255,255,.12);
  padding:28px;
  position:relative;
}

.instructions-modal h2{
  margin-bottom:18px;
}

.instructions-content{
  display:flex;
  flex-direction:column;
  gap:18px;
  line-height:1.7;
}

.instructions-content ul{
  padding-left:22px;
}

.close-btn{
  position:absolute;
  top:18px;
  right:18px;
  width:42px;
  height:42px;
  border:none;
  border-radius:50%;
  font-weight:1000;
  cursor:pointer;
}

@media (max-width:980px){
  .hud{
    grid-template-columns:1fr 1fr;
  }

  .game-area{
    grid-template-columns:1fr;
  }

  .play-panel,
  .side-panel{
    width:min(94vw,760px);
    margin:0 auto;
  }
}

@media (max-width:720px){
  .top-bar{
    flex-direction:column;
    align-items:flex-start;
  }

  .top-left{
    width:100%;
    flex-wrap:wrap;
    gap:14px;
  }

  .top-actions{
    width:100%;
  }

  .top-btn{
    flex:1;
  }

  .hud{
    grid-template-columns:1fr;
    padding:12px 14px 0;
  }

  .game-area{
    padding:14px;
  }

  .input-row{
    grid-template-columns:1fr;
  }

  .answer-input,
  .submit-btn{
    min-height:58px;
  }

  .found-panel{
    min-height:240px;
  }

  .answers-list{
    min-height:190px;
    max-height:260px;
  }
}
