* {
  box-sizing: border-box;
}

:root {
  --bg: #090b1d;
  --panel: rgba(255, 255, 255, 0.075);
  --panel2: rgba(255, 255, 255, 0.105);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --pink: #ff4f87;
  --cyan: #35e3ff;
  --orange: #ffb057;
  --danger: #ff5c6c;
  --green: #5cffbf;
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow-x: hidden;
}

button,
input,
select {
  font-family: inherit;
}

.appBackground {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 79, 135, 0.23), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(53, 227, 255, 0.18), transparent 32%),
    radial-gradient(circle at 50% 100%, rgba(255, 176, 87, 0.12), transparent 40%),
    linear-gradient(135deg, #08091b 0%, #10132a 45%, #07091a 100%);
}

.appBackground::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.hidden {
  display: none !important;
}

.topBar {
  width: min(1280px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(8, 10, 25, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brandMini {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.3px;
}

.brandIcon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #090b1d;
  background: linear-gradient(135deg, var(--orange), var(--pink), var(--cyan));
  font-weight: 950;
}

.topActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.userBadge {
  color: var(--muted);
  font-size: 14px;
}

.appShell {
  width: min(1280px, calc(100% - 32px));
  margin: 22px auto 60px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.authCard,
.heroCard,
.panel,
.gameHeader,
.gameCard,
.resultCard,
.leaderboardCard,
.adminCard {
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045));
  border-radius: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.authCard {
  min-height: 680px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  overflow: hidden;
}

.authHero {
  padding: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 40% 20%, rgba(53, 227, 255, 0.14), transparent 32%),
    radial-gradient(circle at 15% 80%, rgba(255, 79, 135, 0.18), transparent 38%);
}

.authLogo {
  width: min(620px, 100%);
  height: auto;
  filter: drop-shadow(0 20px 42px rgba(0, 0, 0, 0.38));
}

.authHero p {
  max-width: 520px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.authPanel {
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(0, 0, 0, 0.18);
}

.authTabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.authTab,
.leaderFilter,
.adminTab {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 800;
}

.authTab.active,
.leaderFilter.active,
.adminTab.active {
  border-color: rgba(255, 79, 135, 0.72);
  background: linear-gradient(135deg, rgba(255, 79, 135, 0.34), rgba(53, 227, 255, 0.16));
}

.authForm {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.authForm.active {
  display: flex;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  outline: none;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  border-radius: 16px;
  padding: 14px 15px;
  font-size: 16px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(53, 227, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(53, 227, 255, 0.12);
}

select option {
  background: #111327;
  color: #fff;
}

.primaryBtn,
.secondaryBtn,
.smallBtn {
  border: 0;
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
  border-radius: 16px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.primaryBtn {
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--pink), #ff7c5f, var(--cyan));
  box-shadow: 0 14px 30px rgba(255, 79, 135, 0.20);
}

.secondaryBtn {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid var(--border);
}

.smallBtn {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--border);
}

.smallBtn.danger,
.danger {
  background: rgba(255, 92, 108, 0.16);
  border-color: rgba(255, 92, 108, 0.35);
}

.primaryBtn:hover,
.secondaryBtn:hover,
.smallBtn:hover {
  transform: translateY(-2px);
}

.primaryBtn:disabled,
.secondaryBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.message,
.adminMessage,
.gameMessage {
  min-height: 22px;
  color: var(--muted);
  margin: 14px 0 0;
}

.message.error,
.adminMessage.error,
.gameMessage.error {
  color: #ff8b98;
}

.message.success,
.adminMessage.success,
.gameMessage.success {
  color: var(--green);
}

.heroCard {
  padding: 34px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 28px;
  margin-bottom: 24px;
  min-height: 360px;
}

.heroLogoArea {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 100%;
}

.badge {
  display: inline-flex;
  width: fit-content;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(255, 79, 135, 0.22);
  color: #ff6f9a;
  font-weight: 950;
  margin: 0 0 16px;
}

.heroLogoWrap {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 0 6px;
}

.heroLogo {
  width: min(520px, 100%);
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.38));
}

.subtitle {
  color: var(--muted);
  font-size: 20px;
  margin: 16px 0 0;
  line-height: 1.45;
  max-width: 540px;
}

.dayiPanel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.dayiPanelInner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  min-height: 260px;
  padding: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 79, 135, 0.10), transparent 30%),
    radial-gradient(circle at 80% 80%, rgba(53, 227, 255, 0.10), transparent 35%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dayiPanelInner img {
  width: 170px;
  max-width: 32vw;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.35));
}

.dayiBox {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.dayiBox img {
  width: 150px;
  max-width: 32vw;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.35));
}

.speechBubble {
  position: relative;
  max-width: 340px;
  border: 1px solid var(--border);
  background: rgba(8, 10, 25, 0.62);
  border-radius: 22px;
  padding: 16px 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.speechBubble p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.45;
  font-weight: 700;
}

.setupGrid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 22px;
}

.panel {
  padding: 24px;
}

.panel h2,
.timeTitle {
  margin: 0 0 16px;
}

.panelHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panelHeader h2 {
  margin: 0;
}

.panelHeader input {
  max-width: 300px;
}

.categoryGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 16px;
}

.categoryCard.imageCard {
  position: relative;
  padding: 0;
  overflow: hidden;
  height: 150px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  outline: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.categoryCard.imageCard:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.categoryCard.imageCard.active {
  border-color: #ff5f8f;
  box-shadow:
    0 0 0 2px rgba(255, 95, 143, 0.28),
    0 18px 42px rgba(0, 0, 0, 0.36);
}

.categoryImageWrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 24px;
}

.categoryImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(1.05) contrast(1.03);
  transition: transform 0.28s ease;
}

.categoryCard.imageCard:hover .categoryImage {
  transform: scale(1.04);
}

.emptyCategoryBox {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.emptyCategoryBox strong {
  display: block;
  margin-bottom: 6px;
}

.emptyCategoryBox span {
  color: rgba(255, 255, 255, 0.68);
}

.modeGrid,
.timeGrid {
  display: grid;
  gap: 12px;
}

.modeCard,
.timeBtn {
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
}

.modeCard strong {
  display: block;
  font-size: 18px;
  margin-bottom: 5px;
}

.modeCard span {
  color: var(--muted);
  font-size: 14px;
}

.modeCard.active,
.timeBtn.active {
  border-color: rgba(255, 79, 135, 0.72);
  background: linear-gradient(135deg, rgba(255, 79, 135, 0.28), rgba(53, 227, 255, 0.12));
}

.timeTitle {
  margin-top: 24px;
}

.bigStart {
  width: 100%;
  margin-top: 20px;
  font-size: 18px;
}

.gameHeader {
  padding: 20px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
}

.gameHeader h2 {
  margin: 0;
}

.gameHeader p {
  margin: 5px 0 0;
  color: var(--muted);
}

.statsRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.statBox {
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
}

.statBox span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.statBox strong {
  display: block;
  font-size: 22px;
  margin-top: 3px;
}

.gameCard {
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 22px;
  min-height: 520px;
}

.gameMain {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wordDisplay {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.letterBox {
  width: 56px;
  height: 62px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 950;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--border);
  text-transform: uppercase;
}

.letterSpace {
  width: 26px;
}

.hintPanel {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 176, 87, 0.26);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 176, 87, 0.16), transparent 30%),
    rgba(0, 0, 0, 0.20);
  border-radius: 22px;
}

.hintTop {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

.hintTop strong {
  display: block;
  font-size: 18px;
  margin-bottom: 5px;
}

.hintTop p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  font-size: 14px;
}

.hintActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hintActions .secondaryBtn {
  padding: 12px 14px;
}

.adBtn {
  background: rgba(255, 176, 87, 0.13);
  border-color: rgba(255, 176, 87, 0.34);
}

.hintMessages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.hintChip {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 176, 87, 0.13);
  border: 1px solid rgba(255, 176, 87, 0.26);
  color: rgba(255, 255, 255, 0.90);
  font-size: 13px;
  font-weight: 800;
}

.hintChip b {
  color: #ffcf85;
}

.guessForm {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.rushFoundBox {
  margin-bottom: 18px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 20px;
  padding: 16px;
}

.rushFoundBox h3 {
  margin: 0 0 12px;
}

.foundWordsList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.foundWord {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(92, 255, 191, 0.12);
  color: var(--green);
  border: 1px solid rgba(92, 255, 191, 0.24);
  font-weight: 800;
}

.gameDayi {
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.gameDayi img {
  width: 180px;
}

.wordGuessWrapper {
  width: min(760px, 100%);
}

.wordGuessGrid {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.wordGuessRow {
  display: grid;
  gap: 8px;
}

.wordGuessBox {
  aspect-ratio: 1 / 1;
  min-height: 48px;
  max-height: 68px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 950;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.18);
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.wordGuessBox.empty {
  background: rgba(255, 255, 255, 0.08);
}

.wordGuessBox.hinted {
  background: rgba(255, 176, 87, 0.18);
  border-color: #ffb057;
  color: #ffcf85;
  box-shadow:
    0 0 0 2px rgba(255, 176, 87, 0.14),
    0 12px 24px rgba(0, 0, 0, 0.22),
    0 0 24px rgba(255, 176, 87, 0.24);
}

.wordGuessBox.correct {
  background: #3b9146;
  border-color: #53c263;
}

.wordGuessBox.present {
  background: #c9a000;
  border-color: #ffd21f;
}

.wordGuessBox.absent {
  background: #70777a;
  border-color: #8b9295;
}

.wordGuessInfo {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.wordGuessInfo span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.greenDot,
.yellowDot,
.grayDot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.greenDot {
  background: #3b9146;
}

.yellowDot {
  background: #c9a000;
}

.grayDot {
  background: #70777a;
}

.resultCard {
  max-width: 840px;
  margin: 0 auto;
  padding: 42px;
  text-align: center;
}

.resultCard h1 {
  font-size: clamp(42px, 6vw, 78px);
  margin: 0 0 10px;
}

.resultCard p {
  color: var(--muted);
}

.resultStats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0;
}

.resultStats div {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.resultStats span {
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.resultStats strong {
  font-size: 26px;
}

.resultActions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.leaderboardCard,
.adminCard {
  padding: 28px;
}

.adminHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.adminHeader h1 {
  margin: 0;
}

.adminHeader p {
  margin: 6px 0 0;
  color: var(--muted);
}

.leaderboardInfoBox {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(53, 227, 255, 0.18);
  background: rgba(53, 227, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
  line-height: 1.5;
}

.leaderboardFilters,
.adminTabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.leaderboardList,
.adminList {
  display: grid;
  gap: 10px;
}

.leaderItem,
.adminItem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 18px;
  padding: 14px;
}

.leaderItem strong,
.adminItem strong {
  display: block;
}

.leaderItem span,
.adminItem span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.adminPanel {
  display: none;
}

.adminPanel.active {
  display: block;
}

.adminFormRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 16px;
}

#adminWordsPanel .adminFormRow {
  grid-template-columns: 280px 1fr auto;
}

.deleteBtn,
.banBtn,
.unbanBtn {
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 900;
}

.deleteBtn {
  background: rgba(255, 92, 108, 0.17);
  border-color: rgba(255, 92, 108, 0.32);
}

.banBtn {
  background: rgba(255, 176, 87, 0.16);
  border-color: rgba(255, 176, 87, 0.30);
}

.unbanBtn {
  background: rgba(92, 255, 191, 0.13);
  border-color: rgba(92, 255, 191, 0.28);
}

.roleBadge,
.statusBadge {
  display: inline-flex !important;
  width: fit-content;
  margin-right: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px !important;
  font-weight: 900;
  color: #fff !important;
  background: rgba(53, 227, 255, 0.16);
}

.statusBadge.banned {
  background: rgba(255, 92, 108, 0.18);
}

.jsonImportBox {
  display: grid;
  gap: 16px;
}

.jsonImportBox h2 {
  margin: 0;
}

.jsonImportHelp {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
}

.importJsonRow {
  grid-template-columns: 280px 1fr auto;
}

.jsonTextArea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--border);
  outline: none;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  border-radius: 16px;
  padding: 14px 15px;
  font-size: 15px;
  font-family: Arial, Helvetica, sans-serif;
}

.importJsonResult {
  border: 1px solid rgba(92, 255, 191, 0.26);
  background: rgba(92, 255, 191, 0.08);
  border-radius: 20px;
  padding: 18px;
}

.importJsonResult h3 {
  margin: 0 0 14px;
  color: #5cffbf;
}

.importResultGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.importResultGrid div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 16px;
  padding: 14px;
}

.importResultGrid span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  margin-bottom: 6px;
}

.importResultGrid strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
}

@media (max-width: 980px) {
  .authCard,
  .heroCard,
  .setupGrid,
  .gameCard {
    grid-template-columns: 1fr;
  }

  .dayiBox,
  .dayiPanelInner {
    justify-content: center;
  }

  .gameHeader {
    grid-template-columns: 1fr;
  }

  .statsRow {
    justify-content: flex-start;
  }

  .heroLogoArea {
    align-items: center;
    text-align: center;
  }

  .heroLogoWrap {
    justify-content: center;
  }

  .subtitle {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .topBar {
    flex-direction: column;
    align-items: stretch;
  }

  .topActions {
    justify-content: flex-start;
  }

  .authHero,
  .authPanel,
  .panel,
  .leaderboardCard,
  .adminCard,
  .gameCard {
    padding: 20px;
  }

  .heroCard {
    padding: 22px;
    min-height: auto;
  }

  .heroLogo {
    width: min(430px, 100%);
  }

  .categoryGrid {
    grid-template-columns: 1fr;
  }

  .categoryCard.imageCard {
    height: 135px;
  }

  .panelHeader {
    flex-direction: column;
    align-items: stretch;
  }

  .panelHeader input {
    max-width: none;
  }

  .guessForm {
    grid-template-columns: 1fr;
  }

  .hintTop {
    grid-template-columns: 1fr;
  }

  .hintActions {
    justify-content: flex-start;
  }

  .hintActions .secondaryBtn {
    width: 100%;
  }

  .resultStats {
    grid-template-columns: 1fr;
  }

  .adminFormRow,
  #adminWordsPanel .adminFormRow,
  .importJsonRow {
    grid-template-columns: 1fr;
  }

  .leaderItem,
  .adminItem {
    grid-template-columns: 1fr;
  }

  .letterBox {
    width: 44px;
    height: 52px;
    font-size: 23px;
  }

  .dayiPanelInner {
    flex-direction: column;
    text-align: center;
  }

  .speechBubble {
    max-width: 100%;
  }

  .wordGuessGrid {
    gap: 7px;
  }

  .wordGuessRow {
    gap: 5px;
  }

  .wordGuessBox {
    min-height: 36px;
    border-radius: 8px;
    font-size: 17px;
  }
}


@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .appShell {
    width: calc(100% - 18px);
    margin: 14px auto 40px;
  }

  .topBar {
    width: calc(100% - 18px);
    margin-top: 10px;
    padding: 12px;
    border-radius: 18px;
  }

  .topActions {
    width: 100%;
    justify-content: center;
  }

  .topActions .smallBtn {
    flex: 1;
    min-width: 92px;
    text-align: center;
  }

  .heroCard {
    padding: 16px;
    border-radius: 24px;
    min-height: auto;
    margin-bottom: 14px;
  }

  .heroLogoArea {
    align-items: center;
    text-align: center;
  }

  .heroLogoWrap {
    justify-content: center;
  }

  .heroLogo {
    width: min(280px, 100%);
  }

  .subtitle {
    font-size: 15px;
    line-height: 1.45;
    text-align: center;
  }

  .dayiPanelInner {
    min-height: auto;
    padding: 14px;
  }

  .dayiPanelInner img {
    width: 120px;
    max-width: 38vw;
  }

  .speechBubble {
    font-size: 13px;
    padding: 12px 14px;
  }

  .setupGrid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px;
  }

  .setupGrid > .panel {
    width: 100%;
  }

  .setupGrid > .panel:nth-child(2) {
    order: -1;
  }

  .panel {
    padding: 15px;
    border-radius: 22px;
  }

  .panelHeader {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }

  .panelHeader h2,
  .timeTitle {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .panelHeader input {
    max-width: none;
    width: 100%;
    padding: 12px 13px;
    font-size: 14px;
  }

  .categoryGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .categoryCard.imageCard {
    height: 96px;
    border-radius: 16px;
  }

  .categoryImageWrap {
    border-radius: 16px;
  }

  .categoryImage {
    object-fit: cover;
    object-position: center;
  }

  .modeGrid {
    grid-template-columns: 1fr !important;
    gap: 9px;
  }

  .modeCard {
    padding: 12px;
    border-radius: 15px;
  }

  .modeCard strong {
    font-size: 15px;
  }

  .modeCard span {
    font-size: 12px;
    line-height: 1.35;
  }

  .timeGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .timeBtn {
    text-align: center;
    padding: 11px 8px;
    border-radius: 14px;
    font-size: 13px;
  }

  .bigStart,
  #startGameBtn {
    width: 100%;
    margin-top: 14px;
    padding: 15px;
    font-size: 16px;
    border-radius: 16px;
  }

  .gameHeader {
    grid-template-columns: 1fr;
    padding: 15px;
    gap: 12px;
  }

  .gameHeader h2 {
    font-size: 20px;
  }

  .statsRow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .statBox {
    min-width: 0;
    padding: 9px;
    text-align: center;
  }

  .statBox strong {
    font-size: 18px;
  }

  .gameCard {
    grid-template-columns: 1fr;
    padding: 16px;
    border-radius: 22px;
    gap: 16px;
  }

  .wordDisplay {
    justify-content: center;
  }

  .guessForm {
    grid-template-columns: 1fr;
  }

  .hintTop {
    grid-template-columns: 1fr;
  }

  .hintActions {
    justify-content: stretch;
  }

  .hintActions .secondaryBtn {
    width: 100%;
  }

  .adminUserActions {
    justify-content: flex-start;
  }

  .adminUserActions button {
    flex: 1;
    min-width: 110px;
  }
}

@media (max-width: 430px) {
  .appShell {
    width: calc(100% - 12px);
  }

  .categoryGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .categoryCard.imageCard {
    height: 88px;
  }

  .modeCard {
    padding: 11px;
  }

  .timeBtn {
    font-size: 12px;
  }

  .statsRow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}



.adminUserActions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
/* =========================================================
   WORDION MOBIL UZUN KELIME KUTU TASMASI DUZELTME
========================================================= */

.wordGuessWrapper,
.wordGuessGrid,
.wordGuessRow,
.wordDisplay,
.gameCard,
.panel {
  min-width: 0;
  max-width: 100%;
}

.wordGuessWrapper {
  width: 100%;
  overflow: hidden;
}

.wordGuessGrid {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.wordGuessRow {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 768px) {
  .wordGuessWrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .wordGuessGrid {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .wordGuessRow {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 7px !important;
  }

  .wordGuessBox {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    border-radius: 10px !important;
    font-size: clamp(13px, 4vw, 18px) !important;
  }

  .wordGuessInfo {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
  }
}

@media (max-width: 430px) {
  .wordGuessRow {
    gap: 6px !important;
  }

  .wordGuessBox {
    border-radius: 9px !important;
    font-size: clamp(12px, 3.8vw, 16px) !important;
  }
}