/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 登录页面专用样式 */
.login-container {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* 顶部导航栏 */
.top-nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.language-selector:hover {
    background: rgba(255, 255, 255, 0.1);
}

.globe-icon {
    font-size: 1.2rem;
}

/* 主登录区域 */
.login-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 80px 20px 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 10;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 1rem;
}

/* 登录标签页 */
.login-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e1e5e9;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn:hover {
    color: #667eea;
}

/* 登录表单 */
.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.captcha-label {
    color: #555 !important;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* 手机号输入组 */
.phone-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.country-code {
    background: #f8f9fa;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-right: none;
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-weight: 600;
    cursor: pointer;
}

.arrow-down {
    font-size: 12px;
    color: #999;
}

.phone-input-wrapper input {
    border-radius: 0 8px 8px 0;
    border-left: none;
    flex: 1;
}

.phone-icon {
    position: absolute;
    right: 15px;
    color: #999;
    font-size: 1.2rem;
}

/* 验证码组 */
.captcha-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.captcha-group input {
    flex: 1;
}

.captcha-group input.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.captcha-group input.success {
    border-color: #28a745;
    background-color: #f8fff9;
}

.captcha-image {
    width: 180px;
    height: 50px;
    border-radius: 0;
    border: none;
    background: transparent;
    object-fit: cover;
    object-position: center;
    display: inline-block;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s ease;
    vertical-align: middle;
    flex-shrink: 0;
    overflow: hidden;
}

.captcha-image:hover {
    transform: scale(1.05);
}

/* 短信验证码组 */
.sms-group {
    display: flex;
    gap: 15px;
}

.sms-group input {
    flex: 1;
}

.sms-btn {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.sms-btn:hover:not(:disabled) {
    background: #5a6fd8;
}

.sms-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* 协议和分割线 */
.agreement {
    text-align: center;
    margin: 20px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.agreement a {
    color: #667eea;
    text-decoration: none;
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #999;
    font-size: 14px;
}

/* 复选框组 */
.checkbox-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 右侧浮动元素 */
.floating-elements {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 通知卡片 */
.notification-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 280px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #666;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-icon {
    font-size: 2rem;
}

.notification-text p {
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
}

.action-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.action-btn:hover {
    background: #5a6fd8;
}

/* 快捷工具栏 */
.quick-tools {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tool-item {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tool-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.tool-icon {
    font-size: 1.5rem;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 主菜单样式 */
.main-menu {
    margin-bottom: 40px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.menu-item {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-decoration: none;
    color: #333;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.menu-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.menu-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #667eea;
}

.menu-item p {
    color: #666;
    line-height: 1.6;
}

/* 表单样式 */
.form-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 40px auto;
}

.form-title {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: #5a6268;
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

/* 智能体卡片样式 */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.agent-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.agent-card:hover {
    transform: translateY(-5px);
}

.agent-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.agent-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-right: 15px;
}

.agent-info h3 {
    color: #667eea;
    margin-bottom: 5px;
}

.agent-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.agent-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.agent-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

/* 导航样式 */
.nav-bar {
    background: white;
    padding: 15px 0;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.nav-links a:hover {
    background-color: #f8f9fa;
}

/* 页脚样式 */
footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    margin-top: 40px;
}

/* 标签页样式 */
.form-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e1e5e9;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-btn:hover {
    color: #667eea;
}

.form-content {
    display: none;
}

.form-content.active {
    display: block;
}

.form-content h2 {
    margin-bottom: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-container {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .agents-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .form-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    
    .tab-btn.active {
        border-right-color: #667eea;
        border-bottom-color: transparent;
    }
    
    /* 移动端登录页面适配 */
    .floating-elements {
        display: none;
    }
    
    .login-card {
        margin: 0 20px;
        padding: 30px 20px;
    }
    
    .captcha-group,
    .sms-group {
        flex-direction: column;
    }
    
    .captcha-image {
        width: 100%;
        height: 50px;
    }
    
    .sms-btn {
        width: 100%;
    }
}
