/* ============================================================
   V14 — Auth (login + register)
   Body class: .v14-login-page  /  .v14-register-page
   Prefix:    .v14a-
   ============================================================ */

body.v14-login-page,
body.v14-register-page {
    background: var(--v14h-bg);
    position: relative;
    overflow-x: hidden;
    padding-bottom: 30px !important;
}
body.v14-login-page .v8-tabbar,
body.v14-login-page .v11-service,
body.v14-register-page .v8-tabbar,
body.v14-register-page .v11-service { display: none !important; }

/* ===== Anim ===== */
@keyframes v14a-wiggle   { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes v14a-rise     { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
@keyframes v14a-scaleIn  { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
@keyframes v14a-spin     { to { transform: rotate(360deg); } }
@keyframes v14a-floatY   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes v14a-aurora {
    0%   { transform: translate(-15%, -10%) rotate(0deg); }
    33%  { transform: translate( 10%, -20%) rotate(120deg); }
    66%  { transform: translate( 15%,  15%) rotate(240deg); }
    100% { transform: translate(-15%, -10%) rotate(360deg); }
}
@keyframes v14a-hudPulse {
    0%,100% { box-shadow: 0 0 0 0 currentColor; transform: scale(1); }
    50%     { box-shadow: 0 0 0 5px transparent; transform: scale(1.25); }
}

/* ===== Aurora background ===== */
.v14a-bg {
    position: fixed; inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
@media (min-width: 560px) { .v14a-bg { max-width: 480px; margin: 0 auto; } }
.v14a-bg::before,
.v14a-bg::after {
    content: '';
    position: absolute;
    width: 140%; height: 140%;
    top: -20%; left: -20%;
    border-radius: 40% 60% 65% 35% / 40% 45% 55% 60%;
    filter: blur(60px);
    opacity: 0.55;
}
.v14a-bg::before {
    background:
        radial-gradient(circle at 30% 40%, var(--v14h-brand-1), transparent 50%),
        radial-gradient(circle at 70% 30%, var(--v14h-brand-3), transparent 50%);
    animation: v14a-aurora 22s ease-in-out infinite;
}
.v14a-bg::after {
    background:
        radial-gradient(circle at 40% 60%, var(--v14h-brand-2), transparent 50%),
        radial-gradient(circle at 80% 70%, var(--v14h-gold), transparent 50%);
    animation: v14a-aurora 28s ease-in-out infinite reverse;
}

/* ===== HUD bar ===== */
.v14a-hud {
    position: relative;
    z-index: 5;
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px 10px;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 10px;
    color: var(--v14h-txt-2);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}
.v14a-hud-left { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.v14a-hud-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--v14h-lime);
    color: var(--v14h-lime);
    animation: v14a-hudPulse 1.6s ease-in-out infinite;
    flex-shrink: 0;
}
.v14a-hud-right { display: flex; align-items: center; gap: 12px; opacity: 0.75; flex-shrink: 0; }
.v14a-hud-clock {
    font-variant-numeric: tabular-nums;
    color: var(--v14h-gold);
}

/* ===== WRAP ===== */
.v14a-wrap {
    position: relative;
    z-index: 5;
    padding: 6px 0 30px;
    animation: v14a-rise 0.5s var(--v14h-ease) both;
}

/* ===== Hero badge ===== */
.v14a-hero {
    text-align: center;
    padding: 20px 24px 22px;
    animation: v14a-scaleIn 0.5s var(--v14h-spring) both 0.1s;
}
.v14a-logo {
    width: 80px; height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--v14h-brand-1), var(--v14h-brand-2) 60%, #7F1D1D);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 900;
    letter-spacing: -1px;
    margin: 0 auto 14px;
    position: relative;
    box-shadow: 0 14px 40px rgba(225,29,72,0.50);
    animation: v14a-floatY 3.5s ease-in-out infinite;
    transition: transform 0.32s var(--v14h-spring);
    overflow: hidden;
    text-transform: uppercase;
}
.v14a-logo img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.v14a-logo:hover { transform: scale(1.08) rotate(-8deg); animation: none; }
.v14a-logo::before {
    content: '';
    position: absolute; inset: 4px;
    border-radius: 20px;
    border: 2px dashed rgba(255,255,255,0.30);
    animation: v14a-spin 12s linear infinite;
    pointer-events: none;
}
.v14a-logo::after {
    content: '';
    position: absolute; inset: -8px;
    border-radius: 32px;
    background: linear-gradient(135deg, transparent, rgba(212,175,55,0.30), transparent);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.35s;
}
.v14a-logo:hover::after { opacity: 1; }

.v14a-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(212,175,55,0.15);
    color: var(--v14h-gold);
    font-size: 10px; font-weight: 800;
    letter-spacing: 0.8px; text-transform: uppercase;
    border: 1px solid rgba(212,175,55,0.30);
    margin-bottom: 12px;
}
.v14a-title {
    font-size: 26px; font-weight: 900;
    color: var(--v14h-txt);
    letter-spacing: -0.4px;
    line-height: 1.15;
    background: linear-gradient(135deg, #fff 0%, #A0A3BD 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.v14a-sub {
    margin-top: 8px;
    font-size: 13px;
    color: var(--v14h-txt-3);
    line-height: 1.5;
    padding: 0 8px;
}

/* ===== CARD ===== */
.v14a-card {
    margin: 0 16px;
    padding: 20px;
    background: rgba(20,20,43,0.78);
    -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--v14h-line-2);
    border-radius: 24px;
    box-shadow: 0 22px 48px rgba(0,0,0,0.45);
    animation: v14a-rise 0.5s var(--v14h-ease) both 0.2s;
}

/* Tabs */
.v14a-tabs {
    display: grid; grid-template-columns: 1fr 1fr;
    background: var(--v14h-surface-1);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 18px;
    gap: 2px;
    border: 1px solid var(--v14h-line);
}
.v14a-tab {
    padding: 9px 12px;
    text-align: center;
    border-radius: 9px;
    font-size: 12px; font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--v14h-txt-3);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.30s var(--v14h-spring);
}
.v14a-tab:hover { color: var(--v14h-txt-2); transform: scale(1.02); }
.v14a-tab.active {
    background: linear-gradient(135deg, var(--v14h-brand-1), var(--v14h-brand-2));
    color: #fff;
    box-shadow: 0 4px 12px rgba(225,29,72,0.45);
}

/* Field group */
.v14a-field { margin-bottom: 14px; }
.v14a-label {
    font-size: 10px;
    color: var(--v14h-txt-3);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 6px;
    display: flex; align-items: center; gap: 5px;
}
.v14a-label::before {
    content: '';
    width: 3px; height: 10px;
    background: linear-gradient(180deg, var(--v14h-brand-1), var(--v14h-brand-2));
    border-radius: 1.5px;
}

.v14a-input {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    background: var(--v14h-surface);
    border: 1.5px solid var(--v14h-line-2);
    border-radius: 14px;
    transition: border-color 0.22s, box-shadow 0.30s, background 0.22s;
}
.v14a-input:focus-within {
    border-color: var(--v14h-brand-2);
    background: rgba(190,18,60,0.06);
    box-shadow: 0 0 0 4px rgba(190,18,60,0.15);
}
.v14a-input-ic {
    color: var(--v14h-txt-3);
    width: 16px; height: 16px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.22s, transform 0.32s var(--v14h-spring);
}
.v14a-input:focus-within .v14a-input-ic { color: var(--v14h-brand-2); transform: scale(1.15) rotate(-8deg); }
.v14a-input-ic .layui-icon { font-size: 16px; }
.v14a-input-prefix {
    color: var(--v14h-gold);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    font-size: 14px;
}
.v14a-input input {
    flex: 1; min-width: 0;
    background: transparent;
    border: 0; outline: 0;
    color: var(--v14h-txt);
    font-size: 15px; font-weight: 700;
    padding: 0;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    font-family: inherit;
}
.v14a-input input::placeholder { color: var(--v14h-txt-4); font-weight: 500; letter-spacing: 0; }
.v14a-input input:read-only,
.v14a-input input[readonly] { color: var(--v14h-txt-2); cursor: default; }

.v14a-eye {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--v14h-txt-3);
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.22s, background 0.22s, transform 0.30s var(--v14h-spring);
}
.v14a-eye:hover { color: var(--v14h-brand-2); background: rgba(190,18,60,0.10); transform: scale(1.12); }
.v14a-eye:active { transform: scale(0.92); }
.v14a-eye .layui-icon { font-size: 16px; transition: transform 0.30s var(--v14h-spring); }
.v14a-eye:hover .layui-icon { animation: v14a-wiggle 0.45s ease; }

.v14a-otp-btn {
    height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--v14h-gold), #C9A227);
    color: #3A1F00;
    font-size: 11px; font-weight: 900;
    letter-spacing: 0.6px;
    cursor: pointer;
    flex-shrink: 0;
    border: 0;
    box-shadow: 0 4px 12px rgba(212,175,55,0.50);
    transition: transform 0.30s var(--v14h-spring), filter 0.22s, box-shadow 0.30s;
}
.v14a-otp-btn:hover { transform: scale(1.06); filter: brightness(1.10); box-shadow: 0 8px 18px rgba(212,175,55,0.70); }
.v14a-otp-btn:active { transform: scale(0.94); }
.v14a-otp-btn.disabled {
    background: var(--v14h-surface-1);
    color: var(--v14h-txt-3);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* Submit */
.v14a-submit {
    width: 100%;
    height: 56px;
    margin-top: 6px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--v14h-brand-1), var(--v14h-brand-2) 60%, #7F1D1D);
    color: #fff;
    font-size: 14px; font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border: 0;
    box-shadow: 0 14px 36px rgba(225,29,72,0.55);
    display: flex; align-items: center; justify-content: center; gap: 10px;
    will-change: transform;
    transition: transform 0.32s var(--v14h-spring), filter 0.22s, box-shadow 0.32s;
}
.v14a-submit::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.30) 50%, transparent 70%);
    transform: translateX(-100%) skewX(-18deg);
    transition: transform 0.7s var(--v14h-ease);
}
.v14a-submit:hover { transform: scale(1.025) translateY(-2px); filter: brightness(1.10); box-shadow: 0 20px 48px rgba(225,29,72,0.70); }
.v14a-submit:hover::before { transform: translateX(120%) skewX(-18deg); }
.v14a-submit:active { transform: scale(0.97); }
.v14a-submit .layui-icon { font-size: 16px; transition: transform 0.30s var(--v14h-spring); }
.v14a-submit:hover .layui-icon { transform: translateX(4px) scale(1.20); }
.v14a-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; filter: none; }

/* Footer link */
.v14a-foot {
    text-align: center;
    margin-top: 18px;
    font-size: 12px;
    color: var(--v14h-txt-3);
    letter-spacing: 0.4px;
}
.v14a-foot a {
    color: var(--v14h-brand-2);
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-left: 4px;
    border-bottom: 1px dashed transparent;
    transition: color 0.22s, border-color 0.22s;
}
.v14a-foot a:hover { color: var(--v14h-gold); border-bottom-color: currentColor; }

/* Legal */
.v14a-legal {
    margin: 20px 24px 0;
    text-align: center;
    font-size: 11px;
    color: var(--v14h-txt-4);
    line-height: 1.6;
    position: relative;
    z-index: 5;
}
.v14a-legal a {
    color: var(--v14h-txt-3);
    border-bottom: 1px dashed transparent;
    transition: color 0.22s, border-color 0.22s;
}
.v14a-legal a:hover { color: var(--v14h-brand-2); border-bottom-color: currentColor; }
.v14a-legal .sep { margin: 0 6px; opacity: 0.5; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Auth pages: show text in its natural case =====
   Cancels the auto-uppercase on the login/register pages. These labels, button,
   tag and footer link are authored in normal case in the HTML; the rules above
   were forcing ALL-CAPS via text-transform: uppercase. */
.v14a-hud,
.v14a-logo,
.v14a-tag,
.v14a-label,
.v14a-submit,
.v14a-foot a { text-transform: none !important; }
