/* ============================================================
   Luminaire Cloud - 登录页面样式
   ============================================================ */

/* 基础重置与字体设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Noto Sans SC', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0f172a;
    overflow: hidden;
    position: relative;
    color: #ffffff;
}

/* ==================== 动态背景光斑 ==================== */
.background-animation {
    position: absolute;
    width: 100vw;
    height: 100vh;
    z-index: -1;
}

.shape {
    position: absolute;
    filter: blur(120px);
    border-radius: 50%;
    animation: float 10s infinite ease-in-out alternate;
    opacity: 0.5;
}

.shape-1 {
    width: 450px;
    height: 450px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    top: -120px;
    left: -120px;
}

.shape-2 {
    width: 380px;
    height: 380px;
    background: linear-gradient(135deg, #3b82f6, #2dd4bf);
    bottom: -150px;
    right: -80px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -8s;
    opacity: 0.2;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(60px, 40px) scale(1.15) rotate(5deg); }
}

/* ==================== 主容器 ==================== */
.login-wrapper {
    display: flex;
    width: 920px;
    max-width: 94%;
    min-height: 540px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.05) inset;
    overflow: hidden;
    z-index: 1;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==================== 左侧品牌区 ==================== */
.brand-panel {
    flex: 1;
    background: linear-gradient(160deg, rgba(99,102,241,0.12), rgba(168,85,247,0.06), rgba(15,23,42,0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(99,102,241,0.1) 0%, transparent 60%);
    animation: brandGlow 8s infinite ease-in-out alternate;
}

@keyframes brandGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, -20px); }
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.brand-icon {
    font-size: 2.8rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #6366f1, #a855f7, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-content h1 {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 5px;
    margin-bottom: 15px;
    background: linear-gradient(to right, #ffffff, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-content p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

.brand-features span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 8px 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    transition: all 0.3s;
}

.brand-features span:hover {
    background: rgba(255,255,255,0.07);
    color: #cbd5e1;
}

.brand-features span i {
    width: 20px;
    color: #818cf8;
}

/* ==================== 右侧表单区 ==================== */
.form-panel {
    flex: 1;
    padding: 50px 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 35px;
}

.form-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-header p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ==================== 错误消息 ==================== */
.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    margin-bottom: 20px;
    color: #fca5a5;
    font-size: 0.88rem;
    animation: fadeIn 0.3s ease;
}

.error-message i {
    font-size: 1.1rem;
    color: #ef4444;
    flex-shrink: 0;
}

/* ==================== 输入框 ==================== */
.input-group {
    position: relative;
    margin-bottom: 28px;
}

.input-icon {
    position: absolute;
    left: 0;
    top: 12px;
    color: #64748b;
    font-size: 0.95rem;
    transition: color 0.3s;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 12px 0 12px 28px;
    font-size: 1rem;
    color: #fff;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
}

.input-group label {
    position: absolute;
    top: 12px;
    left: 28px;
    font-size: 1rem;
    color: #64748b;
    pointer-events: none;
    transition: 0.3s ease all;
}

/* 浮动标签 */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: -18px;
    font-size: 0.78rem;
    color: #a78bfa;
}

/* 聚焦时图标变色 */
.input-group input:focus ~ .input-icon,
.input-group input:not(:placeholder-shown) ~ .input-icon {
    color: #a78bfa;
}

/* 修复: 当输入有值时图标和标签重叠问题 */
.input-group input:not(:placeholder-shown) ~ .input-icon {
    color: #818cf8;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.input-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    transition: 0.4s ease all;
    border-radius: 1px;
}

.input-group input:focus ~ .input-line::after {
    width: 100%;
}

/* ==================== 提交按钮 ==================== */
.submit-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
    background-size: 200% 200%;
    color: #fff;
    font-size: 1.02rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
    font-family: inherit;
    letter-spacing: 1px;
    margin-top: 5px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.4);
    animation: gradientShift 3s ease infinite;
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.submit-btn.success-pulse {
    animation: successPulse 0.5s ease;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes successPulse {
    0%   { transform: scale(1); box-shadow: 0 8px 25px rgba(99,102,241,0.3); }
    50%  { transform: scale(1.03); box-shadow: 0 0 40px rgba(34,197,94,0.5); }
    100% { transform: scale(1); box-shadow: 0 8px 25px rgba(99,102,241,0.3); }
}

.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ==================== 提示文字 ==================== */
.login-hint {
    text-align: center;
    margin-top: 25px;
    font-size: 0.8rem;
    color: #64748b;
    padding: 10px;
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
}

/* ==================== 动画 ==================== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==================== 响应式 ==================== */
@media screen and (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
        width: 100%;
        max-width: 420px;
        min-height: auto;
        border-radius: 22px;
        margin: 20px;
    }

    .brand-panel {
        padding: 30px 25px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: center;
    }

    .brand-content h1 {
        font-size: 1.6rem;
        letter-spacing: 3px;
    }

    .brand-features {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .brand-features span {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .brand-icon {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .form-panel {
        padding: 35px 28px;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .shape-1 {
        width: 250px;
        height: 250px;
        top: -60px;
        left: -60px;
    }

    .shape-2 {
        width: 200px;
        height: 200px;
        bottom: -60px;
        right: -60px;
    }

    .shape-3 {
        width: 150px;
        height: 150px;
    }
}
