/* 现代AI主题用户登录样式 */

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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --ai-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --danger-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #bdc3c7;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-color: #e9ecef;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 5px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 10px 40px rgba(0, 0, 0, 0.2);
    
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 背景动画 */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    background: var(--ai-gradient);
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: -5s;
    background: var(--secondary-gradient);
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: -10s;
    background: var(--success-gradient);
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 10%;
    right: 30%;
    animation-delay: -15s;
    background: var(--warning-gradient);
}

.shape-5 {
    width: 40px;
    height: 40px;
    top: 40%;
    left: 5%;
    animation-delay: -7s;
    background: var(--danger-gradient);
}

.shape-6 {
    width: 90px;
    height: 90px;
    top: 70%;
    right: 5%;
    animation-delay: -12s;
    background: var(--primary-gradient);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 119, 198, 0.3) 0%, transparent 50%);
}

/* 主登录容器 */
.login-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 左侧品牌区域 */
.brand-section {
    flex: 1;
    max-width: 500px;
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-content {
    text-align: center;
    color: white;
}

.ai-logo {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.logo-icon {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
}

.logo-pulse {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: var(--ai-gradient);
    opacity: 0.3;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

.brand-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
    font-weight: 300;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.feature-item i {
    font-size: 20px;
    color: #4facfe;
}

.feature-item span {
    font-size: 16px;
    font-weight: 500;
}

/* 右侧登录区域 */
.login-section {
    flex: 1;
    max-width: 500px;
    padding: 40px;
}

.login-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-heavy);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 登录标签 */
.login-tabs {
    display: flex;
    margin-bottom: 30px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: calc(var(--border-radius) - 4px);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.tab-btn.active {
    background: white;
    color: var(--text-primary);
    box-shadow: var(--shadow-light);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* 表单样式 */
.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

.form-group {
    margin-bottom: 25px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--text-secondary);
    font-size: 16px;
    z-index: 2;
    transition: var(--transition);
}

.form-input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    background: white;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 防止移动端输入框放大页面 */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"] {
    font-size: 16px !important;
}

.form-input:focus + .input-icon,
.form-input:not(:placeholder-shown) + .input-icon {
    color: #667eea;
}

.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--text-primary);
}

.code-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 15px;
    background: var(--ai-gradient);
    color: white;
    border: none;
    border-radius: calc(var(--border-radius) - 2px);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.code-btn:hover:not(:disabled) {
    transform: translateY(-50%) scale(1.05);
    box-shadow: var(--shadow-medium);
}

.code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.login-btn:active {
    transform: translateY(0);
}

.btn-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-loading {
    display: block;
}

/* 忘记密码 */
.forgot-password {
    text-align: center;
    margin-bottom: 20px;
}

.forgot-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.forgot-btn:hover {
    color: #667eea;
}

/* 返回首页按钮 */
.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.home-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.home-btn i {
    font-size: 16px;
}

/* 注册链接 */
.register-link {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.register-link p {
    color: var(--text-secondary);
    font-size: 14px;
}

.register-btn {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.register-btn:hover {
    color: #764ba2;
}

/* 警告消息 */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.alert-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #ef6c00;
    border-left: 4px solid #ff9800;
}

.alert-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: var(--transition);
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-heavy);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 30px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-cancel {
    flex: 1;
    padding: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: #e9ecef;
    color: var(--text-primary);
}

.btn-submit {
    flex: 2;
    padding: 12px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-submit.loading .btn-text {
    opacity: 0;
}

.btn-submit.loading .btn-loading {
    display: block;
}

.btn-submit .btn-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 右下角悬浮提示 */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 350px;
    word-wrap: break-word;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.success {
    background: #28a745 !important;
    border: 1px solid #1e7e34 !important;
    color: #ffffff !important;
}

.toast-notification.info {
    background: #17a2b8 !important;
    border: 1px solid #117a8b !important;
    color: #ffffff !important;
}

.toast-notification.warning {
    background: #ffc107 !important;
    border: 1px solid #d39e00 !important;
    color: #212529 !important;
}

.toast-notification.error {
    background: #dc3545 !important;
    border: 1px solid #bd2130 !important;
    color: #ffffff !important;
}

.toast-notification .toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-notification .toast-icon {
    font-size: 16px;
    flex-shrink: 0;
    color: inherit !important;
}

.toast-notification .toast-message {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: inherit !important;
}

/* 移动端悬浮提示适配 */
@media (max-width: 768px) {
    .toast-notification {
        bottom: 15px;
        right: 15px;
        left: 15px;
        max-width: none;
        transform: translateY(100%);
    }
    
    .toast-notification.show {
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
    }
    
    .brand-section {
        max-width: none;
        padding: 40px 20px;
    }
    
    .brand-title {
        font-size: 36px;
    }
    
    .feature-list {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .feature-item {
        flex: 1;
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    body {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4facfe 100%);
        min-height: 100vh;
    }
    
    .login-container {
        padding: 10px;
        flex-direction: column;
    }
    
    /* 品牌区域 - 缩小显示 */
    .brand-section {
        padding: 20px 15px 10px;
        flex: 0 0 auto;
        min-height: auto;
    }
    
    .brand-content {
        text-align: center;
    }
    
    .ai-logo {
        width: 60px;
        height: 60px;
        margin: 0 auto 15px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 30px;
    }
    
    .brand-title {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .brand-subtitle {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    /* 隐藏功能列表 */
    .feature-list {
        display: none;
    }
    
    /* 登录区域 - 更宽 */
    .login-section {
        flex: 1;
        width: 100%;
        max-width: 100%;
        margin-top: -20px;
    }
    
    .login-content {
        padding: 30px 20px;
        width: 100%;
        max-width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 0;
    }
    
    /* 进一步缩小品牌区域 */
    .brand-section {
        padding: 30px 20px 20px;
    }
    
    .ai-logo {
        width: 60px;
        height: 60px;
        margin: 0 auto 15px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 30px;
    }
    
    .brand-title {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .brand-subtitle {
        font-size: 14px;
        margin-bottom: 0;
    }
    
    /* 登录区域优化 */
    .login-content {
        padding: 30px 20px 20px;
        width: 100%;
        margin-top: -15px;
    }
    
    
    .form-input {
        padding: 12px 12px 12px 40px;
        font-size: 16px;
    }
    
    .login-btn {
        padding: 14px;
        font-size: 15px;
    }
    
    .login-tabs {
        margin-bottom: 25px;
    }
    
    .tab-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .input-icon {
        left: 12px;
        font-size: 14px;
    }
    
    .login-btn {
        padding: 14px;
        font-size: 16px;
    }
    
    .login-section {
        border-radius: 20px 20px 0 0;
        margin-top: -20px;
        padding: 30px 15px 15px;
    }
    
    .brand-section {
        padding: 30px 20px 50px;
    }
    
    .ai-logo {
        width: 50px;
        height: 50px;
        margin: 0 auto 10px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 30px;
    }
    
    .brand-title {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .brand-subtitle {
        font-size: 12px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-content {
    animation: fadeInUp 0.6s ease-out;
}

.brand-content {
    animation: fadeInUp 0.8s ease-out;
}

/* 加载状态 */
.loading {
    pointer-events: none;
}

.loading * {
    cursor: wait !important;
}

/* 成功状态 */
.success {
    border-color: #4caf50 !important;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%) !important;
}

/* 错误状态 */
.error {
    border-color: #f44336 !important;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%) !important;
}
