/* 模态框基础样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000; /* 提高z-index确保在最顶层 */
    overflow: auto;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

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

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

/* 登录/注册标签样式 */
.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 12px 0;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab.active {
    color: #ff4500;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ff4500;
}

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

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

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #ff4500;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 69, 0, 0.2);
}

.auth-submit {
    width: 100%;
    padding: 12px;
    background-color: #ff4500;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-submit:hover {
    background-color: #e03d00;
}

.form-footer {
    margin-top: 15px;
    text-align: center;
}

.forgot-password {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #ff4500;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .modal-content {
        margin: 20% auto;
        padding: 20px;
    }
    
    .auth-tab {
        font-size: 14px;
    }
    
    .form-group input {
        padding: 10px;
        font-size: 14px;
    }
    
    .auth-submit {
        padding: 10px;
        font-size: 14px;
    }
}