/* ═══════════════════════════════════════
   LuckyCat Console — Ultra Glassmorphism Login
═══════════════════════════════════════ */

:root {
    --primary-orange: #FF8232;
    --primary-hover: #E6762D;
    --primary-glow: rgba(255,130,50,0.25);
    --white: #FFFFFF;
    --text-dark: #111827;
    --text-muted: #9CA3AF;
    --border-color: rgba(255,255,255,0.15);
    --error: #EF4444;
    --focus-ring: 0 0 0 4px rgba(255,130,50,0.2);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.login-page {
    margin: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    font-family: "Inter", "Noto Sans TC", -apple-system, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #050505;
    background-image: url('premium_login_bg-sm.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

/* ═══════════════════════════════════
   全景毛玻璃主卡片 (Ultra Glass Card)
═══════════════════════════════════ */
.ultra-glass-card {
    display: flex;
    flex-direction: column;
    width: 90%;
    max-width: 1080px;
    background: rgba(15, 15, 20, 0.48);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 32px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 10;
    animation: login-card-in 0.35s ease-out both;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .ultra-glass-card {
        background: rgba(18, 18, 24, 0.94);
    }
}

@keyframes login-card-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .ultra-glass-card {
        animation: none;
    }
}

@media (min-width: 900px) {
    .ultra-glass-card {
        flex-direction: row;
        height: 600px;
    }
}

/* ═══════════════════════════════════
   左側品牌區 (Brand Area)
═══════════════════════════════════ */
.brand-area {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
}

@media (min-width: 900px) {
    .brand-area {
        border-bottom: none;
        border-right: 1px solid var(--border-color);
    }
}

.brand-logo-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.brand-tagline {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.brand-desc {
    font-size: 16px;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
    margin-bottom: 40px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brand-feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255,130,50,0.15);
    color: var(--primary-orange);
    border-radius: 10px;
    font-size: 16px;
    border: 1px solid rgba(255,130,50,0.2);
}

/* ═══════════════════════════════════
   右側表單區 (Form Area)
═══════════════════════════════════ */
.form-area {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(0,0,0,0.2);
}

.login-shell {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.login-header {
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

/* 表單欄位 - Dark Mode UI */
.lc-field {
    margin-bottom: 20px;
}

.lc-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
}

.input-wrap {
    position: relative;
}

.lc-field input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: rgba(0,0,0,0.4);
    color: var(--white);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.lc-field input:hover {
    border-color: rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.5);
}

/* 覆寫 Chrome 自動填入的醜陋顏色 (Dark Mode 特化) */
.lc-field input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #1a1a1a inset !important;
    -webkit-text-fill-color: var(--white) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

.lc-field input:-webkit-autofill:focus {
    border-color: var(--primary-orange) !important;
}

.input-wrap input {
    padding-right: 44px;
}

.toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.4);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.toggle-pw:hover { color: var(--white); }
.toggle-pw svg { width: 18px; height: 18px; }

.lc-field input::placeholder { color: rgba(255,255,255,0.3); }

.lc-field input:focus {
    outline: none;
    border-color: var(--primary-orange);
    background: rgba(0,0,0,0.6);
    box-shadow: var(--focus-ring);
}

.lc-field input.invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.lc-error {
    font-size: 12px;
    color: var(--error);
    margin-top: 6px;
    min-height: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 登入按鈕 */
.btn-login {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-orange), #ff6a00);
    color: white;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(255,130,50,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-login:hover {
    box-shadow: 0 12px 24px rgba(255,130,50,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(255,130,50,0.3);
}

.btn-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.btn-login.loading .btn-loader { display: block; }
.btn-login.loading .btn-text { opacity: 0.8; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 分隔線 & Google 按鈕 */
.login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    font-weight: 500;
}
.login-divider::before, .login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.1);
}

.btn-google {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    font-size: 14px;
    font-weight: 500;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-google:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.25);
}
.btn-google svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Footer */
.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.login-footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
}
.login-footer a:hover { color: var(--primary-orange); }

.login-master-hint {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 130, 50, 0.12);
    border: 1px solid rgba(255, 130, 50, 0.25);
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}
.login-master-hint strong { color: #fff; }
.login-master-hint code {
    display: inline-block;
    margin: 0 4px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.25);
    color: #ffd6b8;
    font-size: 11px;
}
.footer-sep { color: rgba(255,255,255,0.2); }
