:root {
    --bg: #15161a;
    --white: #FFF6F6;
    --muted: #aeb4bf;
    --muted-2: #7f8693;
    --line: rgba(255, 255, 255, 0.10);
    --line-2: rgba(255, 255, 255, 0.18);
    --gold: #d9c08a;
    --metalFont: #1c1c1c;
    --danger: #d9534f;
    --danger-2: #e76e6a;
    --radius: 14px;
    --shadow: rgba(0, 0, 0, 0.42) 0 18px 44px;
    font-family: 'Roboto', system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--white);
    background-color: var(--bg);
    background-image: url("../files/images/sky.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: cover;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

/* keep autofill on theme: dark field, white text */
input:-webkit-autofill,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--white) !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.30) inset !important;
    caret-color: var(--white);
    transition: background-color 9999s ease-in-out 0s;
}

/* ---------- Card ---------- */

.menu-login {
    position: relative;
    width: 26rem;
    max-width: 94vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.6rem 2rem 1.8rem;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
/* gold hairline along the top edge — the SkyRock signature accent */
.menu-login::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.menu-login-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.6rem;
    width: 100%;
}
.icon {
    display: block;
    width: 15rem;
    max-width: 80%;
    height: 6rem;
    background-image: url('../files/icons/OfficialSkyRockWhiteLogo.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.45));
}
.menu-login-eyebrow {
    margin: 0.6rem 0 0;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.26em;
    font-size: 0.72rem;
}
.menu-login-icon-text {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* ---------- Form ---------- */

.menu-login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.menu-login-form form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.menu-login-form input {
    width: 100%;
    margin: 0 0 0.8rem 0;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid var(--line-2);
    border-radius: 8px;
    color: var(--white);
    padding: 0.66rem 0.75rem;
    font-size: 1rem;
    color-scheme: dark;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}
.menu-login-form input::placeholder { color: var(--muted-2); }
.menu-login-form input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(0, 0, 0, 0.38);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 18px 2px rgba(255, 255, 255, 0.11);
}

.menu-login-form button {
    width: 100%;
    margin-top: 0.7rem;
    border: none;
    border-radius: 9px;
    padding: 0.74rem;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    color: var(--metalFont);
}
.menu-login-form button:hover { filter: brightness(1.05); }

/* ---------- Auth helpers (forgot / reset pages reuse this stylesheet) ---------- */

.auth-title { margin: 0; font-size: 1.4rem; font-weight: 600; text-align: center; }
.auth-lead { margin: 0.5rem 0 1.1rem; color: var(--muted); font-size: 0.92rem; text-align: center; line-height: 1.5; }
.auth-error { color: var(--danger-2); font-size: 0.88rem; text-align: center; margin: 0.9rem 0 0; }

.menu-login-forgot { width: 100%; text-align: center; margin-top: 0.9rem; }
.menu-login-forgot a {
    color: var(--muted);
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 1px solid var(--line-2);
    padding-bottom: 1px;
    transition: color 0.16s ease, border-color 0.16s ease;
}
.menu-login-forgot a:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- Extras ---------- */

.menu-login-extras {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: 1.5rem;
}
.menu-login-extras-register-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.menu-login-extras-register-link a {
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 1px;
    transition: color 0.16s ease;
}
.menu-login-extras-register-link a:hover { color: var(--gold); }

.icons8Ref {
    margin-top: 0.9rem;
    color: var(--muted-2);
    font-size: 0.74rem;
    text-decoration: none;
}

/* ---------- Alert ---------- */

.alertContainer {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 24px;
    z-index: 100;
}
.alert {
    width: 26rem;
    max-width: 94vw;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    background: linear-gradient(-145deg, #1c1c1c, #2a2a2a, #141414, #333333, #1c1c1c);
}
.alert-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.7rem 0.9rem;
    letter-spacing: 0.12em;
    font-weight: 700;
}
.alert-header p { margin: 0; }
.alert-header button {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border: none;
    cursor: pointer;
    background: var(--danger);
    height: 1.9rem;
    width: 1.9rem;
    font-size: 1.1rem;
    border-radius: 7px;
}
.alert-header button:hover { background: var(--danger-2); }

.separator {
    width: 100%;
    height: 1px;
    background: var(--line);
}

.alert-message {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.8rem 1.4rem;
}
.alert-message * { margin: 0; }
.alert-message-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
}
.alert-message-content { color: var(--muted); }

/* ---------- SkyRock metal finish ---------- */

.blackMetal {
  background: linear-gradient(
    -145deg,
    #1c1c1c,
    #2a2a2a,
    #141414,
    #333333,
    #1c1c1c
  );
}

.metal {
  position: relative;
  overflow: hidden;
  --metal-shine-angle: -50deg;
  --metal-shine-duration: 8s;   /* one sweep + a long, calm pause */
  --metal-shine-width: 28%;
  --metal-shine-strength: 0.5;
}
.metal::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -50%;
  width: var(--metal-shine-width);
  height: 220%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, var(--metal-shine-strength)) 45%,
    rgba(255, 255, 255, var(--metal-shine-strength)) 55%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(var(--metal-shine-angle));
  animation: metal-shine var(--metal-shine-duration) ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: left, opacity;
}
/* Perfect loop: transparent while parked off-screen + at the wrap, so the 140%→-70%
   reset is never visible. Fades happen off-screen, so the visible sweep is unchanged. */
@keyframes metal-shine {
  0%   { left: -70%; opacity: 0; }
  3%   { opacity: 1; }
  35%  { opacity: 1; }
  38%  { left: 140%; opacity: 0; }
  100% { left: 140%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .metal::before { animation: none; }
}

.silverMetal {
  color: var(--metalFont);
  background: linear-gradient(
    -145deg,
    #dcdcdc,
    #c0c0c0,
    #e8e8e8,
    #b0b0b0,
    #f5f5f5
  );
}
