:root {
  color-scheme: dark;
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, sans-serif;
  background: #0a101a;
  color: #f3f5f8;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 183, 76, 0.13), transparent 28%),
    linear-gradient(180deg, #101826 0%, #0a101a 55%, #080d15 100%);
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(20px, 3vh, 36px) clamp(22px, 6vw, 96px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
  color: #f3f5f8;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand span,
.eyebrow {
  color: #ffbd59;
}

header p,
.eyebrow {
  margin: 0;
  font-size: clamp(0.68rem, 0.8vw, 0.82rem);
  font-weight: 750;
  letter-spacing: 0.18em;
}

header p {
  color: #7f8ba0;
}

main {
  padding: clamp(46px, 8vh, 96px) clamp(22px, 6vw, 96px);
}

.panel {
  width: min(100%, 680px);
  margin: 8vh auto;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: clamp(18px, 2vw, 28px);
  background: rgba(24, 34, 50, 0.78);
}

h1 {
  margin: clamp(10px, 1.5vh, 18px) 0 clamp(28px, 4vh, 44px);
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

label {
  color: #aeb8c9;
  font-size: clamp(0.82rem, 1vw, 0.95rem);
}

.login-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(10px, 1.2vw, 16px);
  margin-top: clamp(9px, 1.2vh, 14px);
}

input,
button {
  min-height: clamp(46px, 6vh, 56px);
  border-radius: clamp(10px, 1vw, 14px);
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0d1522;
  color: #fff;
  padding: 0 clamp(14px, 1.5vw, 20px);
}

button {
  border: 0;
  background: #ffbd59;
  color: #15100a;
  padding: 0 clamp(20px, 2vw, 30px);
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.message {
  min-height: 1.4em;
  color: #ff9e9e;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 5%;
  margin-bottom: clamp(28px, 5vh, 54px);
}

.dashboard-heading h1 {
  margin-bottom: clamp(14px, 2vh, 22px);
}

.guide {
  margin: 0;
  color: #9aa6b8;
}

.secondary {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #d7deea;
}

.storage-warning {
  margin: 0 0 clamp(20px, 3vh, 34px);
  padding: clamp(14px, 2vh, 20px);
  border: 1px solid rgba(255, 189, 89, 0.35);
  border-radius: clamp(10px, 1vw, 14px);
  background: rgba(255, 189, 89, 0.08);
  color: #ffd99f;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(270px, 31vw, 390px), 1fr));
  gap: clamp(12px, 1.5vw, 20px);
}

.game-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(14px, 1.7vw, 22px);
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: clamp(15px, 1.5vw, 21px);
  background: rgba(24, 34, 50, 0.72);
}

.game-card.blocked {
  border-color: rgba(255, 145, 145, 0.24);
  background: rgba(55, 30, 37, 0.5);
}

.game-card img {
  width: clamp(58px, 6vw, 78px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 23%;
}

.game-info {
  min-width: 0;
}

.game-info h2 {
  margin: 0;
  font-size: clamp(1rem, 1.3vw, 1.18rem);
}

.game-info p {
  margin: clamp(6px, 0.8vh, 9px) 0 0;
  color: #7f8ba0;
  font-size: clamp(0.72rem, 0.85vw, 0.84rem);
}

.switch {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(10px, 1vw, 14px);
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch span {
  position: relative;
  width: clamp(46px, 4.5vw, 58px);
  aspect-ratio: 2 / 1;
  border-radius: 999px;
  background: #465064;
  transition: background 160ms ease;
}

.switch span::after {
  position: absolute;
  top: 12%;
  left: 6%;
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: #47b881;
}

.switch input:checked + span::after {
  transform: translateX(130%);
}

.switch input:focus-visible + span {
  outline: 2px solid #ffbd59;
  outline-offset: 3px;
}

.switch strong {
  color: #dfe5ee;
  font-size: clamp(0.78rem, 0.9vw, 0.88rem);
}

@media (max-width: 620px) {
  .login-row {
    grid-template-columns: 1fr;
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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