/* Fonts are loaded via <link> in each page's <head> (faster than @import). */
* { font-family: "Exo 2", sans-serif; margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; background: #151617; color: #fff; }
body { padding: 0; margin: 0; min-height: 100%; display: flex; flex-direction: column; }
::selection { background: #9d8140; color: #000; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #151617; }
::-webkit-scrollbar-thumb { background: #9d8140; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #b89750; }
main { flex: 1; margin-inline: auto; width: fit-content; margin-top: 7rem; }
main > #text { display: flex; gap: 1rem; align-items: center; padding-inline: 2rem; margin-bottom: 2rem; font-size: 0.8rem; }
main > #text > span:first-child { font-size: 1.8rem; font-weight: 500; text-align: center; }
main > #text > span:last-child { font-size: 1rem; font-weight: 300; color: #999; text-align: center; }
main > #t_home, main > #t_skins { margin-top: 2.5rem; padding-inline: 2rem; max-width: 35rem; margin-inline: auto; }
main > #t_home > div:first-child, main > #t_skins > div:first-child { font-size: 1.3rem; font-weight: 400; }
main > #t_home > div:first-child > span, main > #t_skins > div:first-child > span { color: #9d8140; font-weight: 600; }
main > #t_home > div:last-child, main > #t_skins > div:last-child { font-weight: 300; color: #999; font-size: 0.9rem; margin-top: 0.4rem; }
main > #t_home > div:last-child > span, main > #t_skins > div:last-child > span { color: #9d8140; font-weight: 400; }
main > #t_home { text-align: left; transform: translateX(-3rem); }
main > #t_skins { text-align: right; margin-top: 3.5rem; transform: translateX(3rem); }
main > #recently-viewed { margin-top: 3rem; padding-inline: 2rem; max-width: 35rem; margin-inline: auto; }
#recently-viewed h3 { font-size: 1rem; font-weight: 500; color: #999; margin-bottom: 0.5rem; }
#recently-viewed-list { font-size: 1rem; color: #666; font-style: italic; }
.recent-profile { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid #2e2e2e; }
.recent-profile:last-child { border-bottom: none; }
.recent-profile-link { display: flex; align-items: center; font-size: 0.8rem; text-decoration: none; color: #fff; transition: color 0.15s ease; flex: 1; }
.recent-profile-link:hover { color: #9d8140; }
.recent-username { font-weight: 400; font-size: 0.95rem; }
.recent-platform { font-size: 0.8rem; color: #999; text-transform: uppercase; font-weight: 300; }
.recent-time { font-size: 0.75rem; color: #666; font-weight: 300; }
main > #buttons { width: fit-content; margin-inline: auto; margin-top: 4rem; display: flex; flex-direction: row; align-items: center; gap: 1rem; }
main > #buttons > #add, main > #buttons > #search { outline: none; font-size: 1rem; line-height: 1.5; box-sizing: border-box; border: none; transition: all 0.2s ease; color: #9d8140; background: #2e2e2e; border-radius: 5px; padding: 0.4rem 2rem; cursor: pointer; text-align: center; user-select: none; text-decoration: none; font-weight: 400; letter-spacing: 0.3px; }
main > #buttons > #add:hover, main > #buttons > #search:hover { background: #343434; }
main > #buttons > #add:active, main > #buttons > #search:active { background: #2e2e2e; }
#auth-form-container { width: fit-content; max-width: 34rem; margin: 0 auto; padding-inline: 2rem; }
#auth-form-container form { background: hsl(245, 2%, 10%); border: 1px solid hsl(245, 1%, 14%); border-radius: 8px; padding: 2rem; box-shadow: none; }
.form-title { color: #fff; font-size: 1.5rem; font-weight: 700; line-height: 2rem; margin-bottom: 1.5rem; text-align: center; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; color: hsl(0, 0%, 75%); margin-bottom: 0.5rem; text-transform: none; letter-spacing: 0; }
.form-group input[type="email"], .form-group input[type="password"], .form-group input[type="text"] { width: 100%; padding: 0.5rem 1rem; font-family: "Exo 2", sans-serif; font-size: 16px; background: hsl(245, 2%, 8%); border: 1px solid hsl(245, 1%, 16%); color: #fff; border-radius: 8px; transition: all 0.15s ease; font-weight: 400; }
/* Keep the revealed password (type=text) and Chrome autofill on the SAME dark
   surface as the other inputs — otherwise the field flips to a white default. */
.form-group input[type="text"]:-webkit-autofill,
.form-group input[type="password"]:-webkit-autofill,
.form-group input[type="email"]:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px hsl(245, 2%, 8%) inset;
  caret-color: #fff;
  transition: background-color 9999s ease-in-out 0s;
}
.form-group input::placeholder { color: hsl(0, 0%, 55%); }
.form-group input:focus { outline: none; border-color: hsl(245, 1%, 20%); background: hsl(245, 1%, 10%); }
.submit-btn { width: 100%; padding: 0.5rem 1rem; background: hsl(37, 52%, 65%); color: #201802; border: none; font-family: "Exo 2", sans-serif; font-size: 0.95rem; font-weight: 700; cursor: pointer; border-radius: 8px; letter-spacing: 0.2px; transition: all 0.2s ease; margin-top: 1rem; text-align: center; }
.submit-btn:hover { background: hsl(37, 52%, 61%); }
.submit-btn:active { transform: scale(0.99); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.back-home-btn { display: block; width: 100%; padding: 0.5rem 1rem; background: hsl(245, 1%, 16%); color: hsl(0, 0%, 75%); border: 1px solid hsl(245, 1%, 14%); font-family: "Exo 2", sans-serif; font-size: 0.95rem; font-weight: 600; cursor: pointer; border-radius: 8px; letter-spacing: 0; transition: all 0.2s ease; margin-top: 0.5rem; text-align: center; text-decoration: none; }
.back-home-btn:hover { background: hsl(245, 2%, 10%); }
.error-msg { background: rgba(30, 20, 20, 0.6); border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 6px; color: #ffb3b3; padding: 0.5rem 0.9rem; font-size: 0.85rem; font-weight: 500; margin-bottom: 1rem; line-height: 1.3; display: flex; align-items: center; gap: 1rem; }
.error-msg::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.4); border-radius: 50%; font-weight: 700; font-size: 0.75rem; flex-shrink: 0; color: #fca5a5; margin-right: 0.25rem; }
.info-msg { background: transparent; border: none; color: hsl(0, 0%, 75%); padding: 0.8rem 0; border-radius: 0; font-size: 0.9rem; font-weight: 400; margin-top: 1rem; line-height: 1.4; text-align: center; }
#turnstile-container { margin: 1rem 0; display: flex; justify-content: center; min-height: 65px; }

/* ── Option rows (Masked profile / Added-by) — polished toggle rows instead of
   the default checkbox tick, each with its own icon + accent so they read as two
   distinct settings, not two identical checkboxes. ── */
.opt-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.8rem; background: hsl(245, 2%, 11%); border: 1px solid hsl(245, 1%, 15%); border-radius: 9px; margin-bottom: 0.55rem; cursor: pointer; user-select: none; transition: border-color 0.15s ease, background 0.15s ease; }
.opt-row:hover { border-color: hsl(245, 1%, 24%); background: hsl(245, 2%, 12.5%); }
.opt-ic { flex-shrink: 0; width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; }
.opt-ic svg { width: 15px; height: 15px; display: block; }
.opt-mask .opt-ic { background: rgba(201, 168, 76, 0.14); color: #d9be6e; }
.opt-owner .opt-ic { background: rgba(88, 101, 242, 0.16); color: #8b95f2; }
.opt-txt { flex: 1; min-width: 0; }
.opt-title { font-size: 0.9rem; font-weight: 600; color: hsl(0, 0%, 90%); line-height: 1.25; }
.opt-title b { font-weight: 700; color: #c9a84c; }
.opt-sub { font-size: 0.75rem; color: hsl(0, 0%, 52%); margin-top: 2px; line-height: 1.3; }
/* Toggle switch */
.opt-sw { position: relative; flex-shrink: 0; width: 40px; height: 22px; }
.opt-sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt-sw .track { position: absolute; inset: 0; background: hsl(245, 2%, 22%); border-radius: 999px; transition: background 0.18s ease; pointer-events: none; }
.opt-sw .thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #c4c5c8; transition: transform 0.18s ease, background 0.18s ease; pointer-events: none; }
/* `.on` is set by JS on change; the :checked-sibling form is kept as a fallback. */
.opt-mask.on .opt-sw .track, .opt-mask .opt-sw input:checked ~ .track { background: hsl(37, 52%, 55%); }
.opt-owner.on .opt-sw .track, .opt-owner .opt-sw input:checked ~ .track { background: #5865f2; }
.opt-row.on .opt-sw .thumb, .opt-sw input:checked ~ .thumb { transform: translateX(18px); background: #fff; }
.opt-sw input:focus-visible ~ .track { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28); }
.owner-signin-box { padding: 0.6rem 0.85rem; background: hsl(245, 2%, 11%); border: 1px dashed hsl(245, 1%, 20%); border-radius: 10px; font-size: 0.82rem; color: hsl(0, 0%, 62%); line-height: 1.5; margin-bottom: 0.6rem; }
.owner-signin-box b { color: #c9a84c; }
.owner-signin-box a { color: #8b95f2; text-decoration: none; font-weight: 600; }
.owner-signin-box a:hover { text-decoration: underline; }
footer { padding: 3rem 2rem 2rem 2rem; background: #151617; }
.footer-content { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; }
.footer-link { color: #999; text-decoration: none; font-size: 0.95rem; transition: color 0.2s ease; font-weight: 400; }
.footer-link:hover { color: #fff; }
.footer-divider { color: #444; font-weight: 300; }
.footer-text { color: #666; font-size: 0.8rem; line-height: 1; margin: 0; text-align: center; font-weight: 300; }
.footer-text:last-of-type { margin-bottom: 0; }
/* Slightly larger add form on desktop / PC screens. */
@media (min-width: 769px) {
    #auth-form-container { max-width: 38rem; }
    #auth-form-container form { padding: 2.5rem 2.75rem; }
    .form-title { font-size: 1.75rem; line-height: 2.2rem; margin-bottom: 1.75rem; }
    .form-group { margin-bottom: 1.15rem; }
    .form-group label { font-size: 0.92rem; margin-bottom: 0.55rem; }
    .form-group input[type="email"], .form-group input[type="password"], .form-group input[type="text"] { padding: 0.65rem 1.1rem; font-size: 17px; }
    .submit-btn { padding: 0.65rem 1rem; font-size: 1.05rem; }
    .info-msg { font-size: 0.95rem; }
}
@media (max-width: 768px) {
    main { margin-top: 2.5rem; padding: 0 0.75rem; display: flex; align-items: flex-start; justify-content: center; }
    #auth-form-container { max-width: 100%; padding-inline: 0; margin-top: 0; transform: scale(0.92); transform-origin: top center; }
    .form-title { font-size: 1.3rem; }
    footer { padding: 2rem 1rem; }
    .footer-links { gap: 1rem; }
    .footer-link { font-size: 0.8rem; }
    .footer-text { font-size: 0.75rem; }
}