/* Login Page Styles */

/* CSS Variables Definition */
:root {
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --danger-color: #ef4444;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Noto Sans SC', sans-serif;
}

.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.brand-logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.brand-logo span {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.login-title {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Form */
.login-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    font-family: var(--font-secondary);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
}

.input-group {
    position: relative;
}

.input-group-text {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-right: none;
    color: var(--text-secondary);
    padding: 12px 15px;
}

.form-control {
    border: 2px solid var(--border-color);
    border-left: none;
    padding: 12px 15px;
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: var(--danger-color);
    margin-top: 5px;
}

/* Send Code Button */
#sendCodeBtn {
    border: 2px solid var(--primary-color);
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#sendCodeBtn:hover {
    background: var(--primary-color);
    color: white;
}

#sendCodeBtn:disabled {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

.btn-login:disabled {
    background: var(--bg-light);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 兑换码提示样式 */
.redeem-tip {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 20px 0 15px 0;
    text-align: center;
}

.redeem-tip p {
    margin: 0;
    font-size: 14px;
    color: #92400e;
    font-weight: 500;
}

.redeem-tip i {
    color: #f59e0b;
    margin-right: 6px;
}

/* Tips */
.login-tips {
    text-align: center;
    margin-bottom: 20px;
}

.login-tips p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-tips i {
    color: var(--primary-color);
}

/* Footer */
.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.back-home a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.back-home a:hover {
    color: var(--primary-color);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.loading-spinner p {
    margin: 0;
    color: var(--text-primary);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 576px) {
    .login-container {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 25px;
    }
    
    .brand-logo span {
        font-size: 1.3rem;
    }
    
    .login-title {
        font-size: 1.3rem;
    }
    
    /* 手机号输入框 - 保持水平布局 */
    .form-group:first-of-type .input-group {
        flex-wrap: wrap;
    }
    
    .form-group:first-of-type .input-group-text {
        border-radius: 8px 0 0 8px;
        min-width: 50px;
        justify-content: center;
        border-right: none;
    }
    
    .form-group:first-of-type .form-control {
        border-radius: 0 8px 8px 0;
        flex: 1;
        min-width: 0;
        border-left: none;
    }
    
    /* 验证码输入框 - 垂直布局 */
    .form-group:last-of-type .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group:last-of-type .input-group-text {
        border-right: 2px solid var(--border-color);
        border-bottom: none;
        border-radius: 8px 8px 0 0;
    }
    
    .form-group:last-of-type .form-control {
        border-left: 2px solid var(--border-color);
        border-top: none;
        border-radius: 0 0 8px 8px;
    }
    
    #sendCodeBtn {
        width: 100%;
        border-radius: 8px;
        margin-top: 0;
    }
    
    .footer-links a {
        display: block;
        margin: 10px 0;
    }
    
    .redeem-tip {
        padding: 10px 12px;
        margin: 15px 0 12px 0;
    }
    
    .redeem-tip p {
        font-size: 13px;
    }
} 