:root {
  --bg: #061021;
  --panel: #10294a;
  --panel-2: #123b79;
  --line: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: #b7d0f7;
  --blue: #0c65df;
  --gold: #ffc400;
  --green: #08a85d;
  --yellow: #d49a12;
  --red: #8b0630;
  --shadow: 0 8px 0 rgba(0, 0, 0, 0.42), 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

.daily-page {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Lilita One", "Segoe UI", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.daily-page .navbar {
  align-items: center;
}

.daily-page .nav-btn {
  text-transform: none;
}

.shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 108px 0 44px;
}

.case-header {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(10, 43, 78, 0.94), rgba(5, 20, 39, 0.92));
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.42), 0 18px 44px rgba(0, 0, 0, 0.3);
}

.case-header > :not(.hero-renders) {
  position: relative;
  z-index: 2;
}

.case-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 20, 39, 0.84) 0%, rgba(5, 20, 39, 0.16) 48%, rgba(5, 20, 39, 0.7) 100%),
    radial-gradient(circle at 52% 48%, rgba(255, 196, 0, 0.16), transparent 13rem);
}

.hero-renders {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-render {
  position: absolute;
  object-fit: contain;
  opacity: 0.9;
  filter: drop-shadow(0 12px 0 rgba(0, 0, 0, 0.35));
  transform: translateZ(0);
  will-change: transform;
}

.hero-render-one {
  right: 30%;
  bottom: -14px;
  width: clamp(116px, 14vw, 184px);
  animation: heroFloat 6.5s ease-in-out infinite;
}

.hero-render-three {
  right: 46%;
  top: 30px;
  width: clamp(76px, 7.8vw, 108px);
  opacity: 0.5;
  animation: heroDrift 9s ease-in-out infinite;
}

.game-stage,
.daily-claim,
dialog {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 83, 177, 0.88), rgba(11, 74, 160, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.eyebrow,
.stat-label {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 6px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 4px 0 #07101f;
}

h2 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.05;
}

.case-subtitle,
#modeDescription,
.daily-claim p,
dialog p {
  color: var(--muted);
  line-height: 1.5;
}

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

.mini-action {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: white;
  background: rgba(4, 20, 42, 0.5);
  font-weight: 900;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22);
}

.case-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(6, 29, 55, 0.94), rgba(5, 19, 38, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.case-stats strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.reward-meter {
  grid-column: 1 / -1;
  height: 18px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.28);
}

.reward-meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 250ms ease;
}

#submitGuess,
#shareButton,
.mini-action {
  transition: transform 160ms ease, filter 160ms ease, background 160ms ease;
}

#submitGuess:hover,
#shareButton:not(:disabled):hover,
.mini-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.game-stage {
  padding: clamp(16px, 3vw, 28px);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 86, 196, 0.9), rgba(5, 58, 138, 0.88)),
    radial-gradient(circle at 15% 0%, rgba(255, 196, 0, 0.14), transparent 22rem);
}

.mode-info {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.case-clues {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.case-clue {
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 17, 35, 0.62);
  animation: cluePop 260ms ease both;
}

.case-clue span {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.case-clue strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
}

.clue-skin {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 7px 0 rgba(0, 0, 0, 0.25));
}

.clue-skin.blurred {
  filter: blur(8px) brightness(0.8) drop-shadow(0 7px 0 rgba(0, 0, 0, 0.25));
  transform: scale(1.04);
}

.case-clue.locked {
  color: rgba(255, 255, 255, 0.62);
  background: rgba(0, 0, 0, 0.18);
  border-style: dashed;
}

.mode-info img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.guess-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 20, 42, 0.48);
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 900;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  padding: 0 16px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder {
  font-family: "Lilita One", "Segoe UI", Arial, sans-serif;
}

input:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 4px rgba(255, 196, 0, 0.16);
}

#submitGuess,
#shareButton {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  color: #191100;
  background: var(--gold);
  font-weight: 950;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2);
}

#shareButton:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.suggestions {
  position: absolute;
  right: 18px;
  left: 18px;
  top: 100px;
  z-index: 4;
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #06182f;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.suggestions.show {
  display: block;
}

.suggestion {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-align: left;
  background: transparent;
}

.suggestion:hover {
  background: rgba(255, 255, 255, 0.1);
}

.skin-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skin-suggestion img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.skin-suggestion span,
.skin-suggestion small {
  display: block;
}

.skin-suggestion small {
  color: var(--muted);
  font-size: 12px;
}

.feedback-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.board {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.attribute-row {
  display: grid;
  grid-template-columns: 130px repeat(6, minmax(90px, 1fr));
  gap: 8px;
  perspective: 900px;
}

.skin-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) repeat(4, minmax(92px, 1fr));
  gap: 8px;
  perspective: 900px;
}

.name-cell,
.tile,
.skin-cell {
  min-height: 70px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 17, 35, 0.72);
  padding: 10px;
  transform-origin: center;
}

.name-cell {
  display: flex;
  align-items: center;
  font-weight: 950;
}

.skin-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.skin-identity img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.26));
}

.skin-identity span {
  min-width: 0;
}

.skin-identity b,
.skin-identity small {
  display: block;
}

.skin-identity b {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.08;
  text-overflow: ellipsis;
}

.skin-identity small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.tile {
  display: grid;
  align-content: center;
  gap: 3px;
}

.tile:not(.empty),
.skin-cell:not(.empty) {
  animation: flipReveal 520ms ease both;
}

.attribute-row .tile:nth-child(2) {
  animation-delay: 0ms;
}

.attribute-row .tile:nth-child(3) {
  animation-delay: 90ms;
}

.attribute-row .tile:nth-child(4) {
  animation-delay: 180ms;
}

.attribute-row .tile:nth-child(5) {
  animation-delay: 270ms;
}

.attribute-row .tile:nth-child(6) {
  animation-delay: 360ms;
}

.attribute-row .tile:nth-child(7) {
  animation-delay: 450ms;
}

.tile small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tile strong {
  font-size: 17px;
  line-height: 1.1;
}

.tile em {
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.tile.empty,
.name-cell.empty,
.skin-cell.empty {
  animation: none;
}

.hit {
  background: linear-gradient(180deg, #12c977, var(--green));
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18);
}

.near {
  background: linear-gradient(180deg, #f1bf2f, var(--yellow));
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18);
}

.miss {
  background: linear-gradient(180deg, #a90c42, var(--red));
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18);
}

.higher {
  background: linear-gradient(180deg, #236edc, #123f91);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18);
}

.lower {
  background: linear-gradient(180deg, #7f55d8, #4b2b9b);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18);
}

.empty {
  border-style: dashed;
  background: rgba(0, 0, 0, 0.16);
}

.daily-claim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(6, 32, 57, 0.96), rgba(18, 75, 143, 0.88));
}

.daily-page .footer-banner,
.daily-page .footer {
  position: relative;
  z-index: 1;
}

.daily-claim h2 {
  max-width: 650px;
}

dialog {
  width: min(520px, calc(100% - 28px));
  border-radius: 8px;
  color: var(--text);
  padding: 26px;
}

.result-dialog {
  text-align: center;
  overflow: hidden;
}

.result-image {
  width: 128px;
  height: 128px;
  object-fit: contain;
  margin: 2px auto 12px;
  filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.32));
  animation: resultPop 420ms cubic-bezier(.2, 1.4, .42, 1) both;
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

#resultShareButton,
#downloadImageButton,
.result-link {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #1b1200;
  background: var(--gold);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2);
  font-weight: 950;
  text-decoration: none;
}

.result-link {
  color: white;
  background: #0b7bdc;
}

#downloadImageButton {
  color: white;
  background: #12a862;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.18);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  color: var(--muted);
}

.stats-grid strong {
  color: var(--text);
}

@keyframes flipReveal {
  0% {
    transform: rotateX(0deg) scale(1);
    filter: brightness(0.9);
  }

  45% {
    transform: rotateX(88deg) scale(0.98);
    filter: brightness(0.72);
  }

  100% {
    transform: rotateX(0deg) scale(1);
    filter: brightness(1);
  }
}

@keyframes floatPrize {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }

  50% {
    transform: translateY(-10px) rotate(3deg);
  }
}

@keyframes cluePop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes resultPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.72) rotate(-6deg);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

.confetti {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  overflow: hidden;
}

.confetti i {
  position: absolute;
  top: -18px;
  width: 10px;
  height: 16px;
  border-radius: 3px;
  background: var(--gold);
  animation: confettiDrop 1.9s ease-in forwards;
}

.confetti i:nth-child(3n) {
  background: #10c76d;
}

.confetti i:nth-child(3n + 1) {
  background: #27a8ff;
}

.confetti i:nth-child(4n) {
  width: 14px;
  height: 10px;
}

@keyframes confettiDrop {
  to {
    transform: translateY(var(--fall)) rotate(var(--spin));
    opacity: 0;
  }
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-4deg);
  }

  50% {
    transform: translate3d(0, -12px, 0) rotate(3deg);
  }
}

@keyframes heroFloatAlt {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(5deg);
  }

  50% {
    transform: translate3d(-8px, 10px, 0) rotate(-3deg);
  }
}

@keyframes heroDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(12px, -8px, 0) scale(1.04);
  }
}

@media (max-width: 860px) {
  .case-header {
    grid-template-columns: 1fr;
  }

  .hero-render-one {
    right: 12px;
    bottom: 16px;
    width: 126px;
    opacity: 0.58;
  }

  .hero-render-three {
    display: none;
  }

  .skin-row {
    grid-template-columns: minmax(116px, 1.15fr) repeat(4, minmax(68px, 0.8fr));
    gap: 6px;
    min-width: 0;
  }

  .skin-identity {
    grid-column: auto;
    gap: 7px;
  }

  .skin-identity img {
    width: 42px;
    height: 42px;
  }

  .skin-identity b,
  .tile strong {
    font-size: 14px;
  }

  .tile small,
  .tile em {
    font-size: 10px;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 16px, 1120px);
    padding-top: 92px;
  }

  .case-header::after {
    background:
      linear-gradient(90deg, rgba(5, 20, 39, 0.84), rgba(5, 20, 39, 0.46)),
      radial-gradient(circle at 82% 26%, rgba(255, 196, 0, 0.18), transparent 8rem);
  }

  .hero-render-one {
    right: -8px;
    top: 24px;
    bottom: auto;
    width: 118px;
    opacity: 0.5;
  }

  .board {
    gap: 7px;
  }

  .skin-row {
    grid-template-columns: minmax(86px, 1.2fr) repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .tile,
  .skin-cell {
    min-height: 54px;
    padding: 5px 4px;
    border-radius: 6px;
  }

  .skin-identity {
    align-items: center;
    gap: 4px;
  }

  .skin-identity img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
  }

  .skin-identity b {
    font-size: 10px;
    line-height: 1.02;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .skin-identity small {
    margin-top: 2px;
    font-size: 9px;
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .tile {
    gap: 1px;
    overflow: hidden;
  }

  .tile small {
    font-size: 7px;
    line-height: 1;
  }

  .tile strong {
    font-size: 9px;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }

  .tile em {
    font-size: 7px;
    line-height: 1;
  }

  .case-clues,
  .input-row,
  .daily-claim {
    grid-template-columns: 1fr;
  }

  .daily-claim {
    display: grid;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 38px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .hero-render {
    animation: none;
  }
}
