body:has(#password-screen) {
  color: #183c57;
  color-scheme: light;
}

#password-screen {
  background:
    radial-gradient(ellipse at 10% 10%, rgba(98, 216, 235, .3), transparent 30rem),
    radial-gradient(ellipse at 90% 90%, rgba(255, 211, 72, .34), transparent 26rem),
    #fffdf2;
}

#password-screen .password-box {
  border: 2px solid #087e91;
  background: #fffdf2;
  box-shadow: 0 12px 34px rgba(24, 60, 87, .2);
  color: #183c57;
}

#password-screen .password-box h2 { color: #183c57; }
#password-screen .password-box p { color: #41627a; }

#password-screen .password-input-group input,
#main-content .pin-input input {
  border: 2px solid #6f8b96;
  background: #ffffff;
  color: #183c57;
  caret-color: #087e91;
}

#password-screen .password-input-group input:focus,
#main-content .pin-input input:focus {
  border-color: #075f70;
  outline: 3px solid #087e91;
  outline-offset: 2px;
}

#password-screen .password-error { color: #991b1b; font-weight: 800; }
#password-screen .password-back { color: #075f70; text-decoration: underline; }
#password-screen .password-submit {
  border: 2px solid #342679;
  background: #45338f;
  color: #ffffff;
}

#main-content.container {
  max-width: 960px;
  color: #183c57;
  background: transparent;
  box-shadow: none;
}

#main-content .header,
#main-content .section {
  border: 2px solid #b9dfe3;
  background: #fffdf2;
  box-shadow: 0 6px 0 rgba(8, 126, 145, .1), 0 12px 28px rgba(24, 60, 87, .12);
  color: #183c57;
}

#main-content .header h1,
#main-content .section h2,
#main-content .setting-label {
  color: #183c57;
}

#main-content .section p,
#main-content .setting-desc,
#main-content .game-lock-status {
  color: #41627a !important;
}

#main-content .setting-row { border-bottom-color: #c6dfe1; }

#main-content input[type="number"],
#main-content select,
#main-content .pin-input input {
  border: 2px solid #6f8b96;
  background: #ffffff;
  color: #183c57;
}

#main-content select option { color: #183c57; background: #ffffff; }
#main-content input:focus-visible,
#main-content select:focus-visible,
#main-content button:focus-visible,
#password-screen :focus-visible {
  outline: 3px solid #7046b8;
  outline-offset: 3px;
}

#main-content .status-badge.unlocked {
  background: #166534;
  color: #ffffff;
}

#main-content .status-badge.locked {
  background: #991b1b;
  color: #ffffff;
}

#main-content .lock-btn[onclick="lockAllGames()"] { background: #991b1b !important; }
#main-content .lock-btn[onclick="unlockAllGames()"] { background: #166534 !important; }
#main-content .lock-btn[onclick="openGameLockPopup()"] { background: #45338f !important; }
#main-content .lock-btn[onclick="changePassword()"] { background: #92400e !important; }
#main-content #lockedGamesSummary > div:not(.locked-summary) { color: #166534 !important; }

#main-content .game-lock-card {
  border: 2px solid #7b9ca7;
  background: #e9f7f5;
  color: #183c57;
}

#main-content .game-lock-card .game-name { color: #183c57; }
#main-content .game-lock-card.locked { border-color: #991b1b; background: #fff0ed; }
#main-content .game-lock-card.unlocked { border-color: #166534; background: #eaf6ed; }

#main-content .game-lock-btn { background: #166534; color: #ffffff; }
#main-content .game-lock-btn.locked { background: #991b1b; color: #ffffff; }
#main-content .save-btn { background: #45338f; color: #ffffff; }
#main-content .save-locks-btn { background: #166534; color: #ffffff; }
#main-content .locked-summary { color: #183c57; background: #fff0ed; border-color: #b42318; }
#main-content .locked-summary-title { color: #991b1b; }
#main-content .locked-game-tag { color: #183c57; background: #ffffff; }

@media (max-width: 600px) {
  #main-content.container { padding: 12px; }
  #main-content .header,
  #main-content .section { padding: 18px; }
  #main-content .setting-row { gap: 12px; }
  #main-content input[type="number"],
  #main-content select { max-width: 42vw; }
}
